Commit f9d127a
committed
fix(ci): Phase 6 — split target rustflags from build-script rustflags
The previous iteration of tier4-avx512-check set `RUSTFLAGS=
"-Ctarget-cpu=x86-64-v4"` as a job-level env. That env applies to BOTH
the target compilation AND host build scripts (`build.rs` artifacts
cargo runs natively). On a GH-hosted runner without AVX-512 silicon,
those v4-baked build scripts SIGILL during dep compilation — the job
exited in 23 s before our own crate even started compiling.
Fix: use `CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_RUSTFLAGS` (the env form
that's documented to apply only when cargo produces artifacts for that
triple, NOT to host build scripts) plus explicit `--target=x86_64-
unknown-linux-gnu` so cargo distinguishes host from target even when
they share the triple. Result: v4 reaches our crate, baseline reaches
build scripts.
Cargo doc reference: https://doc.rust-lang.org/cargo/reference/config.html
#target<triple>rustflags — "These flags only apply to the final
artifact, and won't affect dependencies."1 parent 45b1bfe commit f9d127a
1 file changed
Lines changed: 16 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
188 | | - | |
189 | | - | |
190 | | - | |
191 | | - | |
192 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
193 | 201 | | |
194 | 202 | | |
195 | 203 | | |
196 | | - | |
| 204 | + | |
197 | 205 | | |
198 | 206 | | |
199 | 207 | | |
200 | 208 | | |
201 | 209 | | |
202 | | - | |
| 210 | + | |
203 | 211 | | |
204 | | - | |
| 212 | + | |
205 | 213 | | |
206 | 214 | | |
207 | 215 | | |
| |||
0 commit comments