-
Notifications
You must be signed in to change notification settings - Fork 58
Cross language plugin LTO panics #16
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
Comments
PS. Sorry I keep filing bugs with on you from weird new or seemingly half supported rustc flags. |
This might be the same as #17 - will need to investigate using the LLVM approach to constructors, possibly from C, and see what happens. |
Can you check to see if #19 fixed this? |
Yep, it does. Thanks, and sorry for the delay! |
@pquux Thank you for following up. 😄 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Cross language Link Time Optimization (LTO) is a nice feature where instead of compiling binary object files, we have clang create llvm bitcode which we link together and optimize when we generate an output binary. This is particularly useful for rust FFI cases, where we can compile a legacy C application and perform LTO when linking it with rust, thus hopefully removing some of the FFI overhead on hot codepaths.
More info can be found here and here
You can compile with:
This was tested on debian sid with rust nightly, clang-8 and lld-8 packages installed. Note that the clang and lld version unfortunately do need to match the rust llvm version.
The text was updated successfully, but these errors were encountered: