-ggdb3 is already used for g++ and clang, and -pipe is supported by clang even if it's a no-op. So just use it to speed up g++ since it saves me 30-40ms.
We'll also get rid of the explicit `-O0' since it's the default for both clang and g++. --- lib/PublicInbox/XapHelperCxx.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/PublicInbox/XapHelperCxx.pm b/lib/PublicInbox/XapHelperCxx.pm index 7aa52416..3afdd69e 100644 --- a/lib/PublicInbox/XapHelperCxx.pm +++ b/lib/PublicInbox/XapHelperCxx.pm @@ -23,7 +23,7 @@ my @srcs = map { $srcpfx.$_ } qw(xap_helper.h); my @pm_dep = map { $srcpfx.$_ } qw(Search.pm CodeSearch.pm); my $ldflags = '-Wl,-O1'; $ldflags .= ' -Wl,--compress-debug-sections=zlib' if $^O ne 'openbsd'; -my $xflags = ($ENV{CXXFLAGS} // '-Wall -ggdb3 -O0') . ' ' . +my $xflags = ($ENV{CXXFLAGS} // '-Wall -ggdb3 -pipe') . ' ' . ' -DTHREADID=' . PublicInbox::Search::THREADID . ' ' . ($ENV{LDFLAGS} // $ldflags); my $xap_modversion;