about summary refs log tree commit diff
path: root/compiler/rustc_session
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2025-03-17 22:59:56 +0100
committerRalf Jung <post@ralfj.de>2025-03-25 08:22:35 +0100
commit072ccce553dd83ebfdf0aaf99eb24f65133c368b (patch)
treeaf93c57ceb3717b0ded53c8a4fc7d9e4695e5bba /compiler/rustc_session
parentc961d123d2df8d9fec6d997a6725b88eabe8d5de (diff)
downloadrust-072ccce553dd83ebfdf0aaf99eb24f65133c368b.tar.gz
rust-072ccce553dd83ebfdf0aaf99eb24f65133c368b.zip
make -Zwasm-c-abi=legacy suppress the lint
Diffstat (limited to 'compiler/rustc_session')
-rw-r--r--compiler/rustc_session/src/options.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs
index b3be4b611f0..828230f2fe6 100644
--- a/compiler/rustc_session/src/options.rs
+++ b/compiler/rustc_session/src/options.rs
@@ -1886,7 +1886,8 @@ pub mod parse {
     pub(crate) fn parse_wasm_c_abi(slot: &mut WasmCAbi, v: Option<&str>) -> bool {
         match v {
             Some("spec") => *slot = WasmCAbi::Spec,
-            Some("legacy") => *slot = WasmCAbi::Legacy,
+            // Explicitly setting the `-Z` flag suppresses the lint.
+            Some("legacy") => *slot = WasmCAbi::Legacy { with_lint: false },
             _ => return false,
         }
         true
@@ -2599,7 +2600,7 @@ written to standard error output)"),
         Requires `-Clto[=[fat,yes]]`"),
     wasi_exec_model: Option<WasiExecModel> = (None, parse_wasi_exec_model, [TRACKED],
         "whether to build a wasi command or reactor"),
-    wasm_c_abi: WasmCAbi = (WasmCAbi::Legacy, parse_wasm_c_abi, [TRACKED],
+    wasm_c_abi: WasmCAbi = (WasmCAbi::Legacy { with_lint: true }, parse_wasm_c_abi, [TRACKED],
         "use spec-compliant C ABI for `wasm32-unknown-unknown` (default: legacy)"),
     write_long_types_to_disk: bool = (true, parse_bool, [UNTRACKED],
         "whether long type names should be written to files instead of being printed in errors"),