Skip to content

Commit 2fd68dd

Browse files
committed
fix: add bootstrapped mcpp to PATH for self-host dyndep step
mcpp build generates a build.ninja that calls `mcpp dyndep` — the bootstrapped binary must be on PATH for ninja to find it.
1 parent 4955291 commit 2fd68dd

2 files changed

Lines changed: 8 additions & 7 deletions

File tree

.github/workflows/ci-macos.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,9 +281,10 @@ jobs:
281281
282282
- name: Self-host (mcpp builds mcpp)
283283
run: |
284-
MCPP="./target/bootstrap/bin/mcpp"
285-
"$MCPP" build
286-
SELFHOST=$(find target -path "*/bin/mcpp" -not -path "*/bootstrap/*" | head -1)
284+
# Put bootstrapped mcpp on PATH so build.ninja can find it for dyndep
285+
export PATH="$PWD/target/bootstrap/bin:$PATH"
286+
mcpp build
287+
SELFHOST=$(find target -path "*/bin/mcpp" -not -path "*/bootstrap/*" -not -path "*/build/*" | head -1)
287288
test -x "$SELFHOST"
288289
"$SELFHOST" --version
289290
echo ":: Self-host successful!"

.github/workflows/release.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -326,11 +326,11 @@ jobs:
326326
327327
- name: Self-host rebuild (mcpp builds mcpp)
328328
run: |
329-
# Now use the bootstrapped mcpp to rebuild itself properly
330-
MCPP="./target/bootstrap/bin/mcpp"
331-
"$MCPP" build
329+
# Put bootstrapped mcpp on PATH so build.ninja can find it for dyndep
330+
export PATH="$PWD/target/bootstrap/bin:$PATH"
331+
mcpp build
332332
# Find the self-hosted binary
333-
SELFHOST=$(find target -path "*/bin/mcpp" -not -path "*/bootstrap/*" | head -1)
333+
SELFHOST=$(find target -path "*/bin/mcpp" -not -path "*/bootstrap/*" -not -path "*/build/*" | head -1)
334334
test -x "$SELFHOST"
335335
"$SELFHOST" --version
336336
echo "SELFHOST=$SELFHOST" >> "$GITHUB_ENV"

0 commit comments

Comments
 (0)