Skip to content

Commit

Permalink
Explicitly build proc macro test with panic=unwind
Browse files Browse the repository at this point in the history
Fuchsia explicitly builds rust and all rust targets with `-C
panic=abort` to minimize code generation size. However, when compiling a
proc-macro with this setting it can cause a warning to be emitted, which
breaks `tests/ui/invalid-compile-flags/crate-type-flag.rs`. This hasn't
been a problem in the past for us since we compile our proc macros on
host, rather than inside Fuchsia.

This attempts to fix the issue by explicitly requiring that we're using
the unwinder when compiling this test to avoid the warning being
emitted.

Fixes #135223
  • Loading branch information
erickt committed Jan 7, 2025
1 parent ad211ce commit 1460366
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/ui/invalid-compile-flags/crate-type-flag.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
//@[bin] check-pass

//@[proc_dash_macro] ignore-wasm (proc-macro is not supported)
//@[proc_dash_macro] compile-flags: --crate-type=proc-macro
//@[proc_dash_macro] compile-flags: --crate-type=proc-macro -C panic=unwind
//@[proc_dash_macro] check-pass

//@ revisions: multivalue multivalue_combined
Expand Down

0 comments on commit 1460366

Please sign in to comment.