Skip to content
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

Drop support for legacy PM with LLVM 15 #96215

Merged
merged 6 commits into from
Apr 25, 2022
Merged

Conversation

nikic
Copy link
Contributor

@nikic nikic commented Apr 19, 2022

LLVM 15 already removes some of the legacy PM APIs we're using. This patch forces use of NewPM with LLVM 15 (with -Z new-llvm-pass-manager=no throwing a warning) and stubs out various FFI methods with a report_fatal_error on LLVM 15.

For LLVMPassManagerBuilderPopulateLTOPassManager() I went with adding our own wrapper, as the alternative would be to muck about with weak symbols, which seems to be non-trivial as far as cross-platform support is concerned (std has weak! for this purpose, but only as an internal utility.)

Fixes #96072.
Fixes #96362.

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Apr 19, 2022
@rust-highfive
Copy link
Collaborator

r? @jackh726

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Apr 19, 2022
luqmana added a commit to luqmana/rust that referenced this pull request Apr 20, 2022
@nikic nikic force-pushed the legacy-pm-removal branch from 03fca98 to 6dc0bcc Compare April 20, 2022 07:43
@jackh726
Copy link
Member

r? @nagisa (maybe?)

@nagisa
Copy link
Member

nagisa commented Apr 24, 2022

@bors r+

Seems clunky, but I think we can live with the clunk for the time being.

@bors
Copy link
Contributor

bors commented Apr 24, 2022

📌 Commit 6dc0bcc has been approved by nagisa

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 24, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Apr 24, 2022
…askrgr

Rollup of 6 pull requests

Successful merges:

 - rust-lang#95395 (Better error message for `_` in function signature in `impl Trait for Ty`)
 - rust-lang#96090 (Implement MIR opt unit tests)
 - rust-lang#96107 ([test] Add test cases for untested functions for VecDeque)
 - rust-lang#96212 (Use revisions instead of nll compare mode for `/regions/` ui tests)
 - rust-lang#96215 (Drop support for legacy PM with LLVM 15)
 - rust-lang#96366 (bootstrap: Remove dead code in rustdoc shim)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 433f1f4 into rust-lang:master Apr 25, 2022
@rustbot rustbot added this to the 1.62.0 milestone Apr 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

fix rustc build with llvm head Drop support for legacy PM with LLVM 15
8 participants