LDC -noruntime

Alex Rønne Petersen alex at lycus.org
Fri Jul 6 00:37:47 PDT 2012


On 06-07-2012 08:53, BLM768 wrote:
> I've been trying to write an OS kernel in D, and I'm having issues with
> the runtime. I'm trying to use LDC's -noruntime option, which is
> _supposed_ to prevent any runtime calls from being generated, but the
> linker keeps complaining about unresolved references to _d_assert_msg
> and other runtime functions. It seems that LDC is ignoring the switch
> and is generating runtime references anyway. Is there some other way to
> force it to stop trying to pull in the runtime? I'd rather not have to
> create/link a custom runtime at this point; I don't even have a memory
> allocator written, so I really don't want to mess with a runtime yet.

It's not like compiling without a runtime will make the compiler not 
emit calls; what else would it do for e.g. the 'new' expression? Anyway, 
given your situation, just grab the function prototypes from druntime 
and stub them out, then fill them in later.

-- 
Alex Rønne Petersen
alex at lycus.org
http://lycus.org


More information about the Digitalmars-d-learn mailing list