From 09f486cfa17019ad742853e3158ae4a5f580180c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 13 Nov 2023 13:15:39 +0000 Subject: xap_helper_cxx: use -pipe by default in CXXFLAGS -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(-) (limited to 'lib/PublicInbox') 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; -- cgit v1.2.3-24-ge0c7