Commit 6739b7f
committed
fix(bench): the generated fixture needs the payload flags too, and a shim is not an engine
CI 上 fixture 的 cmake/xmake 全红,`cannot find crt1.o / crti.o / -lm`。
**我的公平性修复只做了一半。** `--compiler payload:gcc` 把 mcpp registry 里的
编译器交给了每个引擎,但**生成的** fixture 描述里没有任何 payload 接线 ——
`bench_hermetic_payload()` 只存在于 checked-in 的 bench/projects/ 里。一个裸的
registry gcc 不知道自己的汇编器、链接器和 libc 在哪,而 cmake 把这个报成
「编译器无法编译一个简单程序」,只字不提 sysroot。
`bench.toolchain::payload_flags()` 现在算出这些 flag,`emit_cmake` 在
**`project()` 之前**写入(cmake 的编译器探测就发生在 project() 里),
`emit_xmake` 通过 add_cxflags/add_ldflags 写入。gcc 拿 -B + --sysroot,
clang 拿显式的 libc++ include 链 —— 与 hermetic_payload.cmake 同一套判断,
注释里写明了「同一个决策在两处」以及为什么不能靠 include 一个绝对路径。
**另一条:xlings 的 shim 会替一个没装的程序回答。** 问它 `--version`,它打印
`[error] xlings: 'bazel' is not installed` 然后**退出 0**。照单全收就是
「present,版本 = 那句错误」,于是该引擎的每个格子都跑了、都失败了,并被记成
**对引擎的发现**,而不是「这台机器上没装」—— macOS 每个 job 18 个格子。
`probe_program` 现在把这种 banner 当作 absent。
本机验证:fixture 的 cmake/xmake modules cold 从「configure 失败」变成
4.29s / 3.07s。1 parent 674a462 commit 6739b7f
3 files changed
Lines changed: 118 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
131 | 131 | | |
132 | 132 | | |
133 | 133 | | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
134 | 147 | | |
135 | 148 | | |
136 | 149 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
65 | 74 | | |
66 | 75 | | |
67 | 76 | | |
| |||
102 | 111 | | |
103 | 112 | | |
104 | 113 | | |
105 | | - | |
| 114 | + | |
| 115 | + | |
106 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
107 | 122 | | |
108 | 123 | | |
109 | | - | |
110 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
111 | 132 | | |
112 | 133 | | |
113 | 134 | | |
| |||
128 | 149 | | |
129 | 150 | | |
130 | 151 | | |
131 | | - | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
132 | 155 | | |
133 | 156 | | |
134 | 157 | | |
| |||
150 | 173 | | |
151 | 174 | | |
152 | 175 | | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
153 | 184 | | |
154 | 185 | | |
155 | 186 | | |
| |||
206 | 237 | | |
207 | 238 | | |
208 | 239 | | |
209 | | - | |
210 | | - | |
| 240 | + | |
| 241 | + | |
211 | 242 | | |
212 | 243 | | |
213 | 244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
118 | 186 | | |
0 commit comments