Skip to content

Commit d8fc972

Browse files
committed
fix(bench): two CI regressions from the pinning work — macOS toolchain and the submodule guard
CI 抓到的两条,都是我这批改动引入的: **1. macOS/Windows 的 fixture 请不到编译器。** 我把 `emit_mcpp` 里显式的 `macos = "llvm@22.1.8"` / `windows = "llvm@20.1.7"` 覆盖换成了单个 `default = mcpp_pin(compiler)`,而 `--compiler default` 在非 clang 请求下返回 `gcc@16.1.0` —— macOS 的 registry 里根本没有 gcc 载荷(matrix.json 的 excluded 里正是这么写的),于是 230_bench_harness 在 macOS 上挂在 error: toolchain 'gcc@16.1.0': package 'xim:gcc@16.1.0' not found **宿主是这个决策的一部分**。收敛成一个 `resolves_to_clang()`,`mcpp_pin` 和 `payload_cxx` 都读它,这样「告诉 mcpp 用哪个工具链」和「交给其他引擎的驱动」 不可能指向不同的族。 **2. 233 在所有 e2e job 上红。** 新加的「hub/body 必须在钉住的树里存在」断言, 遇到**声明了但没 checkout 的子模块**时报的是「文件不存在」——而只有 bench workflow 会 checkout 子模块。用 `mcpp.toml` 作为「已初始化」的标记区分两者: 没初始化就大声跳过并点名,不是失败。 同时把 233 加进 bench workflow 的 plan job(它 checkout 子模块)—— 否则这条 断言在 CI 里一次都不会真正执行,而它正是用来抓 `--hub src/xlings.cppm` 那种 「指向几个月前就没了的文件」的。
1 parent 8654445 commit d8fc972

14 files changed

Lines changed: 9039 additions & 8 deletions

File tree

.github/workflows/bench.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,19 @@ jobs:
114114
reference_mcpp: ${{ steps.plan.outputs.reference_mcpp }}
115115
baseline: ${{ steps.plan.outputs.baseline }}
116116
steps:
117+
# submodules, because the guard below checks that every cell's `hub` and
118+
# `body` still EXIST in the pinned workload — the assertion that would
119+
# have caught `--hub src/xlings.cppm` naming a file that had been gone for
120+
# months. This is the only workflow that checks them out, so it is the
121+
# only place that assertion can run.
117122
- uses: actions/checkout@v4
123+
with:
124+
submodules: true
125+
126+
- name: Check the matrix against the harness and the pinned workloads
127+
shell: bash
128+
run: bash tests/e2e/233_bench_matrix.sh
129+
118130
- id: plan
119131
shell: bash
120132
run: |
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
recheck = false,
3+
options = {
4+
builddir = "/home/speak/workspace/github/mcpp-community/mcpp/bench/projects/mcpp/mcpp-2026.8.11.3/build",
5+
mode = "release"
6+
},
7+
mtimes = {
8+
["xmake.lua"] = 1786600374,
9+
["../common/xmake/payload.lua"] = 1786590977
10+
}
11+
}

bench/projects/mcpp/.xmake/linux/x86_64/cache/cxxmodules

