Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion compiler/rustc_target/src/spec/targets/wasm32v1_none.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ pub(crate) fn target() -> Target {
// For now this target just never has an entry symbol no matter the output
// type, so unconditionally pass this.
"--no-entry",
// It is also necessary to explicitly set the features since some changes
// were made to WebAssembly starting with LLVM 20.1.0:
// https://releases.llvm.org/20.1.0/docs/ReleaseNotes.html#changes-to-the-webassembly-backend
"--features=+mutable-globals",
"--no-check-features",
],
);
options.add_pre_link_args(
Expand All @@ -37,7 +42,7 @@ pub(crate) fn target() -> Target {
// Make sure clang uses LLD as its linker and is configured appropriately
// otherwise
"--target=wasm32-unknown-unknown",
"-Wl,--no-entry",
"-Wl,--no-entry,--features=+mutable-globals,--no-check-features",
],
);

Expand Down
Loading