-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Doesn't build with Clang on Linux #18
Comments
Hi, you need to use the 'gold' linker (http://llvm.org/docs/GoldPlugin.html) to use link time optimization with Clang. Maybe you are using plain LD? I prefer to have -flto in the build file by default as it leads to considerably smaller binaries. However, maybe support can be detected? I can't reproduce this here right now, so I am wondering if something like the following works for the CMakeLists.txt file? (in line 36)
Thanks, |
Actually, this would be even better:
Does that work for you? |
Yup, this works. Thanks. |
-flto
option prevents the example code from building on Linux with Clang (3.7). The problem is with the linker, it simply complains:Removing
-flto
fixes everything. Apparently, this is not an unusual issue with Clang.The text was updated successfully, but these errors were encountered: