about summary refs log tree commit diff
path: root/compiler/rustc_target
AgeCommit message (Collapse)AuthorLines
2024-02-28Add `f16` and `f128` to `rustc_type_ir::FloatTy` and `rustc_abi::Primitive`Trevor Gross-4/+4
Make changes necessary to support these types in the compiler.
2024-02-27Rename wasm32-wasi-preview2 to wasm32-wasip2Ryan Levick-3/+3
Signed-off-by: Ryan Levick <me@ryanlevick.com>
2024-02-27Add the wasm32-wasi-preview2 targetRyan Levick-0/+65
Signed-off-by: Ryan Levick <me@ryanlevick.com>
2024-02-27Auto merge of #120411 - erikdesjardins:netbsdcall, r=Nilstriebbors-1/+1
i586_unknown_netbsd: use inline stack probes This is one of the last two targets still using "call" stack probes. I don't believe that this target uses call stack probes for any particular reason--inline stack probes are used on [`i686_unknown_netbsd`](https://github.com/rust-lang/rust/blob/b362939be16f9324dd9e6e36e22b606020068d75/compiler/rustc_target/src/spec/targets/i686_unknown_netbsd.rs#L8), suggesting they work on netbsd; and on [`i586_unknown_linux_gnu`](https://github.com/rust-lang/rust/blob/b362939be16f9324dd9e6e36e22b606020068d75/compiler/rustc_target/src/spec/targets/i586_unknown_linux_gnu.rs#L4) (via the base [`i686_unknown_linux_gnu`](https://github.com/rust-lang/rust/blob/b362939be16f9324dd9e6e36e22b606020068d75/compiler/rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs#L9)), suggesting they work with `cpu = "pentium"`. ...although I don't have a netbsd system to test this on. (cc `@he32)`
2024-02-26Auto merge of #121516 - RalfJung:platform-intrinsics-begone, r=oli-obkbors-12/+4
remove platform-intrinsics ABI; make SIMD intrinsics be regular intrinsics `@Amanieu` `@workingjubilee` I don't think there is any reason these need to be "special"? The [original RFC](https://rust-lang.github.io/rfcs/1199-simd-infrastructure.html) indicated eventually making them stable, but I think that is no longer the plan, so seems to me like we can clean this up a bit. Blocked on https://github.com/rust-lang/stdarch/pull/1538, https://github.com/rust-lang/rust/pull/121542.
2024-02-25Rollup merge of #119590 - ChrisDenton:cfg-target-abi, r=NilstriebMatthias Krüger-8/+2
Stabilize `cfg_target_abi` This stabilizes the `cfg` option called `target_abi`: ```rust #[cfg(target_abi = "eabihf")] ``` Tracking issue: #80970 fixes #78791 resolves #80970
2024-02-25remove platform-intrinsics ABI; make SIMD intrinsics be regular intrinsicsRalf Jung-12/+4
2024-02-24Stabilize `cfg_target_abi`Chris Denton-8/+2
2024-02-24compiler/rustc_target/src/spec/base/apple/tests.rs: Avoid unnecessary large moveMartin Nordholts-1/+1
Fixes: $ MAGIC_EXTRA_RUSTFLAGS=-Zmove-size-limit=4096 ./x test compiler/rustc_target error: moving 6216 bytes --> compiler/rustc_target/src/spec/base/apple/tests.rs:17:19 | 17 | for target in all_sim_targets { | ^^^^^^^^^^^^^^^ value moved from here | = note: The current maximum size is 4096, but it can be customized with the move_size_limit attribute: `#![move_size_limit = "..."]` = note: `-D large-assignments` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(large_assignments)]`
2024-02-23Rollup merge of #120742 - Nadrieril:use-min_exh_pats, r=compiler-errorsMatthias Krüger-1/+2
mark `min_exhaustive_patterns` as complete This is step 1 and 2 of my [proposal](https://github.com/rust-lang/rust/issues/119612#issuecomment-1918097361) to move `min_exhaustive_patterns` forward. The vast majority of in-tree use cases of `exhaustive_patterns` are covered by `min_exhaustive_patterns`. There are a few cases that still require `exhaustive_patterns` in tests and they're all behind references. r? ``@ghost``
2024-02-20Rollup merge of #121291 - heiher:revert-medium-cmodel, r=NilstriebNilstrieb-4/+3
target: Revert default to the medium code model on LoongArch targets This reverts commit 35dad14dfb63d77cf4a2077f1e8e9cff5a02a92b. Fixes #121289
2024-02-19Lower default Mac Catalyst deployment target to 13.1Mads Marquart-1/+2
Same default as Clang: https://github.com/llvm/llvm-project/blob/d022f32c73c57b59a9121eba909f5034e89c628e/clang/lib/Driver/ToolChains/Darwin.cpp#L2038
2024-02-19Merge deployment target variable loading on iOS and Mac CatalystMads Marquart-26/+21
2024-02-19Fix ld platform_version argument on Mac CatalystMads Marquart-29/+13
2024-02-19Make LLVM target contain correct deployment target info on Mac CatalystMads Marquart-16/+23
2024-02-19Remove MACOSX_DEPLOYMENT_TARGET env var when linking Mac CatalystMads Marquart-10/+4
Mac Catalyst uses IPHONEOS_DEPLOYMENT_TARGET to specify the deployment target, so it makes no sense to remove that variable.
2024-02-19target: Revert default to the medium code model on LoongArch targetsWANG Rui-4/+3
This reverts commit 35dad14dfb63d77cf4a2077f1e8e9cff5a02a92b. Fixes #121289
2024-02-17Rollup merge of #121210 - madsmtm:fix-target-abi-i386-apple-ios, ↵Matthias Krüger-10/+15
r=workingjubilee Fix `cfg(target_abi = "sim")` on `i386-apple-ios` Since https://github.com/rust-lang/rust/issues/80970 is stabilizing, I went and had a look, and found that the result was wrong on `i386-apple-ios`. r? rust-lang/macos
2024-02-17Fix commentMads Marquart-2/+6
2024-02-17Fix `cfg(target_abi = "sim")` on i386-apple-iosMads Marquart-8/+9
i386-apple-ios is also a simulator target
2024-02-15Update aarch64 target feature docs to match LLVMAdam Gemmell-4/+4
2024-02-14Allow targets to override default codegen backendMaybe Waffle-0/+9
2024-02-13Added sahf feature to windows targetsCKingX-5/+5
2024-02-13Prefer `min_exhaustive_patterns` in compilerNadrieril-1/+2
2024-02-12Add lahfsahf and prfchw target featureChris Denton-0/+2
2024-02-10Remove unnecessary `min_specialization` after bootstrapZalathar-1/+1
These crates all needed specialization for `newtype_index!`, which will no longer be necessary when the current nightly eventually becomes the next bootstrap compiler.
2024-02-09Possibly removed merge policyChiragroop-3/+6
2024-02-09Update x86_64_uwp_windows_gnu.rsCKingX-1/+2
Updated x86_64-uwp-windows-gnu to use CMPXCHG16B and SSE3
2024-02-09Update x86_64_pc_windows_msvc.rsCKingX-1/+1
As CMPXCHG16B is supported, I updated the max atomic width to 128-bits from 64-bits
2024-02-09Update x86_64_pc_windows_msvc.rsCKingX-1/+1
Fixed a bug where adding CMPXCHG16B would fail due to different names in Rustc and LLVM
2024-02-09Rollup merge of #120693 - nnethercote:invert-diagnostic-lints, r=davidtwcoMatthias Krüger-2/+0
Invert diagnostic lints. That is, change `diagnostic_outside_of_impl` and `untranslatable_diagnostic` from `allow` to `deny`, because more than half of the compiler has been converted to use translated diagnostics. This commit removes more `deny` attributes than it adds `allow` attributes, which proves that this change is warranted. r? ````@davidtwco````
2024-02-08As Windows 10 requires certain features like CMPXCHG16B and a few others and ↵CKingX-0/+1
Rust plans to set Windows 10 as the minimum supported OS for target x86_64-pc-windows-msvc, I have added the cmpxchg16b and sse3 feature (as CPUs that meet the Windows 10 64-bit requirement also support SSE3. See https://walbourn.github.io/directxmath-sse3-and-ssse3/ )
2024-02-07Rollup merge of #119162 - heiher:direct-access-external-data, r=petrochenkovGuillaume Boisseau-0/+12
Add unstable `-Z direct-access-external-data` cmdline flag for `rustc` The new flag has been described in the Major Change Proposal at https://github.com/rust-lang/compiler-team/issues/707 Fixes #118053
2024-02-07Rollup merge of #110482 - chrisnc:armv8r-target, r=wesleywiserGuillaume Boisseau-0/+36
Add armv8r-none-eabihf target for the Cortex-R52.
2024-02-06Invert diagnostic lints.Nicholas Nethercote-2/+0
That is, change `diagnostic_outside_of_impl` and `untranslatable_diagnostic` from `allow` to `deny`, because more than half of the compiler has be converted to use translated diagnostics. This commit removes more `deny` attributes than it adds `allow` attributes, which proves that this change is warranted.
2024-02-05Rollup merge of #120661 - xen0n:loong-medium-cmodel, r=heiher,NilstriebMatthias Krüger-3/+4
target: default to the medium code model on LoongArch targets The Rust LoongArch targets have been using the default LLVM code model so far, which is "small" in LLVM-speak and "normal" in LoongArch-speak. As [described][1] in the "Code Model" section of LoongArch ELF psABI spec v20231219, one can only make function calls as far as ±128MiB with the "normal" code model; this is insufficient for very large software containing Rust components that needs to be linked into the big text section, such as Chromium. Because: * we do not want to ask users to recompile std if they are to build such software, * objects compiled with larger code models can be linked with those with smaller code models without problems, and * the "medium" code model is comparable to the "small"/"normal" one performance-wise (same data access pattern; each function call becomes 2-insn long and indirect, but this may be relaxed back into the direct 1-insn form in a future LLVM version), but is able to perform function calls within ±128GiB, it is better to just switch the targets to the "medium" code model, which is also "medium" in LLVM-speak. [1]: https://github.com/loongson/la-abi-specs/blob/v2.30/laelf.adoc#code-models
2024-02-05Rollup merge of #120518 - kxxt:riscv-split-debug-info, r=compiler-errorsMatthias Krüger-5/+20
riscv only supports split_debuginfo=off for now Disable packed/unpacked options for riscv linux/android. Other riscv targets already only have the off option. The packed/unpacked options might be supported in the future. See upstream issue for more details: https://github.com/llvm/llvm-project/issues/56642 Fixes #110224
2024-02-05target: default to the medium code model on LoongArch targetsWANG Xuerui-3/+4
The Rust LoongArch targets have been using the default LLVM code model so far, which is "small" in LLVM-speak and "normal" in LoongArch-speak. As described in the "Code Model" section of LoongArch ELF psABI spec v20231219 [1], one can only make function calls as far as ±128MiB with the "normal" code model; this is insufficient for very large software containing Rust components that needs to be linked into the big text section, such as Chromium. Because: * we do not want to ask users to recompile std if they are to build such software, * objects compiled with larger code models can be linked with those with smaller code models without problems, and * the "medium" code model is comparable to the "small"/"normal" one performance-wise (same data access pattern; each function call becomes 2-insn long and indirect, but this may be relaxed back into the direct 1-insn form in a future LLVM version), but is able to perform function calls within ±128GiB, it is better to just switch the targets to the "medium" code model, which is also "medium" in LLVM-speak. [1]: https://github.com/loongson/la-abi-specs/blob/v2.30/laelf.adoc#code-models
2024-02-04Add an `armv8r-none-eabihf` target to support the Cortex-R52.Chris Copeland-0/+36
2024-02-03Rollup merge of #119543 - usamoi:avx512fp16, r=oli-obkMatthias Krüger-0/+1
add avx512fp16 to x86 target features std_detect avx512fp16: https://github.com/rust-lang/stdarch/pull/1508
2024-01-31Rollup merge of #120495 - clubby789:remove-amdgpu-kernel, r=oli-obkNadrieril-25/+14
Remove the `abi_amdgpu_kernel` feature The tracking issue (#51575) has been closed for 3 years, with no activity for 5.
2024-01-31riscv only supports split_debuginfo=off for nowkxxt-5/+20
Disable packed/unpacked options for riscv linux/android. Other riscv targets already only have the off option. The packed/unpacked options might be supported in the future. See upstream issue for more details: https://github.com/llvm/llvm-project/issues/56642 Fixes #110224
2024-01-30Remove the `abi_amdgpu_kernel` featureclubby789-25/+14
2024-01-28Revert "Add the wasm32-wasi-preview2 target"León Orell Valerian Liehr-67/+1
This reverts commit 31ecf341250a889ac1154b2cbe3f0b97f9d008c1. Co-authored-by: Ryan Levick <me@ryanlevick.com>
2024-01-26i586_unknown_netbsd: use inline stack probesErik Desjardins-1/+1
This is one of the last two targets still using "call" stack probes.
2024-01-25Remove unused featuresclubby789-2/+0
2024-01-25Rollup merge of #120278 - djkoloski:remove_fatal_warnings_wasm, r=oli-obkMatthias Krüger-7/+1
Remove --fatal-warnings on wasm targets These were added with good intentions, but a recent change in LLVM 18 emits a warning while examining .rmeta sections in .rlib files. Since this flag is a nice-to-have and users can update their LLVM linker independently of rustc's LLVM version, we can just omit the flag. See [this comment on wasm targets' uses of `--fatal-warnings`](https://github.com/llvm/llvm-project/pull/78658#issuecomment-1906651390).
2024-01-24Rollup merge of #119616 - rylev:wasm32-wasi-preview2, r=petrochenkov,m-ou-seLeón Orell Valerian Liehr-1/+67
Add a new `wasm32-wasi-preview2` target This is the initial implementation of the MCP https://github.com/rust-lang/compiler-team/issues/694 creating a new tier 3 target `wasm32-wasi-preview2`. That MCP has been seconded and will most likely be approved in a little over a week from now. For more information on the need for this target, please read the [MCP](https://github.com/rust-lang/compiler-team/issues/694). There is one aspect of this PR that will become insta-stable once these changes reach a stable compiler: * A new `target_family` named `wasi` is introduced. This target family incorporates all wasi targets including `wasm32-wasi` and its derivative `wasm32-wasi-preview1-threads`. The difference between `target_family = wasi` and `target_os = wasi` will become much clearer when `wasm32-wasi` is renamed to `wasm32-wasi-preview1` and the `target_os` becomes `wasm32-wasi-preview1`. You can read about this target rename in [this MCP](https://github.com/rust-lang/compiler-team/issues/695) which has also been seconded and will hopefully be officially approved soon. Additional technical details include: * Both `std::sys::wasi_preview2` and `std::os::wasi_preview2` have been created and mostly use `#[path]` annotations on their submodules to reach into the existing `wasi` (soon to be `wasi_preview1`) modules. Over time the differences between `wasi_preview1` and `wasi_preview2` will grow and most like all `#[path]` based module aliases will fall away. * Building `wasi-preview2` relies on a [`wasi-sdk`](https://github.com/WebAssembly/wasi-sdk) in the same way that `wasi-preview1` does (one must include a `wasi-root` path in the `Config.toml` pointing to sysroot included in the wasi-sdk). The target should build against [wasi-sdk v21](https://github.com/WebAssembly/wasi-sdk/releases/tag/wasi-sdk-21) without modifications. However, the wasi-sdk itself is growing [preview2 support](https://github.com/WebAssembly/wasi-sdk/pull/370) so this might shift rapidly. We will be following along quickly to make sure that building the target remains possible as the wasi-sdk changes. * This requires a [patch to libc](https://github.com/rylev/rust-libc/tree/wasm32-wasi-preview2) that we'll need to land in conjunction with this change. Until that patch lands the target won't actually build.
2024-01-23Rollup merge of #120188 - devnexen:update_bsd_compiler_base_specs, r=wesleywiserLeón Orell Valerian Liehr-0/+3
compiler: update freebsd and netbsd base specs. both support thread local.
2024-01-23Remove --fatal-warnings on wasm targetsDavid Koloski-7/+1
These were added with good intentions, but a recent change in LLVM 18 emits a warning while examining .rmeta sections in .rlib files. Since this flag is a nice-to-have and users can update their LLVM linker independently of rustc's LLVM version, we can just omit the flag.