diff options
| author | Felix S. Klock II <pnkfelix@pnkfx.org> | 2023-03-10 13:13:08 -0500 |
|---|---|---|
| committer | Felix S. Klock II <pnkfelix@pnkfx.org> | 2023-03-14 11:44:08 -0400 |
| commit | e919f0f20e61d6eb0abbd514bf2dd5b35428a2e7 (patch) | |
| tree | ec7eeaa2573acf61c923394fed5da687df5def14 /compiler/rustc_target/src | |
| parent | d5833423a02e2373c5e3cceb238fb19192cd82f8 (diff) | |
| download | rust-e919f0f20e61d6eb0abbd514bf2dd5b35428a2e7.tar.gz rust-e919f0f20e61d6eb0abbd514bf2dd5b35428a2e7.zip | |
the fix
(fixed build by adding missing import.)
Diffstat (limited to 'compiler/rustc_target/src')
| -rw-r--r-- | compiler/rustc_target/src/spec/wasm_base.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_target/src/spec/wasm_base.rs b/compiler/rustc_target/src/spec/wasm_base.rs index 625d3b37c4f..341763aadba 100644 --- a/compiler/rustc_target/src/spec/wasm_base.rs +++ b/compiler/rustc_target/src/spec/wasm_base.rs @@ -1,3 +1,4 @@ +use super::crt_objects::LinkSelfContainedDefault; use super::{cvs, Cc, LinkerFlavor, PanicStrategy, RelocModel, TargetOptions, TlsModel}; pub fn options() -> TargetOptions { @@ -94,6 +95,13 @@ pub fn options() -> TargetOptions { pre_link_args, + // FIXME: Figure out cases in which WASM needs to link with a native toolchain. + // + // rust-lang/rust#104137: cannot blindly remove this without putting in + // some other way to compensate for lack of `-nostartfiles` in linker + // invocation. + link_self_contained: LinkSelfContainedDefault::True, + // This has no effect in LLVM 8 or prior, but in LLVM 9 and later when // PIC code is implemented this has quite a drastic effect if it stays // at the default, `pic`. In an effort to keep wasm binaries as minimal |
