mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 22:12:15 +00:00
ENH Move --memory-init-file flag from EmLinker to asmjs target spec
This commit is contained in:
parent
8e430bfa9a
commit
3fb6d45af9
@ -1120,8 +1120,6 @@ impl<'a> Linker for EmLinker<'a> {
|
||||
OptLevel::Size => "-Os",
|
||||
OptLevel::SizeMin => "-Oz",
|
||||
});
|
||||
// Unusable until https://github.com/rust-lang/rust/issues/38454 is resolved
|
||||
self.cmd.args(&["--memory-init-file", "0"]);
|
||||
}
|
||||
|
||||
fn pgo_gen(&mut self) {
|
||||
|
@ -2,10 +2,10 @@ use super::{wasm32_unknown_emscripten, LinkerFlavor, Target};
|
||||
|
||||
pub fn target() -> Target {
|
||||
let mut target = wasm32_unknown_emscripten::target();
|
||||
target
|
||||
.post_link_args
|
||||
.entry(LinkerFlavor::Em)
|
||||
.or_default()
|
||||
.extend(vec!["-s".into(), "WASM=0".into()]);
|
||||
target.post_link_args.entry(LinkerFlavor::Em).or_default().extend(vec![
|
||||
"-sWASM=0".into(),
|
||||
"--memory-init-file".into(),
|
||||
"0".into(),
|
||||
]);
|
||||
target
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user