-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Reduce special casing for the panic runtime #140809
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
base: master
Are you sure you want to change the base?
Conversation
rustbot has assigned @compiler-errors. Use |
Some changes occurred in compiler/rustc_codegen_ssa |
I was looking at making panic_abort and panic_unwind depend on libstd (#139103 (comment)). These changes make this easier, though is still blocked on the fact that when compiling libstd as dylib, panic_unwind already needs to be present. |
This comment has been minimized.
This comment has been minimized.
6d4613c
to
c7e8663
Compare
The Miri subtree was changed cc @rust-lang/miri |
This comment has been minimized.
This comment has been minimized.
c7e8663
to
93cf365
Compare
☔ The latest upstream changes (presumably #140176) made this pull request unmergeable. Please resolve the merge conflicts. |
93cf365
to
a9d5498
Compare
☔ The latest upstream changes (presumably #141024) made this pull request unmergeable. Please resolve the merge conflicts. |
d730005
to
7d0f158
Compare
☔ The latest upstream changes (presumably #141238) made this pull request unmergeable. Please resolve the merge conflicts. |
7d0f158
to
0dfacc7
Compare
☔ The latest upstream changes (presumably #141730) made this pull request unmergeable. Please resolve the merge conflicts. |
rustc_std_internal_symbol is meant to call functions from crates where there is no direct dependency on said crate. As they either have to be added to symbols.o or rustc has to introduce an implicit dependency on them to avoid linker errors. The latter is done for some things like the panic runtime, but adding these symbols to symbols.o allows removing those implicit dependencies.
This used to be necessary for a correct linker order, but ever since the introduction of symbols.o adding the symbols in question to symbols.o would work just as well. We do still add dependencies on the panic runtime to the local crate, but not for #![needs_panic_runtime] crates. This also removes the runtime-depends-on-needs-runtime test. inject_dependency_if used to emit this error, but with symbols.o it is no longer important that there is no dependency and in fact it may be nice to have panic_abort and panic_unwind directly depend on libstd in the future for calling std::process::abort().
You shouldn't ever need to explicitly depend on it. And we weren't checking that the panic runtime used the correct panic strategy either.
There is already panic-unwind to enable it.
0dfacc7
to
6df5456
Compare
r? wesleywiser |
Compiler changes look good to me but I'd like someone from libs to review the change in exposed standard library features to make sure there's no concerns there. r? libs |
…sleywiser,ibraheemdev Reduce special casing for the panic runtime See the individual commits for more info.
Rollup of 11 pull requests Successful merges: - #140809 (Reduce special casing for the panic runtime) - #141608 (Add support for repetition to `proc_macro::quote`) - #141864 (Handle win32 separator for cygwin paths) - #142216 (Miscellaneous RefCell cleanups) - #142517 (Windows: Use anonymous pipes in Command) - #142570 (Reject union default field values) - #142584 (Handle same-crate macro for borrowck semicolon suggestion) - #142585 (Update books) - #142586 (Fold unnecessary `visit_struct_field_def` in AstValidator) - #142595 (Revert overeager warning for misuse of `--print native-static-libs`) - #142598 (Set elf e_flags on ppc64 targets according to abi) r? `@ghost` `@rustbot` modify labels: rollup
…sleywiser,ibraheemdev Reduce special casing for the panic runtime See the individual commits for more info.
vibes-based judgement: |
…braheemdev Reduce special casing for the panic runtime See the individual commits for more info.
This comment has been minimized.
This comment has been minimized.
💔 Test failed - checks-actions |
I think LTO is causing the |
@bors2 try jobs=x86_64-msvc-1,x86_64-msvc-2 |
Reduce special casing for the panic runtime See the individual commits for more info. try-job: x86_64-msvc-1 try-job: x86_64-msvc-2
This comment has been minimized.
This comment has been minimized.
6e801de
to
2489701
Compare
@bors2 try cancel |
Try build cancelled. Cancelled workflows: |
Reduce special casing for the panic runtime See the individual commits for more info. try-job: x86_64-msvc-1 try-job: x86_64-msvc-2
💔 Test failed
|
This PR modifies cc @jieyouxu |
Updated the test that unstably includes the panic_unwind panic runtime without libstd to use @bors2 try jobs=x86_64-msvc-1,x86_64-msvc-2 |
Reduce special casing for the panic runtime See the individual commits for more info. try-job: x86_64-msvc-1 try-job: x86_64-msvc-2
See the individual commits for more info.