Trouble compiling with ThinLTO #3750
Unanswered
SaberToothKnaw
asked this question in
Q&A
Replies: 1 comment
-
|
Could this be a GNU ld bug, https://sourceware.org/bugzilla/show_bug.cgi?id=32153? It’s supposed to be fixed in binutils 2.44, but I’ve seen a very similar message in very similar circumstances with 2.44 on NixOS. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to compile Filament and its samples on and for Ubuntu 20.04 with LTO enabled. I can compile the artifacts using Clang 7 with no issues, but when enabling LTO I get strange linker errors. Furthermore, when I edit the cmake-generated build.ninja file to use -flto=full instead of -flto=thin, compilation succeeds. Could I get a heads-up on if I'm doing something wrong or if this is a filament build system issue? Thanks.
Here are my steps:
full ninja output log of the above:
filament_thinlto_compile.txt
but in short, cntrl-f "error:", and around line 836 I get multiple linker errors like so:
Using LTO appears to have an effect, as build artifacts are a few hundred KBs smaller and linking takes forever, relative to non-LTO release builds with the same flags otherwise. I got the same results using Clang 10 instead of Clang 7 as well. Thanks in advance for comments.
Beta Was this translation helpful? Give feedback.
All reactions