Adjust WASI and WALI targets

This commit is contained in:
daxpedda 2025-10-01 17:43:53 +02:00
parent 5b809b355c
commit 3e8ce2bda9
No known key found for this signature in database
GPG key ID: 43D62A3EA388E46F
2 changed files with 12 additions and 4 deletions

View file

@ -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 {

View file

@ -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",
],
);