Skip to content

Commit

Permalink
Don't rebuild build.d for PGO builds
Browse files Browse the repository at this point in the history
And don't assume the current working dir is the DMD repo.
  • Loading branch information
kinke authored and dlang-bot committed May 6, 2022
1 parent 2d6b526 commit 7151290
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/build.d
Original file line number Diff line number Diff line change
Expand Up @@ -601,10 +601,10 @@ alias dmdPGO = makeRule!((builder, rule) {
.condition(() => PGOState.checkPGO(dmdKind))
.deps([finalDataMerge])
.commandFunction({
auto addArgs = pgoState.pgoUseFlags ~ "-wi";
auto cmd = [env["HOST_DMD_RUN"], "-run", "src/build.d", "ENABLE_RELEASE=1",
"ENABLE_LTO=1",
"DFLAGS="~joiner(addArgs, " ").to!string, "--force", "-j"~jobs.to!string];
const extraFlags = pgoState.pgoUseFlags ~ "-wi";
const scope cmd = [thisExePath, "HOST_DMD="~env["HOST_DMD_RUN"],
"ENABLE_RELEASE=1", "ENABLE_LTO=1", "DFLAGS="~extraFlags.join(" "),
"--force", "-j"~jobs.to!string];
log("%-(%s %)", cmd);
if (spawnProcess(cmd, null, Config.init).wait())
abortBuild("PGO Compilation failed");
Expand Down

0 comments on commit 7151290

Please sign in to comment.