-
Notifications
You must be signed in to change notification settings - Fork 17
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
Docs on enabling LTO (-flto) with clang++ #22
Comments
Flagging: CMake's interprocedural optimization property does not enable lto on gcc and clang - it only does so for the Intel compiler. I ran into this some time ago since it looks fitting. Something to look out for. Related: maybe a note or two about how to check cxxflags and ldflags in CMake's generated files would be great for debugging - I think the files are called |
per mapbox/carmen-cache#117 (comment) also we need to ensure the same clang++ major version is used to compile all binaries and libraries" otherwise you'll see an error like:
|
node-cpp-skel now enables LTO by default: mapbox/node-cpp-skel#110 |
It seems that |
Getting Link Time optimization working takes certain combinations of modern tools and build settings. It would be great to have some general docs on this so that LTO is demystified and more commonly used.
Doc should cover:
Linux details
AR=/path/to/llvm-ar
RANLIB=/path/to/llvm-ranlib
)-flto
in the CXXFLAGSOS X details
-flto
in the CXXFLAGS and LDFLAGSTroubleshooting:
This error indicates that the linker does not understand the LTO format. This will happen on linux if you've not installed binutils from mason.
Refs mapbox/spatial-algorithms#10
The text was updated successfully, but these errors were encountered: