Changeset View
Changeset View
Standalone View
Standalone View
lib/googletest/tests/Makefile.inc
# $FreeBSD$ | # $FreeBSD$ | ||||
.include "../Makefile.inc" | .include "../Makefile.inc" | ||||
# Keep the existing tests directory structure (with subdirs per component) | # Keep the existing tests directory structure (with subdirs per component) | ||||
# rather than installing all of them to /usr/tests/lib/googletest | # rather than installing all of them to /usr/tests/lib/googletest | ||||
TESTSDIR= ${TESTSBASE}/lib/googletest/${.CURDIR:T} | TESTSDIR= ${TESTSBASE}/lib/googletest/${.CURDIR:T} | ||||
# Clang's optimizer spends an really long time on these tests at -O2, so use -O1 | |||||
# instead. This reduces the -j32 time for lib/googletest/test from 131s to 71s. | |||||
# 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 -j32). | |||||
# TODO: -O0 reduces the time to 29s, so maybe we should default to that? | |||||
CFLAGS.clang+= -O1 | |||||
ngie: I'd add "At time of writing" to this statement and mention "amd64"/"arm64" for reference, given… | |||||
Done Inline Actionssounds good, will do. arichardson: sounds good, will do. | |||||
.if empty(DEBUG_FLAGS) | |||||
MK_DEBUG_FILES:=no | |||||
CFLAGS.clang+= -g0 | |||||
.endif | |||||
Not Done Inline ActionsWhat does -g0 do? I really wish the clang manpage/documentation was better about describing this like gcc's is. ngie: What does `-g0` do? I really wish the clang manpage/documentation was better about describing… | |||||
Done Inline Actions-g0 disables debug info (gcc-compatible flag). arichardson: -g0 disables debug info (gcc-compatible flag). |
I'd add "At time of writing" to this statement and mention "amd64"/"arm64" for reference, given that this might change in the future or fluctuate.