diff options
| author | Jacob Pratt <jacob@jhpratt.dev> | 2025-06-17 23:19:40 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-17 23:19:40 +0200 |
| commit | 3ec145169269c236caa8f2a2aa6f3504c762794a (patch) | |
| tree | e7ed103a0e114e5a4a6f9d57498b8840d256a36e | |
| parent | 55b3b66a421cea0b26d2dc27539bc23c43a909c5 (diff) | |
| parent | a88a32d7467f6c279989b24a7f0ed35071989246 (diff) | |
| download | rust-3ec145169269c236caa8f2a2aa6f3504c762794a.tar.gz rust-3ec145169269c236caa8f2a2aa6f3504c762794a.zip | |
Rollup merge of #142635 - bjorn3:add_back_wasm_spec_abi, r=workingjubilee
Temporarily add back -Zwasm-c-abi=spec This allows a more gradual transition path for projects that need to use use the spec-complaint C ABI both with older and newer rustc versions.
| -rw-r--r-- | compiler/rustc_session/src/config.rs | 1 | ||||
| -rw-r--r-- | compiler/rustc_session/src/options.rs | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/compiler/rustc_session/src/config.rs b/compiler/rustc_session/src/config.rs index 406a6bd335a..04ca0b75c31 100644 --- a/compiler/rustc_session/src/config.rs +++ b/compiler/rustc_session/src/config.rs @@ -3118,6 +3118,7 @@ pub(crate) mod dep_tracking { } impl_dep_tracking_hash_via_hash!( + (), AutoDiff, bool, usize, diff --git a/compiler/rustc_session/src/options.rs b/compiler/rustc_session/src/options.rs index f76f258d00d..9ca405333f4 100644 --- a/compiler/rustc_session/src/options.rs +++ b/compiler/rustc_session/src/options.rs @@ -802,6 +802,7 @@ mod desc { "either a boolean (`yes`, `no`, `on`, `off`, etc), or a non-negative number"; pub(crate) const parse_llvm_module_flag: &str = "<key>:<type>:<value>:<behavior>. Type must currently be `u32`. Behavior should be one of (`error`, `warning`, `require`, `override`, `append`, `appendunique`, `max`, `min`)"; pub(crate) const parse_function_return: &str = "`keep` or `thunk-extern`"; + pub(crate) const parse_wasm_c_abi: &str = "`spec`"; pub(crate) const parse_mir_include_spans: &str = "either a boolean (`yes`, `no`, `on`, `off`, etc), or `nll` (default: `nll`)"; pub(crate) const parse_align: &str = "a number that is a power of 2 between 1 and 2^29"; @@ -1897,6 +1898,10 @@ pub mod parse { true } + pub(crate) fn parse_wasm_c_abi(_slot: &mut (), v: Option<&str>) -> bool { + v == Some("spec") + } + pub(crate) fn parse_mir_include_spans(slot: &mut MirIncludeSpans, v: Option<&str>) -> bool { *slot = match v { Some("on" | "yes" | "y" | "true") | None => MirIncludeSpans::On, @@ -2631,6 +2636,11 @@ 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"), + // This option only still exists to provide a more gradual transition path for people who need + // the spec-complaint C ABI to be used. + // FIXME remove this after a couple releases + wasm_c_abi: () = ((), parse_wasm_c_abi, [TRACKED], + "use spec-compliant C ABI for `wasm32-unknown-unknown` (deprecated, always enabled)"), 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"), // tidy-alphabetical-end |
