diff options
| author | daxpedda <daxpedda@gmail.com> | 2025-10-01 17:43:53 +0200 |
|---|---|---|
| committer | daxpedda <daxpedda@gmail.com> | 2025-10-01 17:43:53 +0200 |
| commit | 3e8ce2bda9e9563c546287b4715fcde61d008d3e (patch) | |
| tree | fb8d8797e08c31be302a947e310fe81b170555e2 /compiler | |
| parent | 5b809b355c5c134e6848f800a2f8e692a3c10d44 (diff) | |
| download | rust-3e8ce2bda9e9563c546287b4715fcde61d008d3e.tar.gz rust-3e8ce2bda9e9563c546287b4715fcde61d008d3e.zip | |
Adjust WASI and WALI targets
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/wasm32_wali_linux_musl.rs | 13 | ||||
| -rw-r--r-- | compiler/rustc_target/src/spec/targets/wasm32_wasip1_threads.rs | 3 |
2 files changed, 12 insertions, 4 deletions
diff --git a/compiler/rustc_target/src/spec/targets/wasm32_wali_linux_musl.rs b/compiler/rustc_target/src/spec/targets/wasm32_wali_linux_musl.rs index a0eb4a254fc..06e5cfaed92 100644 --- a/compiler/rustc_target/src/spec/targets/wasm32_wali_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/wasm32_wali_linux_musl.rs @@ -6,11 +6,18 @@ use crate::spec::{Cc, LinkerFlavor, Target, TargetMetadata, base}; pub(crate) fn target() -> Target { let mut options = base::linux_wasm::opts(); - options - .add_pre_link_args(LinkerFlavor::WasmLld(Cc::No), &["--export-memory", "--shared-memory"]); + options.add_pre_link_args( + LinkerFlavor::WasmLld(Cc::No), + &["--export-memory", "--shared-memory", "--max-memory=1073741824"], + ); options.add_pre_link_args( LinkerFlavor::WasmLld(Cc::Yes), - &["--target=wasm32-wasi-threads", "-Wl,--export-memory,", "-Wl,--shared-memory"], + &[ + "--target=wasm32-wasi-threads", + "-Wl,--export-memory,", + "-Wl,--shared-memory", + "-Wl,--max-memory=1073741824", + ], ); Target { diff --git a/compiler/rustc_target/src/spec/targets/wasm32_wasip1_threads.rs b/compiler/rustc_target/src/spec/targets/wasm32_wasip1_threads.rs index 44d906a507d..c735c72cb1c 100644 --- a/compiler/rustc_target/src/spec/targets/wasm32_wasip1_threads.rs +++ b/compiler/rustc_target/src/spec/targets/wasm32_wasip1_threads.rs @@ -19,7 +19,7 @@ pub(crate) fn target() -> Target { options.add_pre_link_args( LinkerFlavor::WasmLld(Cc::No), - &["--import-memory", "--export-memory", "--shared-memory"], + &["--import-memory", "--export-memory", "--shared-memory", "--max-memory=1073741824"], ); options.add_pre_link_args( LinkerFlavor::WasmLld(Cc::Yes), @@ -28,6 +28,7 @@ pub(crate) fn target() -> Target { "-Wl,--import-memory", "-Wl,--export-memory,", "-Wl,--shared-memory", + "-Wl,--max-memory=1073741824", ], ); |
