Am Donnerstag, 18. April 2019, 18:47:07 CEST schrieb Jean-Marc Lasgouttes: > Le 18/04/2019 à 18:34, Pavel Sanda a écrit : > > On Thu, Apr 18, 2019 at 05:05:30PM +0200, Jean-Marc Lasgouttes wrote: > >> Le 18/04/2019 ?? 16:54, Pavel Sanda a écrit : > >>> It used to be that LTO could quite increase linking time, is there some > >>> visible compil time difference for lyx? > >> > >> Yes, the link time is longer, but it seems that one can use -flto=4 to use > >> 4 CPUS. > >> > >> For reference, the configure line I used was: > >> ../master/configure --enable-build-type=rel --with-version-suffix=-master > >> CXX='g++ -flto' AR='gcc-ar' RANLIB=gcc-ranlib LD='g++ -flto' > >> > >> I could try to include that in configure (and test it with clang too). > > > > I am excited to see how this flies on my 10y old laptop. > > If no other mail comes it means I got swapped to death :) > > I guess that memory is the difficult point. > > JMarc >
I tried to add the options to CMake build. I don't see any difference in lyx-behavior, apart from the size of executables. Other difference to the automake are the supplied flags to gcc (compile and link time), namely "-flto -fno-fat-lto-objects". The needed set of cmake variables are: 1.) cmake_minimum_required(VERSION 3.9) are we ready for that? 3.9 was released July 2017 2.) cmake_policy(SET CMP0069 NEW) This policy started with version 3.8, it enables the use of 3.) 3.) set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) This enables the optimization for compilers which support it. (Clang for instance does not belong to this set) Kornel
signature.asc
Description: This is a digitally signed message part.