Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F153629510
D26751.id78489.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
954 B
Referenced Files
None
Subscribers
None
D26751.id78489.diff
View Options
Index: lib/googletest/tests/Makefile.inc
===================================================================
--- lib/googletest/tests/Makefile.inc
+++ lib/googletest/tests/Makefile.inc
@@ -4,3 +4,15 @@
# Keep the existing tests directory structure (with subdirs per component)
# 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
+# -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
+.if empty(DEBUG_FLAGS)
+MK_DEBUG_FILES:=no
+CFLAGS.clang+= -g0
+.endif
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 23, 11:43 AM (20 h, 6 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
32025153
Default Alt Text
D26751.id78489.diff (954 B)
Attached To
Mode
D26751: Significantly reduce compile time for googletest internal tests
Attached
Detach File
Event Timeline
Log In to Comment