From 577fbd7edb12bb876546363fd574ca1714234ba1 Mon Sep 17 00:00:00 2001 From: Martin Kinkelin Date: Tue, 5 Dec 2023 02:43:55 +0100 Subject: [PATCH] Avoid deprecated compiler build Makefiles, use build.d instead --- create_dmd_release/create_dmd_release.d | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/create_dmd_release/create_dmd_release.d b/create_dmd_release/create_dmd_release.d index dc61ce17..7bd88925 100644 --- a/create_dmd_release/create_dmd_release.d +++ b/create_dmd_release/create_dmd_release.d @@ -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");