Rollup merge of #104137 - StackDoubleFlow:err-lsc-unsupported, r=bjorn3
Issue error when -C link-self-contained option is used on unsupported platforms The documentation was also updated to reflect this. I'm assuming the supported platforms are the same as initially written in [RELEASES.md](https://github.com/rust-lang/rust/blob/master/RELEASES.md#compiler-17). Fixes #103576
This commit is contained in:
commit
fbcd751ea1
6 changed files with 16 additions and 7 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue