Skip to content

Commit dae6a84

Browse files
committed
ci: 裸机那一步要的四个决定还没发布,所以从分支把工具建出来
这一步需要四个还没有任何已发布 mcpp 做出的决定,而它们都属于工具而不是本包: import std 的门问「有没有包为这个目标提供标准库」而不是「目标是不是 freestanding」;包可以带自己的 std 模块源;图里有为目标编译的 C++ 运行时时 -fno-exceptions/-fno-rtti/-ffreestanding 要摘掉;以及展开表要打开 —— 编译器为这类目标默认关掉它,而一套不完整的展开表不会降级,它会让走栈停住。 都在 mcpp-community/mcpp#486 上。在它发布之前,这个 job 用和这里每一个依赖 同样的方式把工具拿过来 —— 从分支 —— 这样下面那条判据是**真的在被执行**, 而不是一句「在某台笔记本上验过一次」的注释。 ⇒ #486 发布后,删掉这一步并抬高 MCPP_VERSION。
1 parent 69c4d57 commit dae6a84

1 file changed

Lines changed: 32 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)