hopefully is this the right section for this purpose
is it possible to compile the palemoon binary for the linux tarball with lto?
palemoon will start faster and the binary will be a little smaller
i suppose GCC is used but it should be similar with CLANG and it's really simple to get binaries with lto by adding only two or three CFLAGS/CXXflags/CPPFLAGS
Code: Select all
CFLAGS="-flto=<onlineCPU> -fuse-linker-plugin" CXXFLAGS="-flto=<onlineCPU> -fuse-linker-plugin" CPPLAGS="-flto=<onlineCPU> -fuse-linker-plugin" LDFLAGS="-fuse-ld=gold"
This option runs the standard link-time optimizer. When invoked with source code, it generates GIMPLE (one of GCC’s internal representations) and writes it to special ELF sections in the object file. When the object files are linked together, all the function bodies are read from these ELF sections and instantiated as if they had been part of the same translation unit.
To use the link-time optimizer, -flto and optimization options should be specified at compile time and during the final link. It is recommended that you compile all the files participating in the same link with the same options and also specify those options at link time.
source for -flto and -fuse-linker-plugin: https://gcc.gnu.org/onlinedocs/gcc/Opti ... ze-Options-fuse-linker-plugin
Enables the use of a linker plugin during link-time optimization. This option relies on plugin support in the linker, which is available in gold or in GNU ld 2.21 or newer.
This option enables the extraction of object files with GIMPLE bytecode out of library archives. This improves the quality of optimization by exposing more code to the link-time optimizer. This information specifies what symbols can be accessed externally (by non-LTO object or during dynamic linking). Resulting code quality improvements on binaries (and shared libraries that use hidden visibility) are similar to -fwhole-program. See -flto for a description of the effect of this flag and how to use it.
This option is enabled by default when LTO support in GCC is enabled and GCC was configured for use with a linker supporting plugins (GNU ld 2.21 or newer or gold).
what do you think about?