xref: /freebsd/lib/googletest/tests/Makefile.inc (revision e9ac41698b2f322d55ccf9da50a3596edb2c1800)
12ed32360SAlex Richardson.include "../Makefile.inc"
22ed32360SAlex Richardson# Keep the existing tests directory structure (with subdirs per component)
32ed32360SAlex Richardson# rather than installing all of them to /usr/tests/lib/googletest
42ed32360SAlex RichardsonTESTSDIR=	${TESTSBASE}/lib/googletest/${.CURDIR:T}
5*433f33d2SAlex Richardson
6*433f33d2SAlex Richardson# Clang's optimizer spends a really long time on these tests at -O2. Changing
7*433f33d2SAlex Richardson# -O2 to -O1 reduces the -j32 time for lib/googletest/test from 131s to 71s.
8*433f33d2SAlex Richardson# Using -O0 further reduces the time to 29s, and also reduces the disk usage
9*433f33d2SAlex Richardson# from 144MB (at -O2) / 92MB (at -O1) to 82MB, so we use -O0.
10*433f33d2SAlex Richardson# Note: Building without debug info saves about 10-15% of the build time, so we
11*433f33d2SAlex Richardson# only enable debug info if DEBUG_FLAGS is not empty (71s -> 64s at -O1 and -j32).
12*433f33d2SAlex RichardsonCFLAGS.clang+=	-O0
13*433f33d2SAlex Richardson.if empty(DEBUG_FLAGS)
14*433f33d2SAlex RichardsonMK_DEBUG_FILES:=no
15*433f33d2SAlex RichardsonCFLAGS.clang+=	-g0
16*433f33d2SAlex Richardson.endif
17