mirror of
https://github.com/dlang/dmd.git
synced 2025-04-27 05:30:13 +03:00
build.d: fix range violation with HOST_DMD from environment
A regression introduced in #11671
This commit is contained in:
parent
5d73c08219
commit
9e790bcbb9
1 changed files with 5 additions and 1 deletions
|
@ -1004,11 +1004,15 @@ void parseEnvironment()
|
|||
mkdirRecurse(g);
|
||||
env.setDefault("TOOLS_DIR", dmdRepo.dirName.buildPath("tools"));
|
||||
|
||||
if (env.getDefault("HOST_DMD", null).length == 0)
|
||||
auto hostDmdDef = env.getDefault("HOST_DMD", null);
|
||||
if (hostDmdDef.length == 0)
|
||||
{
|
||||
const hostDmd = env.getDefault("HOST_DC", null);
|
||||
env["HOST_DMD"] = hostDmd.length ? hostDmd : "dmd";
|
||||
}
|
||||
else
|
||||
// HOST_DMD may be defined in the environment
|
||||
env["HOST_DMD"] = hostDmdDef;
|
||||
|
||||
// Auto-bootstrapping of a specific host compiler
|
||||
if (env.getNumberedBool("AUTO_BOOTSTRAP"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue