about summary refs log tree commit diff
path: root/compiler/rustc_target/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-11-16 15:55:30 +0000
committerbors <bors@rust-lang.org>2022-11-16 15:55:30 +0000
commite69336efe035c274f2ee66922cd9cac6015956ea (patch)
tree75586b5b6990744696a789341a292c14f7ddcc78 /compiler/rustc_target/src
parent63c748ee23ab7b6706655146f5b7c7f579811803 (diff)
parent972ad00094d8405b1188e5a40c1378f2eb073223 (diff)
downloadrust-e69336efe035c274f2ee66922cd9cac6015956ea.tar.gz
rust-e69336efe035c274f2ee66922cd9cac6015956ea.zip
Auto merge of #104492 - matthiaskrgr:rollup-3xyjynz, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #103750 (Fix some misleading target feature aliases)
 - #104137 (Issue error when -C link-self-contained option is used on unsupported platforms)
 - #104317 (cleanup and dedupe CTFE and Miri error reporting)
 - #104335 (Only do parser recovery on retried macro matching)
 - #104394 (various cleanups to try to reduce the use of spans inside method resolution)
 - #104459 (rustdoc: remove unused JS IIFE from main.js)
 - #104462 (rustdoc: remove pointless CSS `.rightside { padding-right: 2px }`)
 - #104466 (rustdoc: remove no-op CSS `#crate-search-div { display: inline-block }`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_target/src')
-rw-r--r--compiler/rustc_target/src/spec/wasm32_wasi.rs6
-rw-r--r--compiler/rustc_target/src/spec/wasm_base.rs4
2 files changed, 5 insertions, 5 deletions
diff --git a/compiler/rustc_target/src/spec/wasm32_wasi.rs b/compiler/rustc_target/src/spec/wasm32_wasi.rs
index 93a956403e5..6f0bbf0672d 100644
--- a/compiler/rustc_target/src/spec/wasm32_wasi.rs
+++ b/compiler/rustc_target/src/spec/wasm32_wasi.rs
@@ -72,7 +72,8 @@
 //! best we can with this target. Don't start relying on too much here unless
 //! you know what you're getting in to!
 
-use super::{crt_objects, wasm_base, Cc, LinkerFlavor, Target};
+use super::crt_objects::{self, LinkSelfContainedDefault};
+use super::{wasm_base, Cc, LinkerFlavor, Target};
 
 pub fn target() -> Target {
     let mut options = wasm_base::options();
@@ -83,6 +84,9 @@ pub fn target() -> Target {
     options.pre_link_objects_self_contained = crt_objects::pre_wasi_self_contained();
     options.post_link_objects_self_contained = crt_objects::post_wasi_self_contained();
 
+    // FIXME: Figure out cases in which WASM needs to link with a native toolchain.
+    options.link_self_contained = LinkSelfContainedDefault::True;
+
     // Right now this is a bit of a workaround but we're currently saying that
     // the target by default has a static crt which we're taking as a signal
     // for "use the bundled crt". If that's turned off then the system's crt
diff --git a/compiler/rustc_target/src/spec/wasm_base.rs b/compiler/rustc_target/src/spec/wasm_base.rs
index 528a84a8b37..625d3b37c4f 100644
--- a/compiler/rustc_target/src/spec/wasm_base.rs
+++ b/compiler/rustc_target/src/spec/wasm_base.rs
@@ -1,4 +1,3 @@
-use super::crt_objects::LinkSelfContainedDefault;
 use super::{cvs, Cc, LinkerFlavor, PanicStrategy, RelocModel, TargetOptions, TlsModel};
 
 pub fn options() -> TargetOptions {
@@ -95,9 +94,6 @@ pub fn options() -> TargetOptions {
 
         pre_link_args,
 
-        // FIXME: Figure out cases in which WASM needs to link with a native toolchain.
-        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