about summary refs log tree commit diff
path: root/compiler/rustc_target/src
AgeCommit message (Collapse)AuthorLines
2023-10-25Add support for i586-unknown-netbsd as target.Havard Eidnes-0/+23
This restricts instructions to those offered by Pentium, to support e.g. AMD Geode. There is already an entry for this target in the NetBSD platform support page at src/doc/rustc/src/platform-support/netbsd.md ...so this should forestall its removal. Additional fixes are needed for some vendored modules, this is the changes in the rust compiler core itself.
2023-10-25implement C ABI lowering for CSKYdirreke-8/+30
2023-10-22add target csky-unknown-linux-gnuabiv2hfdirreke-1/+23
2023-10-21update the registers of cskydirreke-3/+3
2023-10-18make `self_contained` return `LinkSelfContainedComponents`Rémy Rakic-0/+15
2023-10-18unify `LinkSelfContained` and `LinkSelfContainedDefault`Rémy Rakic-85/+54
Removes the backwards-compatible `LinkSelfContainedDefault`, by incorporating the remaining specifics into `LinkSelfContained`. Then renames the modern options to keep the old name.
2023-10-18use asymmetric json roundtrippingRémy Rakic-3/+20
this ensures roundtripping of stable and unstable values: - backwards-compatible values can be deserialized, as well as the new unstable values - unstable values are serialized.
2023-10-18allow target specs to declare self-contained linking componentsRémy Rakic-18/+167
2023-10-16Rename `ACTIVE_FEATURES` as `UNSTABLE_FEATURES`.Nicholas Nethercote-1/+1
It's a better name, and lets "active features" refer to the features that are active in a particular program, due to being declared or enabled by the edition. The commit also renames `Features::enabled` as `Features::active` to match this; I changed my mind and have decided that "active" is a little better thatn "enabled" for this, particularly because a number of pre-existing comments use "active" in this way. Finally, the commit renames `Status::Stable` as `Status::Accepted`, to match `ACCEPTED_FEATURES`.
2023-10-15Auto merge of #116688 - compiler-errors:rustfmt-up, r=WaffleLapkin,Nilstriebbors-1/+2
Format all the let-chains in compiler crates Since rust-lang/rustfmt#5910 has landed, soon we will have support for formatting let-chains (as soon as rustfmt syncs and beta gets bumped). This PR applies the changes [from master rustfmt to rust-lang/rust eagerly](https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/out.20formatting.20of.20prs/near/374997516), so that the next beta bump does not have to deal with a 200+ file diff and can remain concerned with other things like `cfg(bootstrap)` -- #113637 was a pain to land, for example, because of let-else. I will also add this commit to the ignore list after it has landed. The commands that were run -- I'm not great at bash-foo, but this applies rustfmt to every compiler crate, and then reverts the two crates that should probably be formatted out-of-tree. ``` ~/rustfmt $ ls -1d ~/rust/compiler/* | xargs -I@ cargo run --bin rustfmt -- `@/src/lib.rs` --config-path ~/rust --edition=2021 # format all of the compiler crates ~/rust $ git checkout HEAD -- compiler/rustc_codegen_{gcc,cranelift} # revert changes to cg-gcc and cg-clif ``` cc `@rust-lang/rustfmt` r? `@WaffleLapkin` or `@Nilstrieb` who said they may be able to review this purely mechanical PR :> cc `@Mark-Simulacrum` and `@petrochenkov,` who had some thoughts on the order of operations with big formatting changes in https://github.com/rust-lang/rust/pull/95262#issue-1178993801. I think the situation has changed since then, given that let-chains support exists on master rustfmt now, and I'm fairly confident that this formatting PR should land even if *bootstrap* rustfmt doesn't yet format let-chains in order to lessen the burden of the next beta bump.
2023-10-14Rollup merge of #116618 - chriswailes:riscv64-linux-android-vector, ↵Matthias Krüger-1/+1
r=workingjubilee Add the V (vector) extension to the riscv64-linux-android target spec This feature has been enabled and tested internally in the Android project.
2023-10-13Lowercase the feature flags for riscv64-linux-androidChris Wailes-1/+1
2023-10-13Format all the let chains in compilerMichael Goulet-1/+2
2023-10-11Auto merge of #116014 - lqd:mcp510-2-electric-boogaloo, r=petrochenkovbors-5/+79
Implement `-Clink-self-contained=-linker` opt out This implements the `-Clink-self-contained` opt out necessary to switch to lld by changing rustc's defaults instead of cargo's. Components that are enabled and disabled on the CLI are recorded, for the purpose of being merged with the ones which the target spec will declare (I'll open another PR for that tomorrow, for easier review). For MCP510, we now check whether using the self-contained linker is disabled on the CLI. Right now it would only be sensible to with `-Zgcc-ld=lld` (and I'll add some checks that we don't both enable and disable a component on the CLI in a future PR), but the goal is to simplify adding the check of the target's enabled components here in the follow-up PRs. r? `@petrochenkov`
2023-10-10Add the V (vector) extension to the riscv64-linux-android target specChris Wailes-1/+1
This feature has been enabled and tested internally in the Android project.
2023-10-08rustdoc: remove rust logo from non-Rust cratesMichael Howell-0/+2
2023-10-08add `IntoIterator` impl for self-contained linking componentsRémy Rakic-0/+40
2023-10-08move single component parsing to dedicated functionRémy Rakic-6/+5
this will prevent parsing when expecting more than a single component to be parsed, and prepare for the symetric variant-to-name function to be added
2023-10-08move `LinkSelfContainedComponents` to `rustc_target`Rémy Rakic-0/+35
2023-10-08prepare stabilization of modern linker-flavorsRémy Rakic-5/+5
fix a few comments
2023-10-07linker: Remove unstable legacy CLI linker flavorsVadim Petrochenkov-12/+3
2023-10-06Fix typosSebastian Imlay-5/+3
2023-10-06Initial target specification for aarch64-apple-tvos-simSebastian Imlay-0/+34
2023-10-06Auto merge of #116269 - Veykril:rustc-abi, r=WaffleLapkinbors-2/+108
Bring back generic parameters for indices in rustc_abi and make it compile on stable This effectively reverses https://github.com/rust-lang/rust/pull/107163, allowing rust-analyzer to depend on this crate again, It also moves some glob imports / expands them in the first commit because they made it more difficult for me to reason about things.
2023-10-02Implement Deref<LayoutS> for LayoutLukas Wirth-0/+7
2023-10-02Add VariantIdx backLukas Wirth-4/+21
2023-10-02Move FieldIdx and Layout to rustc_targetLukas Wirth-0/+82
2023-10-02Bring back generic FieldIdxLukas Wirth-2/+2
2023-09-30Fix broken linkscui fliter-3/+3
Signed-off-by: cui fliter <imcusg@gmail.com>
2023-09-24Auto merge of #116076 - chriswailes:android-riscv-extension-update, r=cjgillotbors-1/+1
Add Zba, Zbb, and Zbs as target features for riscv64-linux-android This pull request adds the Zba, Zbb, and Zbs target features to the `riscv64-linux-android` target specification. These features have been enabled and tested internally in Android infrastructure.
2023-09-24Auto merge of #105861 - Ayush1325:uefi-std-minimial, r=workingjubileebors-1/+3
Add Minimal Std implementation for UEFI # Implemented modules: 1. alloc 2. os_str 3. env 4. math # Related Links Tracking Issue: https://github.com/rust-lang/rust/issues/100499 API Change Proposal: https://github.com/rust-lang/libs-team/issues/87 # Additional Information This was originally part of https://github.com/rust-lang/rust/pull/100316. Since that PR was becoming too unwieldy and cluttered, and with suggestion from `@dvdhrm,` I have extracted a minimal std implementation to this PR. The example in `src/doc/rustc/src/platform-support/unknown-uefi.md` has been tested for `x86_64-unknown-uefi` and `i686-unknown-uefi` in OVMF. It would be great if someone more familiar with AARCH64 can help with testing for that target. Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2023-09-24Auto merge of #104385 - BlackHoleFox:apple-minimum-bumps, r=petrochenkovbors-59/+25
Raise minimum supported Apple OS versions This implements the proposal to raise the minimum supported Apple OS versions as laid out in the now-completed MCP (https://github.com/rust-lang/compiler-team/issues/556). As of this PR, rustc and the stdlib now support these versions as the baseline: - macOS: 10.12 Sierra - iOS: 10 - tvOS: 10 - watchOS: 5 (Unchanged) In addition to everything this breaks indirectly, these changes also erase the `armv7-apple-ios` target (currently tier 3) because the oldest supported iOS device now uses ARMv7s. Not sure what the policy around tier3 target removal is but shimming it is not an option due to the linker refusing. [Per comment](https://github.com/rust-lang/compiler-team/issues/556#issuecomment-1297175073), this requires a FCP to merge. cc `@wesleywiser.`
2023-09-23Raise minimum supported tvOS version to 10.0BlackHoleFox-1/+1
2023-09-23Raise minimum supported iOS version to 10.0BlackHoleFox-38/+15
Drop the armv7-apple-ios target too because its no longer supported with the hardware iOS 10 requires.
2023-09-23Raise minimum supported macOS to 10.12BlackHoleFox-22/+11
2023-09-23Set max_atomic_width for riscv32*-esp-espidf to 32Taiki Endo-3/+3
2023-09-22Add Zba, Zbb, and Zbs as target features for riscv64-linux-androidChris Wailes-1/+1
2023-09-22Add Minimal Std implementation for UEFIAyush Singh-1/+3
Implemented modules: 1. alloc 2. os_str 3. env 4. math Tracking Issue: https://github.com/rust-lang/rust/issues/100499 API Change Proposal: https://github.com/rust-lang/libs-team/issues/87 This was originally part of https://github.com/rust-lang/rust/pull/100316. Since that PR was becoming too unwieldy and cluttered, and with suggestion from @dvdhrm, I have extracted a minimal std implementation to this PR. Signed-off-by: Ayush Singh <ayushsingh1325@gmail.com>
2023-09-21Auto merge of #115230 - Vtewari2311:mod-hurd-latest, r=b-naberbors-0/+43
added support for GNU/Hurd adding support for i686-unknown-hurd-gnu
2023-09-21added support for GNU/HurdSamuel Thibault-0/+43
2023-09-20rustc_target/loongarch: Fix passing of transparent unions with only one ↵WANG Rui-0/+11
non-ZST member This ensures that `MaybeUninit<T>` has the same ABI as `T` when passed through an `extern "C"` function. Fixes https://github.com/rust-lang/rust/issues/115509
2023-09-19rustc_target/riscv: Fix passing of transparent unions with only one non-ZST ↵msizanoen-0/+19
member This ensures that `MaybeUninit<T>` has the same ABI as `T` when passed through an `extern "C"` function. Fixes https://github.com/rust-lang/rust/issues/115481.
2023-09-18Enable ASAN/LSAN/TSAN for *-apple-ios-macabidanakj-2/+4
The -macabi targets are iOS running on MacOS, and they use the runtime libraries for MacOS, thus they have the same sanitizers available as the *-apple-darwin targets.
2023-09-17Rollup merge of #115654 - RalfJung:pass-mode-cast, r=compiler-errorsDylan DPC-27/+37
improve PassMode docs
2023-09-16Rollup merge of #115860 - Soveu:varargs2, r=WaffleLapkinMatthias Krüger-1/+2
Enable varargs support for AAPCS calling convention Welp, I was looking for a reason why this shouldn't be stabilized after so long... and here it is.
2023-09-15special case `TyAndLayout` debug implBoxy-3/+38
2023-09-15clarify PassMode::Indirect as wellRalf Jung-18/+19
2023-09-15explain PassMode::CastRalf Jung-9/+18
2023-09-14Enable varargs support for AAPCS calling conventionSoveu-1/+2
This is the default calling convention for ARM - it is used for extern "C", therefore it supports varargs.
2023-09-12add helper method for finding the one non-1-ZST fieldRalf Jung-0/+21