-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Use error-on-mismatch policy for PAuth module flags. #93269
Conversation
This agrees with Clang, and avoids an error when using LTO with mixed C/Rust. LLVM considers different behaviour flags to be a mismatch, even when the flag value itself is the same. This also makes the flag setting explicit for all uses of LLVMRustAddModuleFlag.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @petrochenkov (or someone else) soon. Please see the contribution instructions for more information. |
I'm not familiar with this code, but the changes all look reasonable, the existing @bors r+ |
📌 Commit e02e958 has been approved by |
…petrochenkov Use error-on-mismatch policy for PAuth module flags. This agrees with Clang, and avoids an error when using LTO with mixed C/Rust. LLVM considers different behaviour flags to be a mismatch, even when the flag value itself is the same. This also makes the flag setting explicit for all uses of LLVMRustAddModuleFlag. ---- I believe that this fixes rust-lang#92885, but have only reproduced it locally on Linux hosts so cannot confirm that it fixes the issue as reported. I have not included a test for this because it is covered by an existing test (`src/test/run-make-fulldeps/cross-lang-lto-clang`). It is not without its problems, though: * The test requires Clang and `--run-clang-based-tests-with=...` to run, and this is not the case on the CI. * Any test I add would have a similar requirement. * With this patch applied, the test gets further, but it still fails (for other reasons). I don't think that affects rust-lang#92885.
…askrgr Rollup of 8 pull requests Successful merges: - rust-lang#88794 (Add a `try_clone()` function to `OwnedFd`.) - rust-lang#93064 (Properly track `DepNode`s in trait evaluation provisional cache) - rust-lang#93118 (Move param count error emission to end of `check_argument_types`) - rust-lang#93144 (Work around missing code coverage data causing llvm-cov failures) - rust-lang#93169 (Fix inconsistency of local blanket impls) - rust-lang#93175 (Implement stable overlap check considering negative traits) - rust-lang#93251 (rustdoc settings: use radio buttons for theme) - rust-lang#93269 (Use error-on-mismatch policy for PAuth module flags.) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
nominating for beta-backport since #92885 is regression from stable-to-beta. |
This agrees with Clang, and avoids an error when using LTO with mixed
C/Rust. LLVM considers different behaviour flags to be a mismatch,
even when the flag value itself is the same.
This also makes the flag setting explicit for all uses of
LLVMRustAddModuleFlag.
I believe that this fixes #92885, but have only reproduced it locally on Linux hosts so cannot confirm that it fixes the issue as reported.
I have not included a test for this because it is covered by an existing test (
src/test/run-make-fulldeps/cross-lang-lto-clang
). It is not without its problems, though:--run-clang-based-tests-with=...
to run, and this is not the case on the CI.