Skip to content

Commit 7843a71

Browse files
committed
ci: fix fuzz and i686 multiarch jobs for boring 5
Two CI jobs broke after the boring 4 -> 5 upgrade because BoringSSL is now built by `boring-sys` rather than by `quiche/src/build.rs`, and a couple of flags we used to set in-tree need to be re-injected from outside the build. 1. fuzz (nightly): BoringSSL 5.x consolidated the older `BORINGSSL_UNSAFE_{DETERMINISTIC,FUZZER}_MODE` defines into a single `FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION` switch. 2. quiche_multiarch (i686-unknown-linux-gnu): BoringSSL's x86 assembly requires SSE2. `boring-sys` does set `-msse2` via `util/32-bit-toolchain.cmake`, but only when host != target; the `cross` `i686:edge` image is 32-bit-native, so that branch is skipped and the build fails with `x86 assembly requires SSE2`. Add a target-scoped `CFLAGS`/`CXXFLAGS` passthrough in `Cross.toml` so `-msse2 -mfpmath=sse` reaches BoringSSL's cmake build regardless.
1 parent 66ae999 commit 7843a71

2 files changed

Lines changed: 20 additions & 5 deletions

File tree

.github/workflows/nightly.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,12 +68,15 @@ jobs:
6868
# duplicate builds for PRs created from internal branches.
6969
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
7070
# `quiche-fuzz` calls `RAND_reset_for_fuzzing`, which BoringSSL only
71-
# exports when `BORINGSSL_UNSAFE_DETERMINISTIC_MODE` is defined.
72-
# `boring-sys` doesn't expose a feature for that, but cmake-rs honors
73-
# `CFLAGS`/`CXXFLAGS`, so inject the defines there.
71+
# exports when built with `FUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION`.
72+
# BoringSSL 5.x consolidated the older
73+
# `BORINGSSL_UNSAFE_{DETERMINISTIC,FUZZER}_MODE` defines into this
74+
# single switch. `boring-sys` doesn't expose a feature for it, but
75+
# cmake-rs (via cc-rs) honors `CFLAGS`/`CXXFLAGS`, so inject the
76+
# define there.
7477
env:
75-
CFLAGS: "-DBORINGSSL_UNSAFE_DETERMINISTIC_MODE -DBORINGSSL_UNSAFE_FUZZER_MODE"
76-
CXXFLAGS: "-DBORINGSSL_UNSAFE_DETERMINISTIC_MODE -DBORINGSSL_UNSAFE_FUZZER_MODE"
78+
CFLAGS: "-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION"
79+
CXXFLAGS: "-DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION"
7780
steps:
7881
- name: Checkout sources
7982
uses: actions/checkout@v4

Cross.toml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,3 +27,15 @@ pre-build = [
2727
"ln -sf /usr/bin/gcc /usr/local/bin/i686-linux-gnu-gcc",
2828
"ln -sf /usr/bin/g++ /usr/local/bin/i686-linux-gnu-g++",
2929
]
30+
31+
# BoringSSL's x86 assembly requires SSE2. `boring-sys`'s cmake build
32+
# doesn't add `-msse2` for i686 targets (its 32-bit-toolchain.cmake
33+
# sets it as a CACHE STRING, but cmake-rs's `-DCMAKE_C_FLAGS=...` on
34+
# the command line wins), so inject it via the target-scoped
35+
# `CFLAGS`/`CXXFLAGS` env vars. `cc-rs` (and through it, `cmake-rs`)
36+
# honors these and passes them along to BoringSSL's cmake build.
37+
[target.i686-unknown-linux-gnu.env]
38+
passthrough = [
39+
"CFLAGS_i686_unknown_linux_gnu=-msse2 -mfpmath=sse",
40+
"CXXFLAGS_i686_unknown_linux_gnu=-msse2 -mfpmath=sse",
41+
]

0 commit comments

Comments
 (0)