Hi,
I’m trying to turn on LTO for our project that embeds v8. We utilize the tool chain that v8 downloads to make everything consistent. Out of the box the build didn’t work because the LTO support libraries on my system were LLVM-11. I hacked together a prototype that turns on LTO and we see an about 10% performance benefit on synthetic benchmarks so it’s compelling.
However, to enable that I needed to side load the LLVMgold, libLLVM, and libLTO libraries from Arch into the lib/ folder of the downloaded tool chain (+ libstdc++6 because the rpath in libLLVM had a relative path I think).
I’m wondering if there’s a way to alter the package to grab those libraries when the tool chain is built or to generate a new package containing them for those looking to enable LTO support. Alternatively, I could build it by hand. My concern with that are that Chromium seems to track the tip of an LLVM release and will be version bumped at arbitrary points meaning it can be tricky to orchestrate that works correctly at all times. Similarly, if we don’t track as frequently I’m wondering if the LTO path is carefully managed to bump a version number on every incompatible change or just on “major” releases for safety (ie I can maybe live with broken builds but certainly not erroneous codegen).
Appreciate any tips/ solutions anyone has.
Thanks!