ldc-developers / ldc

The LLVM-based D Compiler.
http://wiki.dlang.org/LDC
Other
1.22k stars 262 forks source link

Building druntime only without phobos #3611

Open katyo opened 4 years ago

katyo commented 4 years ago

I have interest in bare-metal development and -betterC, so I don't need phobos at all. How can I build druntime only without phobos using ldc-build-runtime?

kinke commented 4 years ago

Please don't abuse the tracker here for questions, there's the forum, gitter etc. - You can invoke the tool normally, then cancel the last build step, and instead invoke a slightly modified ninja/make cmdline in the build directory (the tool prints each cmdline it invokes), e.g., ninja druntime-ldc druntime-ldc-debug.

katyo commented 4 years ago

@kinke thanks for hint. Because GDC has configure flag --with-libphobos-druntime-only so I expected that similar feature should be in LDC too.

kinke commented 4 years ago

When building LDC normally, i.e., not using ldc-build-runtime, Phobos can be excluded the same way - ninja druntime-ldc druntime-ldc-debug builds LDC and the 2 druntime libs. IIRC, there are CMake special cases for an inexisting Phobos git submodule, so removing the runtime/phobos dir might work too (I've never tested that).