-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Add missing target-abi
to cross-lang llvm lto bitcode
#123400
Conversation
When `linker_plugin_lto` enabled, we need to add `target-abi` to the generated llvm bitcode, otherwise there may be an error like "cannot link object files with different floating-point ABI".
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @compiler-errors (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
target-abi
to corss-lang llvm lto bitcodetarget-abi
to cross-lang llvm lto bitcode
r? @wesleywiser or @cuviper perhaps? |
r? @cuviper |
Is there a test we can add for this? For most targets, this will be an empty string, and we already set it when creating the target machine. I'm surprised that this would need to be repeated in module options, and I can only find one place where clang does this, only on RISC-V: @rust-lang/wg-llvm, anyone else have a better idea of expectations here? |
I'd like to first see a specific error log if adding a test case is challenging. |
It looks like another PR for the same issue with a test has been opened here: #123612 |
Thanks. close in flavor of #123612 |
When
linker_plugin_lto
enabled, we need to addtarget-abi
to the generated llvm bitcode, otherwise there may be an error like "cannot link object files with different floating-point ABI".