www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Building a standalone druntime for LDC

reply A. Nicholi <nich caveoforig.in> writes:
Hello,

I am trying to build LDC’s druntime by itself (without phobos), 
but it seems that druntime expects to be built alongside DMD, 
which is strange considering I’m building LDC’s version of the 
druntime. Make says: “No rule to make target 
'../dmd/src/osmodel.mak'”

Is it possible to build druntime by itself for LDC? Must I build 
LDC alongside it for every host platform, or may I just specify 
‘-defaultlib=’ with a distro-provided LDC? How should I go about 
doing this?
May 13 2018
next sibling parent David Nadlinger <code klickverbot.at> writes:
On Sunday, 13 May 2018 at 13:37:06 UTC, A. Nicholi wrote:
 I am trying to build LDC’s druntime by itself (without phobos) 
 […] Make says: “No rule to make target '../dmd/src/osmodel.mak'”
LDC uses its own CMake-based build system for druntime/Phobos, see runtime/CMakeLists.txt I'm the main repository. The ldc-build-runtime tool streamlines (re)building certain runtime versions without having to manually manage the build process: https://wiki.dlang.org/Building_LDC_runtime_libraries —David
May 13 2018
prev sibling parent reply Seb <seb wilzba.ch> writes:
On Sunday, 13 May 2018 at 13:37:06 UTC, A. Nicholi wrote:
 Hello,

 I am trying to build LDC’s druntime by itself (without phobos), 
 but it seems that druntime expects to be built alongside DMD, 
 which is strange considering I’m building LDC’s version of the 
 druntime. Make says: “No rule to make target 
 '../dmd/src/osmodel.mak'”
That means that DMD hasn't been checked out in ../dmd relative to druntime as osmodel.mak is in DMD.
May 13 2018
parent Joakim <dlang joakim.fea.st> writes:
On Sunday, 13 May 2018 at 14:59:39 UTC, Seb wrote:
 On Sunday, 13 May 2018 at 13:37:06 UTC, A. Nicholi wrote:
 Hello,

 I am trying to build LDC’s druntime by itself (without 
 phobos), but it seems that druntime expects to be built 
 alongside DMD, which is strange considering I’m building LDC’s 
 version of the druntime. Make says: “No rule to make target 
 '../dmd/src/osmodel.mak'”
That means that DMD hasn't been checked out in ../dmd relative to druntime as osmodel.mak is in DMD.
More importantly, ldc's druntime fork doesn't use those Makefiles, they're just lying around from upstream. You can't use them to build a druntime for LDC, as they're missing LDC-specific files. He can use the tool David linked above or investigate the CMake targets that LDC uses: https://wiki.dlang.org/Building_LDC_from_source
May 13 2018