about summary refs log tree commit diff
path: root/compiler/rustc_target/src/spec/wasm_base.rs
AgeCommit message (Collapse)AuthorLines
2023-11-08target: move base specs to spec/baseDavid Wood-133/+0
Signed-off-by: David Wood <david@davidtw.co>
2023-10-18unify `LinkSelfContained` and `LinkSelfContainedDefault`Rémy Rakic-2/+2
Removes the backwards-compatible `LinkSelfContainedDefault`, by incorporating the remaining specifics into `LinkSelfContained`. Then renames the modern options to keep the old name.
2023-10-18allow target specs to declare self-contained linking componentsRémy Rakic-2/+2
2023-03-14the fixFelix S. Klock II-0/+8
(fixed build by adding missing import.)
2022-11-14Issue error when `-C link-self-contained` option is used on unsupported ↵StackDoubleFlow-4/+0
platforms Document supported targets for `-C link-self-contained` Move `LinkSelfContainedDefault::True` from wasm_base to wasm32_wasi
2022-10-06rustc_target: Refactor internal linker flavorsVadim Petrochenkov-5/+4
In accordance with the design from https://github.com/rust-lang/rust/pull/96827#issuecomment-1208441595
2022-08-12rustc_target: Update some old naming around self contained linkingVadim Petrochenkov-2/+3
The "fallback" naming pre-dates introduction of `-Clink-self-contained`
2022-07-11rustc_target: Flip the default for `TargetOptions::executables` to trueVadim Petrochenkov-3/+0
Also change `executables` to true for linux-kernel and windows-uwp-gnu targets
2022-06-25rustc_target: Add convenience functions for adding linker argumentsVadim Petrochenkov-56/+49
They ensure that lld and non-lld linker flavors get the same set of arguments
2022-04-03Replace LinkArgs with Cow<'static, str>Loïc BRANSTETT-2/+2
2022-04-03Replace every Vec in Target(Options) with it's Cow equivalentLoïc BRANSTETT-2/+2
2022-04-03Replace every `String` in Target(Options) with `Cow<'static, str>`Loïc BRANSTETT-6/+6
2022-03-30Spellchecking compiler commentsYuri Astrakhan-1/+1
This PR cleans up the rest of the spelling mistakes in the compiler comments. This PR does not change any literal or code spelling issues.
2021-12-17Rename `has_elf_tls` to `has_thread_local`Chris Denton-2/+2
2021-11-10Disable `.debug_aranges` for all wasm targetsAlex Crichton-0/+6
This follows from discussion on https://bugs.llvm.org/show_bug.cgi?id=52442 where it looks like this section doesn't make sense for wasm targets.
2021-06-06Rollup merge of #85920 - luqmana:wasm-linker-tweaks, r=petrochenkovYuki Okushi-0/+1
Tweak wasm_base target spec to indicate linker is not GNU and update linker inferring logic for wasm-ld. Reported via [Zulip](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/wasi.20linker.20unknown.20argument.3A.20--as-needed): we try passing `--as-needed` to the linker if it's GNU ld which `wasm-ld` is not. Usually this isn't an issue for wasm as we would use the WasmLd linker driver but because the linker in question (`wasm32-unknown-wasi-wasm-ld`) ended with `-ld` our linker inferring [logic](https://github.com/rust-lang/rust/blob/f64503eb555475d65ae5503ef22439ca5dd394fd/compiler/rustc_codegen_ssa/src/back/link.rs#L957-L1040) used the `GccLinker` implementations. (UPD: The linker inferring logic actually didn't apply in this case because the linker is actually invoked through gcc in the reported issue. But it's still worth updating the logic I think.) This change then has 2 parts: 1. Update wasm_base target spec to indicate `linker_is_gnu: false` plus a few additions of `target.is_like_wasm` to handle flags `wasm-ld` does in fact support. 2. Improve the linker detection logic to properly determine the correct flavor of wasm linker we're using when we can. We need to add the new `target.is_like_wasm` branches to handle the case where the "linker" used could be something like clang which would then under the hood call wasm-ld.
2021-06-03wasm: Make simd types passed via indirection againAlex Crichton-6/+0
This commit updates wasm target specs to use `simd_types_indirect: true` again. Long ago this was added since wasm simd types were always translated to `v128` under-the-hood in LLVM, meaning that it didn't matter whether that target feature was enabled or not. Now, however, `v128` is conditionally used in codegen depending on target features enabled, meaning that it's possible to get linker errors about different signatures in code that correctly uses simd types. The fix is the same as for all other platforms, which is to pass the type indirectly.
2021-06-01Tweak wasm_base target spec to indicate linker is not GNU and update linker ↵Luqman Aden-0/+1
inferring logic for wasm-ld.
2021-05-03Set target_family="wasm" for wasm targetsSimonas Kazlauskas-0/+1
2021-04-05rustc_target: Rely on defaults more in target specsVadim Petrochenkov-1/+0
2021-04-04wasm64Gus Caplan-0/+138