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 authored and ibuclaw committed Dec 12, 2023
1 parent b306781 commit 796554b
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 796554b

Please sign in to comment.