Commit c27a063c

c27a063c7115Merged

Yukihiro "Matz" Matsumoto <[email protected]> · 6 months ago · 1 file · ~1 modified

Description

build: prepend -Wno-unknown-warning-option for clang compatibility

83e0e09 added -Wno-alloc-size-larger-than to silence a gcc 13 paranoia warning, but clang doesn't recognise that flag and -Werror turns the resulting unknown warning option warning into a fatal error. The CI run on master after 83e0e09 went red on every clang job — ubuntu / clang and macos / clang both reported 0 pass, 0 fail, 221 error, every single test failed at the cc step before even running.

Prepend -Wno-unknown-warning-option to CFLAGS so clang silently ignores any -Wno- flag it doesn't know. Both gcc and clang accept this combination cleanly under -Werror; gcc still applies the alloc-size suppression where it matters.

After: ubuntu/gcc still reports its single Ruby-version failure (numbered_block_params); clang and macos jobs should return to mostly-green; windows-mingw retains its platform-specific failures. A skip mechanism for the remaining categories is the next step.

Co-Authored-By: Claude Opus 4.7 (1M context) [email protected]

Details

Commit
c27a063c7115
Parent
2b56524e2e0d

MakefilemodifiedView file

@@ -13,9 +13,11 @@
1313 # fires on the inlined `h->cap *= 2` in sp_*Hash_grow when the inliner
1414 # can't bound h->cap. The pattern is bounded in practice (cap doubles
1515 # from a small power of two until memory runs out, never approaches
16-# 2^60), but gcc tracks signed-overflow UB conservatively. Other
17-# compilers don't have the warning.
18-CFLAGS = -O2 -Wno-all -Wno-alloc-size-larger-than
16+# 2^60), but gcc tracks signed-overflow UB conservatively. Clang
17+# doesn't have that warning; without `-Wno-unknown-warning-option`
18+# first, clang would turn the unknown -Wno- into a -Werror failure on
19+# every cc invocation in `make test` / `make bench`.
20+CFLAGS = -O2 -Wno-all -Wno-unknown-warning-option -Wno-alloc-size-larger-than
1921 # Bootstrap-only flags: spinel_codegen runs on the developer's machine
2022 # only, so we can use -O3 -flto for ~5-10% extra wall-clock without
2123 # constraining users (whose generated C is built with plain CFLAGS).