[libcxx-commits] [libcxx] [libc++] Reduce the number of warnings when running SPEC (PR #160366)
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Tue Sep 23 11:50:18 PDT 2025
https://github.com/ldionne created https://github.com/llvm/llvm-project/pull/160366
Using -Wall and -Wextra when building SPEC leads to extremely large log files. Since we don't actually care about warnings in these benchmarks, this patches tones down the number of warnings a bit.
>From 33313ae0e2761d64e76990e914d1241f7b93aade Mon Sep 17 00:00:00 2001
From: Louis Dionne <ldionne.2 at gmail.com>
Date: Tue, 23 Sep 2025 11:57:04 -0400
Subject: [PATCH] [libc++] Reduce the number of warnings when running SPEC
Using -Wall and -Wextra when building SPEC leads to extremely large
log files. Since we don't actually care about warnings in these
benchmarks, this patches tones down the number of warnings a bit.
---
libcxx/test/benchmarks/spec.gen.py | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/libcxx/test/benchmarks/spec.gen.py b/libcxx/test/benchmarks/spec.gen.py
index ea7b75b3d2085..de7c14db5ad8e 100644
--- a/libcxx/test/benchmarks/spec.gen.py
+++ b/libcxx/test/benchmarks/spec.gen.py
@@ -28,6 +28,9 @@
link_flags = (test_dir / 'link_flags.subs').open().read().strip()
spec_dir = pathlib.Path((test_dir / 'spec_dir.subs').open().read().strip())
+# Remove -Wall, -Wextra and -Werror from the flags since we don't care about enabling all warnings inside SPEC
+compile_flags = compile_flags.replace('-Wall', '').replace('-Wextra', '').replace('-Werror', '')
+
# Setup the configuration file
test_dir.mkdir(parents=True, exist_ok=True)
spec_config = test_dir / 'spec-config.cfg'
@@ -46,7 +49,7 @@
copies = 1
threads = 1
CC = cc -O3
- CXX = {cxx} {compile_flags} {flags} {link_flags} -Wno-error
+ CXX = {cxx} {compile_flags} {flags} {link_flags}
CC_VERSION_OPTION = --version
CXX_VERSION_OPTION = --version
EXTRA_PORTABILITY = -DSPEC_NO_CXX17_SPECIAL_MATH_FUNCTIONS # because libc++ doesn't implement the special math functions yet
More information about the libcxx-commits
mailing list