Commit c1bb79eb

c1bb79ebe898Merged

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

Description

build: add -Werror to test / bench compile to prevent warning regressions

Now that every test and benchmark compiles cleanly, promote warnings to errors in the harness CC invocations. Any future codegen change that reintroduces a warning on a test/bench target will surface as ERR: in the harness output rather than silently regressing.

Bootstrap stages keep the original flags (no -Werror) so that a first-time contributor's build still succeeds if their toolchain version emits warnings we haven't seen locally.

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

Details

Commit
c1bb79ebe898
Parent
33785ae0404b

MakefilemodifiedView file

@@ -129,7 +129,7 @@
129129 bn=$$(basename "$$f" .rb); \
130130 ./spinel_parse "$$f" /tmp/_sp_t.ast 2>/dev/null && \
131131 ./spinel_codegen /tmp/_sp_t.ast /tmp/_sp_t.c 2>/dev/null && \
132- $(CC) $(CFLAGS) $(SEC_FLAGS) -Ilib /tmp/_sp_t.c $(SP_RT_LIB) -lm $(GC_FLAGS) -o /tmp/_sp_t_bin 2>/dev/null; \
132+ $(CC) $(CFLAGS) -Werror $(SEC_FLAGS) -Ilib /tmp/_sp_t.c $(SP_RT_LIB) -lm $(GC_FLAGS) -o /tmp/_sp_t_bin 2>/dev/null; \
133133 if [ $$? -eq 0 ]; then \
134134 expected=$$(timeout 10 ruby "$$f" 2>/dev/null); \
135135 actual=$$(timeout 10 /tmp/_sp_t_bin 2>/dev/null); \
@@ -152,7 +152,7 @@
152152 bn=$$(basename "$$f" .rb); \
153153 timeout 10 ./spinel_parse "$$f" /tmp/_sp_b.ast 2>/dev/null && \
154154 timeout 10 ./spinel_codegen /tmp/_sp_b.ast /tmp/_sp_b.c 2>/dev/null && \
155- $(CC) $(CFLAGS) $(SEC_FLAGS) -Ilib /tmp/_sp_b.c $(SP_RT_LIB) -lm $(GC_FLAGS) -o /tmp/_sp_b_bin 2>/dev/null; \
155+ $(CC) $(CFLAGS) -Werror $(SEC_FLAGS) -Ilib /tmp/_sp_b.c $(SP_RT_LIB) -lm $(GC_FLAGS) -o /tmp/_sp_b_bin 2>/dev/null; \
156156 if [ $$? -eq 0 ]; then \
157157 expected=$$(timeout 60 ruby "$$f" 2>/dev/null); \
158158 ruby_rc=$$?; \