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