Skip to content

Commit

Permalink
Merge pull request #148 from MartinNowak/dmd_conf
Browse files Browse the repository at this point in the history
fix issue - host compiler uses wrong dmd.conf
  • Loading branch information
MartinNowak committed Sep 21, 2015
2 parents d89c734 + 5e234e5 commit 8a6cc96
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions create_dmd_release/create_dmd_release.d
Expand Up @@ -419,11 +419,13 @@ void buildAll(Bits bits, string branch, bool dmdOnly=false)
{
auto jobs = "";
auto dmdEnv = ` DMD=..\dmd\src\dmd`;
enum dmdConf = "sc.ini";
}
else
{
auto jobs = " -j4";
auto dmdEnv = " DMD=../dmd/src/dmd";
enum dmdConf = "dmd.conf";
}
auto hostDMDEnv = " HOST_DC="~hostDMD;
auto isRelease = " RELEASE=1";
Expand All @@ -435,6 +437,7 @@ void buildAll(Bits bits, string branch, bool dmdOnly=false)
if(build64BitTools || bits == Bits.bits32)
{
info("Building DMD "~bitsDisplay);
removeFile(cloneDir~"/dmd/src/"~dmdConf);
changeDir(cloneDir~"/dmd/src");
run(makecmd~" dmd");
copyFile(cloneDir~"/dmd/src/dmd"~exe, cloneDir~"/dmd/src/dmd"~bitsStr~exe);
Expand All @@ -452,15 +455,7 @@ void buildAll(Bits bits, string branch, bool dmdOnly=false)
}
else version(Posix)
{
version(OSX)
enum flags="";
else
enum flags=" -L--export-dynamic";

std.file.write(cloneDir~"/dmd/src/dmd.conf", (`
[Environment]
DFLAGS=-I%@P%/../../phobos -I%@P%/../../druntime/src -L-L%@P%/../../phobos/generated/`~osDirName~`/release/`~bitsStr~` -L-L%@P%/../../druntime/lib`~flags~`
`).outdent().strip());
run(makecmd~" dmd.conf");
}
else
static assert(false, "Unsupported platform");
Expand Down

0 comments on commit 8a6cc96

Please sign in to comment.