From 39fce8d0a5a6d91923e532a62ad2e6e4e26bdae7 Mon Sep 17 00:00:00 2001 From: Robin Haberkorn Date: Thu, 11 Feb 2016 14:40:27 +0100 Subject: pass user/maintainer provided CXXFLAGS to the Scintilla build process * Usually, Scintilla will now be built with -O2 * this can improve performance significantly over the standard Scintilla -Os (up to 10%). * this also allows link-time-optimizing both Scintilla and SciTECO (which are linked statically) by adding -flto to CFLAGS, CXXFLAGS and LDFLAGS. Link-time-optimization will both reduce the total binary size and improve performance slightly since scintilla_send_message() can be inlined. An -O3 optimized Scintilla when linked with LTO results in an only 300kb larger SciTECO binary. * the highest possible optimization thus requires the following maintainer flags on the ./configure command line: CFLAGS="-O3 -mtune=native -march=native -flto" CXXFLAGS="-O3 -mtune=native -march=native -flto" LDFLAGS="-flto" * Windows and Debian builds use link-time-optimization now. On Windows - where we link in everything statically - building the dependant libraries with -flto could improve performance even more. * Debian builds respect the default hardening flags of the build server now. This should ensure that SciTECO is built for the correct architecture at the recommended optimization level etc. --- distribute | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'distribute') diff --git a/distribute b/distribute index 24f9494..d8304dc 100755 --- a/distribute +++ b/distribute @@ -111,7 +111,8 @@ sciteco-$(SCITECO_VERSION)-win32.zip : $(SCITECO_SRC) --with-interface=$(MINGW_UI) \ --disable-bootstrap \ --enable-html-manual \ - CFLAGS="-g -O3" CXXFLAGS="-g -O3"; \ + CFLAGS="-g -O3 -flto" CXXFLAGS="-g -O3 -flto"; \ + LDFLAGS="-flto" \ ) $(MAKE) -C sciteco-$(SCITECO_VERSION) \ install-strip DESTDIR=`pwd`/temp-install -- cgit v1.2.3