-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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.
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.
6d4613c
to
c7e8663
Compare
The Miri subtree was changed cc @rust-lang/miri |
This comment has been minimized.
This comment has been minimized.
There is already panic-unwind to enable it.
c7e8663
to
93cf365
Compare
☔ The latest upstream changes (presumably #140176) made this pull request unmergeable. Please resolve the merge conflicts. |
See the individual commits for more info.