git: 73d67bc5545b - stable/14 - lib/googletest: also use -O0 for internal tests with GCC
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 14 Sep 2026 14:47:30 UTC
The branch stable/14 has been updated by siva:
URL: https://cgit.FreeBSD.org/src/commit/?id=73d67bc5545b7cf8c4ba6a0cd49430e5f97bbb05
commit 73d67bc5545b7cf8c4ba6a0cd49430e5f97bbb05
Author: Siva Mahadevan <siva@FreeBSD.org>
AuthorDate: 2026-09-12 18:29:02 +0000
Commit: Siva Mahadevan <siva@FreeBSD.org>
CommitDate: 2026-09-14 14:32:51 +0000
lib/googletest: also use -O0 for internal tests with GCC
This fixes the build with gcc 16's aggressive inlining.
Reviewed by: ngie
MFC after: 3 days
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D59538
(cherry picked from commit 243bdaff75853606ce477807e87e4fbcc1decfb1)
---
lib/googletest/tests/Makefile.inc | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/googletest/tests/Makefile.inc b/lib/googletest/tests/Makefile.inc
index 03ee799eb611..af525e54c1a4 100644
--- a/lib/googletest/tests/Makefile.inc
+++ b/lib/googletest/tests/Makefile.inc
@@ -4,14 +4,14 @@
# rather than installing all of them to /usr/tests/lib/googletest
TESTSDIR= ${TESTSBASE}/lib/googletest/${.CURDIR:T}
-# Clang's optimizer spends a really long time on these tests at -O2. Changing
+# Both GCC's and Clang's optimizer spends a really long time on these tests at -O2. Changing
# -O2 to -O1 reduces the -j32 time for lib/googletest/test from 131s to 71s.
# Using -O0 further reduces the time to 29s, and also reduces the disk usage
# from 144MB (at -O2) / 92MB (at -O1) to 82MB, so we use -O0.
# Note: Building without debug info saves about 10-15% of the build time, so we
# only enable debug info if DEBUG_FLAGS is not empty (71s -> 64s at -O1 and -j32).
-CFLAGS.clang+= -O0
+CFLAGS+= -O0
.if empty(DEBUG_FLAGS)
MK_DEBUG_FILES:=no
-CFLAGS.clang+= -g0
+CFLAGS+= -g0
.endif