Lines changed: 8498 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 280 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,280 @@
1+
{
2+
["core.tools.gcc.has_cflags"] = {
3+
["/home/speak/.mcpp/registry/data/xpkgs/xim-x-gcc/16.1.0/bin/g++_"] = {
4+
["-B"] = true,
5+
["-time"] = true,
6+
["-pie"] = true,
7+
["-print-multi-directory"] = true,
8+
["-print-multi-os-directory"] = true,
9+
["-x"] = true,
10+
["-S"] = true,
11+
["-o"] = true,
12+
["-print-sysroot"] = true,
13+
["--target-help"] = true,
14+
["-c"] = true,
15+
["-no-canonical-prefixes"] = true,
16+
["-pass-exit-codes"] = true,
17+
["-Xlinker"] = true,
18+
["-save-temps"] = true,
19+
["-Xpreprocessor"] = true,
20+
["-E"] = true,
21+
["-print-multi-lib"] = true,
22+
["-pipe"] = true,
23+
["--help"] = true,
24+
["-print-search-dirs"] = true,
25+
["-print-multiarch"] = true,
26+
["-dumpspecs"] = true,
27+
["-print-libgcc-file-name"] = true,
28+
["--version"] = true,
29+
["-dumpversion"] = true,
30+
["-dumpmachine"] = true,
31+
["--param"] = true,
32+
["-print-sysroot-headers-suffix"] = true,
33+
["-v"] = true,
34+
["-Xassembler"] = true,
35+
["-shared"] = true
36+
}
37+
},
38+
find_program_modules_support_gcc_gxx = {
39+
["/home/speak/.mcpp/registry/data/xpkgs/xim-x-gcc/16.1.0/bin/g++"] = "/home/speak/.mcpp/registry/data/xpkgs/xim-x-gcc/16.1.0/bin/g++"
40+
},
41+
["find_program_mcpp-gcc_arch_x86_64_plat_linux_checktoolcxx"] = {
42+
["/home/speak/.mcpp/registry/data/xpkgs/xim-x-gcc/16.1.0/bin/g++"] = "/home/speak/.mcpp/registry/data/xpkgs/xim-x-gcc/16.1.0/bin/g++"
43+
},
44+
["lib.detect.has_flags"] = {
45+
["linux_x86_64_/home/speak/.mcpp/registry/data/xpkgs/xim-x-gcc/16.1.0/bin/g++__ld__-B/home/speak/.mcpp/registry/data/xpkgs/xim-x-binutils/2.42/bin --sysroot=/home/speak/.mcpp/registry/subos/default -B/home/speak/.mcpp/registry/data/xpkgs/xim-x-binutils/2.42/bin --sysroot=/home/speak/.mcpp/registry/subos/default_-fPIC"] = true,
46+
["linux_x86_64_/home/speak/.mcpp/registry/data/xpkgs/xim-x-gcc/16.1.0/bin/g++__cxx_cxxflags_-B/home/speak/.mcpp/registry/data/xpkgs/xim-x-binutils/2.42/bin --sysroot=/home/speak/.mcpp/registry/subos/default_gcc_deps_format"] = true,
47+
["linux_x86_64_/home/speak/.mcpp/registry/data/xpkgs/xim-x-gcc/16.1.0/bin/g++__cxx_cxflags_-B/home/speak/.mcpp/registry/data/xpkgs/xim-x-binutils/2.42/bin --sysroot=/home/speak/.mcpp/registry/subos/default_-MMD -MF"] = true,
48+
["linux_x86_64_/home/speak/.mcpp/registry/data/xpkgs/xim-x-gcc/16.1.0/bin/g++__cxx__-B/home/speak/.mcpp/registry/data/xpkgs/xim-x-binutils/2.42/bin --sysroot=/home/speak/.mcpp/registry/subos/default_-O3"] = true,
49+
["linux_x86_64_/home/speak/.mcpp/registry/data/xpkgs/xim-x-gcc/16.1.0/bin/g++__cxx_cxxflags_-B/home/speak/.mcpp/registry/data/xpkgs/xim-x-binutils/2.42/bin --sysroot=/home/speak/.mcpp/registry/subos/default_gcc_deps_output"] = true,
50+
["linux_x86_64_/home/speak/.mcpp/registry/data/xpkgs/xim-x-gcc/16.1.0/bin/g++__cxx_cxflags_-B/home/speak/.mcpp/registry/data/xpkgs/xim-x-binutils/2.42/bin --sysroot=/home/speak/.mcpp/registry/subos/default_-fvisibility-inlines-hidden"] = true,
51+
["linux_x86_64_/home/speak/.mcpp/registry/data/xpkgs/xim-x-gcc/16.1.0/bin/g++__cxx_cxflags_-B/home/speak/.mcpp/registry/data/xpkgs/xim-x-binutils/2.42/bin --sysroot=/home/speak/.mcpp/registry/subos/default_-std=c++23"] = true,
52+
["linux_x86_64_/home/speak/.mcpp/registry/data/xpkgs/xim-x-gcc/16.1.0/bin/g++__cxx_cxxflags_-B/home/speak/.mcpp/registry/data/xpkgs/xim-x-binutils/2.42/bin --sysroot=/home/speak/.mcpp/registry/subos/default_gcc_module_only"] = true,
53+
["linux_x86_64_/home/speak/.mcpp/registry/data/xpkgs/xim-x-gcc/16.1.0/bin/g++__cxx_cxflags_-B/home/speak/.mcpp/registry/data/xpkgs/xim-x-binutils/2.42/bin --sysroot=/home/speak/.mcpp/registry/subos/default_-DNDEBUG"] = true,
54+
["linux_x86_64_/home/speak/.mcpp/registry/data/xpkgs/xim-x-gcc/16.1.0/bin/g++__cxx_cxxflags_-B/home/speak/.mcpp/registry/data/xpkgs/xim-x-binutils/2.42/bin --sysroot=/home/speak/.mcpp/registry/subos/default_gcc_module_mapper"] = true,
55+
["linux_x86_64_/home/speak/.mcpp/registry/data/xpkgs/xim-x-gcc/16.1.0/bin/g++__cxx_cxxflags_-B/home/speak/.mcpp/registry/data/xpkgs/xim-x-binutils/2.42/bin --sysroot=/home/speak/.mcpp/registry/subos/default_gcc_modules"] = true,
56+
["linux_x86_64_/home/speak/.mcpp/registry/data/xpkgs/xim-x-gcc/16.1.0/bin/g++__cxx_cxxflags_-B/home/speak/.mcpp/registry/data/xpkgs/xim-x-binutils/2.42/bin --sysroot=/home/speak/.mcpp/registry/subos/default_-D_GLIBCXX_USE_CXX11_ABI=1"] = true,
57+
["linux_x86_64_/home/speak/.mcpp/registry/data/xpkgs/xim-x-gcc/16.1.0/bin/g++__cxx__-B/home/speak/.mcpp/registry/data/xpkgs/xim-x-binutils/2.42/bin --sysroot=/home/speak/.mcpp/registry/subos/default_-fPIC"] = true,
58+
["linux_x86_64_/home/speak/.mcpp/registry/data/xpkgs/xim-x-gcc/16.1.0/bin/g++__cxx_cxxflags_-B/home/speak/.mcpp/registry/data/xpkgs/xim-x-binutils/2.42/bin --sysroot=/home/speak/.mcpp/registry/subos/default_gcc_deps_file"] = true
59+
},
60+
["find_program_mcpp-gcc_arch_x86_64_plat_linux_checktoolld"] = {
61+
["/home/speak/.mcpp/registry/data/xpkgs/xim-x-gcc/16.1.0/bin/g++"] = "/home/speak/.mcpp/registry/data/xpkgs/xim-x-gcc/16.1.0/bin/g++"
62+
},
63+
find_programver_modules_support_gcc_gxx = {
64+
["/home/speak/.mcpp/registry/data/xpkgs/xim-x-gcc/16.1.0/bin/g++"] = "16.1.0"
65+
},
66+
["core.tools.gcc.has_ldflags"] = {
67+
["/home/speak/.mcpp/registry/data/xpkgs/xim-x-gcc/16.1.0/bin/g++_"] = {
68+
["--defsym"] = true,
69+
["--no-warn-search-mismatch"] = true,
70+
["--warn-execstack"] = true,
71+
["-soname"] = true,
72+
["-T"] = true,
73+
["--format"] = true,
74+
["--no-warn-execstack"] = true,
75+
["--ld-generated-unwind-info"] = true,
76+
["--no-export-dynamic"] = true,
77+
["--no-gc-sections"] = true,
78+
["--check-sections"] = true,
79+
["--no-accept-unknown-input-arch"] = true,
80+
["--help"] = true,
81+
["--disable-new-dtags"] = true,
82+
["--eh-frame-hdr"] = true,
83+
["--gc-sections"] = true,
84+
["--sort-common"] = true,
85+
["--warn-unresolved-symbols"] = true,
86+
["--no-warnings"] = true,
87+
["--no-define-common"] = true,
88+
["-Ttext"] = true,
89+
["--relocatable"] = true,
90+
["--unique"] = true,
91+
["--mri-script"] = true,
92+
["--dynamic-list-cpp-typeinfo"] = true,
93+
["--print-map-discarded"] = true,
94+
["-e"] = true,
95+
["--strip-all"] = true,
96+
["--architecture"] = true,
97+
["--no-map-whole-files"] = true,
98+
["--library"] = true,
99+
["-L"] = true,
100+
["--require-defined"] = true,
101+
["-qmagic"] = true,
102+
["--no-undefined"] = true,
103+
["-rpath"] = true,
104+
["--stats"] = true,
105+
["-m"] = true,
106+
["-assert"] = true,
107+
["-V"] = true,
108+
["--warn-alternate-em"] = true,
109+
["--target-help"] = true,
110+
["--gpsize"] = true,
111+
["--no-check-sections"] = true,
112+
["--no-print-map-locals"] = true,
113+
["-EB"] = true,
114+
["-flto"] = true,
115+
["--omagic"] = true,
116+
["-Qy"] = true,
117+
["-G"] = true,
118+
["--error-unresolved-symbols"] = true,
119+
["--default-symver"] = true,
120+
["--no-relax"] = true,
121+
["-plugin-opt"] = true,
122+
["-Tldata-segment"] = true,
123+
["--no-error-rwx-segments"] = true,
124+
["--accept-unknown-input-arch"] = true,
125+
["--allow-multiple-definition"] = true,
126+
["-Tbss"] = true,
127+
["--dynamic-linker"] = true,
128+
["-no-pie"] = true,
129+
["--no-undefined-version"] = true,
130+
["--no-omagic"] = true,
131+
["--version-script"] = true,
132+
["--enable-linker-version"] = true,
133+
["--sort-section"] = true,
134+
["--no-strip-discarded"] = true,
135+
["--start-group"] = true,
136+
["-Bsymbolic"] = true,
137+
["-F"] = true,
138+
["--trace"] = true,
139+
["-dp"] = true,
140+
["--force-group-allocation"] = true,
141+
["--map-whole-files"] = true,
142+
["-nostdlib"] = true,
143+
["--print-map-locals"] = true,
144+
["-Tdata"] = true,
145+
["--warn-once"] = true,
146+
["-A"] = true,
147+
["--dynamic-list-cpp-new"] = true,
148+
["--discard-all"] = true,
149+
["--auxiliary"] = true,
150+
["--no-print-gc-sections"] = true,
151+
["--version-exports-section"] = true,
152+
["-Bgroup"] = true,
153+
["--enable-non-contiguous-regions"] = true,
154+
["--ctf-variables"] = true,
155+
["--demangle"] = true,
156+
["--dynamic-list"] = true,
157+
["--no-dynamic-linker"] = true,
158+
["--section-start"] = true,
159+
["--error-rwx-segments"] = true,
160+
["--default-script"] = true,
161+
["--reduce-memory-overheads"] = true,
162+
["--print-gc-sections"] = true,
163+
["--disable-linker-version"] = true,
164+
["--no-allow-shlib-undefined"] = true,
165+
["--end-group"] = true,
166+
["--remap-inputs"] = true,
167+
["-Map"] = true,
168+
["-I"] = true,
169+
["--warn-textrel"] = true,
170+
["--copy-dt-needed-entries"] = true,
171+
["-z"] = true,
172+
["--enable-non-contiguous-regions-warnings"] = true,
173+
["--dynamic-list-data"] = true,
174+
["--pop-state"] = true,
175+
["-o"] = true,
176+
["--no-ctf-variables"] = true,
177+
["--no-print-map-discarded"] = true,
178+
["--orphan-handling"] = true,
179+
["--as-needed"] = true,
180+
["-Y"] = true,
181+
["--verbose"] = true,
182+
["--discard-none"] = true,
183+
["--nmagic"] = true,
184+
["--gc-keep-exported"] = true,
185+
["--no-eh-frame-hdr"] = true,
186+
["-a"] = true,
187+
["--cref"] = true,
188+
["--print-output-format"] = true,
189+
["--fatal-warnings"] = true,
190+
["-Bno-symbolic"] = true,
191+
["-dT"] = true,
192+
["--script"] = true,
193+
["-init"] = true,
194+
["-Bshareable"] = true,
195+
["--no-fatal-warnings"] = true,
196+
["--just-symbols"] = true,
197+
["-EL"] = true,
198+
["--relax"] = true,
199+
["--export-dynamic-symbol-list"] = true,
200+
["--out-implib"] = true,
201+
["--default-imported-symver"] = true,
202+
["--discard-locals"] = true,
203+
["-rpath-link"] = true,
204+
["-y"] = true,
205+
["-static"] = true,
206+
["--entry"] = true,
207+
["-P"] = true,
208+
["-fini"] = true,
209+
["--split-by-reloc"] = true,
210+
["--filter"] = true,
211+
["--force-exe-suffix"] = true,
212+
["--pic-executable"] = true,
213+
["--no-whole-archive"] = true,
214+
["--whole-archive"] = true,
215+
["--remap-inputs-file"] = true,
216+
["--strip-debug"] = true,
217+
["--emit-relocs"] = true,
218+
["-g"] = true,
219+
["--spare-dynamic-tags"] = true,
220+
["-O"] = true,
221+
["-Ttext-segment"] = true,
222+
["-f"] = true,
223+
["--no-warn-rwx-segments"] = true,
224+
["--no-error-execstack"] = true,
225+
["-l"] = true,
226+
["--library-path"] = true,
227+
["--print-sysroot"] = true,
228+
["--error-handling-script"] = true,
229+
["--ignore-unresolved-symbol"] = true,
230+
["--version"] = true,
231+
["--warn-rwx-segments"] = true,
232+
["--wrap"] = true,
233+
["--dependency-file"] = true,
234+
["--print-memory-usage"] = true,
235+
["--no-copy-dt-needed-entries"] = true,
236+
["--print-map"] = true,
237+
["--trace-symbol"] = true,
238+
["-u"] = true,
239+
["--allow-shlib-undefined"] = true,
240+
["--no-keep-memory"] = true,
241+
["--oformat"] = true,
242+
["-b"] = true,
243+
["--strip-discarded"] = true,
244+
["-plugin"] = true,
245+
["--enable-new-dtags"] = true,
246+
["--warn-execstack-objects"] = true,
247+
["--export-dynamic-symbol"] = true,
248+
["-Bsymbolic-functions"] = true,
249+
["--no-warn-mismatch"] = true,
250+
["--retain-symbols-file"] = true,
251+
["-c"] = true,
252+
["-Ur"] = true,
253+
["-debug"] = true,
254+
["--undefined-version"] = true,
255+
["--warn-common"] = true,
256+
["-Trodata-segment"] = true,
257+
["--disable-multiple-abs-defs"] = true,
258+
["--task-link"] = true,
259+
["--undefined"] = true,
260+
["--warn-multiple-gp"] = true,
261+
["--error-execstack"] = true,
262+
["--export-dynamic"] = true,
263+
["-h"] = true,
264+
["--warn-section-align"] = true,
265+
["--traditional-format"] = true,
266+
["--push-state"] = true,
267+
["--split-by-file"] = true,
268+
["--no-as-needed"] = true,
269+
["-R"] = true,
270+
["--no-ld-generated-unwind-info"] = true,
271+
["--no-demangle"] = true,
272+
["--output"] = true
273+
}
274+
},
275+
find_program = {
276+
gcc = "/home/speak/workspace/github/mcpp-community/mcpp/.xlings/subos/_/bin/gcc",
277+
["/home/speak/.mcpp/registry/data/xpkgs/xim-x-gcc/16.1.0/bin/g++"] = "/home/speak/.mcpp/registry/data/xpkgs/xim-x-gcc/16.1.0/bin/g++",
278+
nim = false
279+
}
280+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
cmdlines = {
3+
"xmake build -P /home/speak/workspace/github/mcpp-community/mcpp/bench/projects/mcpp",
4+
"xmake f -y -P /home/speak/workspace/github/mcpp-community/mcpp/bench/projects/mcpp -m release -o /home/speak/workspace/github/mcpp-community/mcpp/bench/projects/mcpp/mcpp-2026.8.11.3/build",
5+
"xmake build -P /home/speak/workspace/github/mcpp-community/mcpp/bench/projects/mcpp",
6+
"xmake f -y -P /home/speak/workspace/github/mcpp-community/mcpp/bench/projects/mcpp -m release -o /home/speak/workspace/github/mcpp-community/mcpp/bench/projects/mcpp/mcpp-2026.8.11.3/build",
7+
"xmake build -P /home/speak/workspace/github/mcpp-community/mcpp/bench/projects/mcpp",
8+
"xmake f -y -P /home/speak/workspace/github/mcpp-community/mcpp/bench/projects/mcpp -m release -o /home/speak/workspace/github/mcpp-community/mcpp/bench/projects/mcpp/mcpp-2026.8.11.3/build",
9+
"xmake build -P /home/speak/workspace/github/mcpp-community/mcpp/bench/projects/mcpp"
10+
}
11+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
pin_payload = {
3+
default = true,
4+
__sourceinfo_default = { },
5+
__scriptdir = "/home/speak/workspace/github/mcpp-community/mcpp/bench/projects/mcpp",
6+
description = "Pin the hermetic mcpp toolchain payload (required for a fair benchmark)",
7+
showmenu = true,
8+
__sourceinfo_description = {
9+
["Pin the hermetic mcpp toolchain payload (required for a fair benchmark)"] = {
10+
line = 76,
11+
file = "./xmake.lua"
12+
}
13+
},
14+
__sourceinfo_showmenu = { }
15+
}
16+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ }
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
projectdir = "/home/speak/workspace/github/mcpp-community/mcpp/bench/projects/mcpp"
3+
}

0 commit comments

Comments
 (0)