Building Godot from Source Using LLVM's Version of LTO
I noticed that Godot's build system will attempt to correctly use LLVM's version of LTO if the
use_lto=yes option is specified when using LLVM/Clang to build.
I know the docs only mention using LTO when building with gcc, but since the build system recognizes and tries to use it correctly for LLVM/Clang, I figured it might work. I tried building using it out of curiosity to see how the build size and build time compared to the build size and time when using gcc. Unfortunately, I got an error during the final link phase and the build fails. This happens both with the master branch, and with the 3.2.1 stable branch.
Here's the command line I'm using:
scons -j12 platform=x11 target=release_debug use_lto=yes use_llvm=yes use_lld=yes
Is there something I'm doing wrong? Is anyone able to build Godot using LLVM with LTO? I'm using LLVM 10 if that matters.