From: Eric Wong Date: Mon, 13 Nov 2023 13:15:39 +0000 (+0000) Subject: xap_helper_cxx: use -pipe by default in CXXFLAGS X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09f486cfa17019ad742853e3158ae4a5f580180c;p=thirdparty%2Fpublic-inbox.git 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++. --- diff --git a/lib/PublicInbox/XapHelperCxx.pm b/lib/PublicInbox/XapHelperCxx.pm index 7aa524168..3afdd69ee 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;