Skip to content

Commit

Permalink
Avoid deprecated compiler build Makefiles, use build.d instead
Browse files Browse the repository at this point in the history
  • Loading branch information
kinke committed Dec 5, 2023
1 parent d761b19 commit 577fbd7
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions create_dmd_release/create_dmd_release.d
Original file line number Diff line number Diff line change
Expand Up @@ -374,19 +374,17 @@ void buildAll(Bits bits, string branch)
auto makecmd = make~jobs~makeModel~dmdEnv~hostDMDEnv~isRelease~ltoOption~latest~" -f "~targetMakefile;

info("Building DMD "~bitsDisplay);
changeDir(cloneDir~"/dmd/compiler/src");
version (Windows)
run(msvcVars~makecmd~" dmd");
changeDir(cloneDir~"/dmd");
run(hostDMD~" -g compiler/src/build.d -ofgenerated/build"~exe);
version(Windows)
run(msvcVars~`generated\build.exe`~jobs~makeModel~hostDMDEnv~isRelease~ltoOption~latest~" dmd");
else
run(makecmd);
run("generated/build"~jobs~makeModel~hostDMDEnv~isRelease~ltoOption~latest~" dmd");

// Add libraries to the LIB variable in sc.ini
version(Windows)
{{
// WORKAROUND: Explicitly build dmd.conf because win32.mak invokes build.d explicitly for the executable ($G\dmd.exe)
run(`..\..\generated\build.exe ` ~ jobs ~ makeModel ~ dmdEnv ~ hostDMDEnv ~ isRelease ~ ltoOption ~ latest ~ " dmdconf");

// Path sc.ini by appending to the existing LIB entries
// Patch sc.ini by appending to the existing LIB entries
const iniPath = cloneDir~`\dmd\generated\`~osDirName~`\release\`~bitsStr~`\sc.ini`;
const content = readText(iniPath);
File scIni = File(iniPath, "w");
Expand Down

0 comments on commit 577fbd7

Please sign in to comment.