@@ -105,6 +105,38 @@ jobs:
105105 xlings install xim:qemu-riscv -y
106106 XLINGS_HOME="$HOME/.mcpp/registry" xlings install xim:qemu-riscv -y
107107
108+ # ⚠️ THE BUILD TOOL IS BUILT FROM A BRANCH, AND THAT IS TEMPORARY.
109+ #
110+ # This step needs four decisions that no released mcpp makes yet, each of
111+ # which belongs to the tool rather than to this package:
112+ #
113+ # `import std` is gated on whether a package PROVIDES a standard
114+ # library for the target rather than on whether the target is
115+ # freestanding; a package may carry its own std module source;
116+ # `-fno-exceptions` / `-fno-rtti` / `-ffreestanding` come off when the
117+ # graph supplies a C++ runtime built for the target; and unwind tables
118+ # go on, because the compiler turns them off for this kind of target
119+ # and a partial set of tables stops the walk rather than degrading it.
120+ #
121+ # They are on mcpp-community/mcpp#486. Until that is released this job
122+ # builds the tool the same way every other dependency here is taken —
123+ # from the branch — so the criterion below is actually enforced instead
124+ # of being a comment saying it was verified once on a laptop.
125+ #
126+ # ⇒ When #486 ships, delete this step and raise MCPP_VERSION.
127+ - name : The build tool, from the branch that has what this needs
128+ if : matrix.toolchain == 'llvm@22.1.8'
129+ run : |
130+ set -euo pipefail
131+ git clone --depth 1 -b feat/import-std-capability \
132+ https://github.com/mcpp-community/mcpp "$RUNNER_TEMP/mcpp-src"
133+ cd "$RUNNER_TEMP/mcpp-src"
134+ mcpp build --release
135+ BUILT=$(find target -type f -name mcpp -perm -u+x | head -1)
136+ [ -n "$BUILT" ] || { echo "::error::mcpp did not build"; exit 1; }
137+ echo "$(cd "$(dirname "$BUILT")" && pwd)" >> "$GITHUB_PATH"
138+ "$BUILT" --version
139+
108140 - name : The same program on bare metal, with exceptions
109141 if : matrix.toolchain == 'llvm@22.1.8'
110142 run : |
0 commit comments