@@ -140,11 +140,10 @@ attributes by the compiler:
140
140
staticlibs. If no panic runtime is explicitly linked, then the compiler will
141
141
select an appropriate runtime to inject.
142
142
* Finally, the compiler will ensure that panic runtimes and compilation modes
143
- are not mismatched. For a resolved DAG, the panic runtime will have been
144
- compiled with a particular ` -C panic ` option, let's call it PS (panic
145
- strategy). If PS is "abort", then no validation is performed (doesn't matter
146
- how the rest of the DAG is compiled). Otherwise, all other crates must also
147
- be compiled with the same PS.
143
+ are not mismatched. For a final product (outputs that aren't rlibs) the
144
+ ` -C panic ` mode of the panic runtime must match the final product itself. If
145
+ the panic mode is ` abort ` , then no other validation is performed, but
146
+ otherwise all crates in the DAG must have the same value of ` -C panic ` .
148
147
149
148
The purpose of these limitations is to solve a number of problems that arise
150
149
when switching panic strategies. For example with aborting panic crates won't
@@ -231,13 +230,6 @@ test` it cannot pass `-C panic=abort`.
231
230
but without that option is this the best way to be implementing these switches
232
231
for the standard library?
233
232
234
- * Applications may silently revert to the wrong panic runtime given the
235
- heuristics here. For example if an application relies on unwinding panics, if
236
- a dependency is pulled in with an explicit ` extern crate panic_abort ` , then
237
- the entire application will switch to aborting panics silently. This can be
238
- corrected, however, with an explicit ` extern crate panic_unwind ` on behalf of
239
- the application.
240
-
241
233
# Alternatives
242
234
[ alternatives ] : #alternatives
243
235
0 commit comments