Add LTO support
Added -DENABLE_LTO=ON/OFF cmake option, OFF by default. LTO speeds up cpu-intensive workloads by up to 20% (see [1] and [2]). Requirements to enable LTO: - cmake >= 3.9; - Linux: ld.bfd / ld.gold from binutils >= 2.31 (or later 2.30) (gold >= 1.15); - Mac OS: xcode >= 8 (earlier versions are not tested). The requirement of the recent ld version is due to bug with exporting symbols from dynamic list when LTO is enabled, see [3]. Note: -Wlto-type-mismatch on GCC (enabled by default with -flto) gives namy warnings. Filed [4] to investigate it. Note: LuaJIT will be compiled w/o LTO despite the option set, filed [5]. [1]: https://github.com/tarantool/tarantool/wiki/performance-research [2]: https://gist.github.com/Khatskevich/31a2da6ab46ce903120e7a03d65966db [3]: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=84901 [4]: https://github.com/tarantool/tarantool/issues/3742 [5]: https://github.com/tarantool/tarantool/issues/3743 Closes #3117 f
Loading
Please register or sign in to comment