Skip to content

Commit e919f0f

Browse files
committed
the fix
(fixed build by adding missing import.)
1 parent d583342 commit e919f0f

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

compiler/rustc_target/src/spec/wasm_base.rs

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use super::crt_objects::LinkSelfContainedDefault;
12
use super::{cvs, Cc, LinkerFlavor, PanicStrategy, RelocModel, TargetOptions, TlsModel};
23

34
pub fn options() -> TargetOptions {
@@ -94,6 +95,13 @@ pub fn options() -> TargetOptions {
9495

9596
pre_link_args,
9697

98+
// FIXME: Figure out cases in which WASM needs to link with a native toolchain.
99+
//
100+
// rust-lang/rust#104137: cannot blindly remove this without putting in
101+
// some other way to compensate for lack of `-nostartfiles` in linker
102+
// invocation.
103+
link_self_contained: LinkSelfContainedDefault::True,
104+
97105
// This has no effect in LLVM 8 or prior, but in LLVM 9 and later when
98106
// PIC code is implemented this has quite a drastic effect if it stays
99107
// at the default, `pic`. In an effort to keep wasm binaries as minimal

0 commit comments

Comments
 (0)