From d74d67c8369fd759d860d215aaa576a03d99b692 Mon Sep 17 00:00:00 2001 From: Michael Goulet Date: Fri, 1 Mar 2024 15:58:12 +0000 Subject: [PATCH 01/15] Implement async closure signature deduction --- compiler/rustc_hir_typeck/src/closure.rs | 74 ++++++++++++------- .../async-closures/signature-deduction.rs | 10 +++ 2 files changed, 57 insertions(+), 27 deletions(-) create mode 100644 tests/ui/async-await/async-closures/signature-deduction.rs diff --git a/compiler/rustc_hir_typeck/src/closure.rs b/compiler/rustc_hir_typeck/src/closure.rs index 5bdd9412d0e51..b6bfc81bc1975 100644 --- a/compiler/rustc_hir_typeck/src/closure.rs +++ b/compiler/rustc_hir_typeck/src/closure.rs @@ -56,18 +56,12 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { // It's always helpful for inference if we know the kind of // closure sooner rather than later, so first examine the expected // type, and see if can glean a closure kind from there. - let (expected_sig, expected_kind) = match closure.kind { - hir::ClosureKind::Closure => match expected.to_option(self) { - Some(ty) => { - self.deduce_closure_signature(self.try_structurally_resolve_type(expr_span, ty)) - } - None => (None, None), - }, - // We don't want to deduce a signature from `Fn` bounds for coroutines - // or coroutine-closures, because the former does not implement `Fn` - // ever, and the latter's signature doesn't correspond to the coroutine - // type that it returns. - hir::ClosureKind::Coroutine(_) | hir::ClosureKind::CoroutineClosure(_) => (None, None), + let (expected_sig, expected_kind) = match expected.to_option(self) { + Some(ty) => self.deduce_closure_signature( + self.try_structurally_resolve_type(expr_span, ty), + closure.kind, + ), + None => (None, None), }; let ClosureSignatures { bound_sig, mut liberated_sig } = @@ -323,11 +317,13 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { fn deduce_closure_signature( &self, expected_ty: Ty<'tcx>, + closure_kind: hir::ClosureKind, ) -> (Option>, Option) { match *expected_ty.kind() { ty::Alias(ty::Opaque, ty::AliasTy { def_id, args, .. }) => self .deduce_closure_signature_from_predicates( expected_ty, + closure_kind, self.tcx .explicit_item_bounds(def_id) .iter_instantiated_copied(self.tcx, args) @@ -336,7 +332,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { ty::Dynamic(object_type, ..) => { let sig = object_type.projection_bounds().find_map(|pb| { let pb = pb.with_self_ty(self.tcx, self.tcx.types.trait_object_dummy_self); - self.deduce_sig_from_projection(None, pb) + self.deduce_sig_from_projection(None, closure_kind, pb) }); let kind = object_type .principal_def_id() @@ -345,12 +341,18 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { } ty::Infer(ty::TyVar(vid)) => self.deduce_closure_signature_from_predicates( Ty::new_var(self.tcx, self.root_var(vid)), + closure_kind, self.obligations_for_self_ty(vid).map(|obl| (obl.predicate, obl.cause.span)), ), - ty::FnPtr(sig) => { - let expected_sig = ExpectedSig { cause_span: None, sig }; - (Some(expected_sig), Some(ty::ClosureKind::Fn)) - } + ty::FnPtr(sig) => match closure_kind { + hir::ClosureKind::Closure => { + let expected_sig = ExpectedSig { cause_span: None, sig }; + (Some(expected_sig), Some(ty::ClosureKind::Fn)) + } + hir::ClosureKind::Coroutine(_) | hir::ClosureKind::CoroutineClosure(_) => { + (None, None) + } + }, _ => (None, None), } } @@ -358,6 +360,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { fn deduce_closure_signature_from_predicates( &self, expected_ty: Ty<'tcx>, + closure_kind: hir::ClosureKind, predicates: impl DoubleEndedIterator, Span)>, ) -> (Option>, Option) { let mut expected_sig = None; @@ -386,6 +389,7 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { span, self.deduce_sig_from_projection( Some(span), + closure_kind, bound_predicate.rebind(proj_predicate), ), ); @@ -422,13 +426,22 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { ty::PredicateKind::Clause(ty::ClauseKind::Trait(data)) => Some(data.def_id()), _ => None, }; - if let Some(closure_kind) = - trait_def_id.and_then(|def_id| self.tcx.fn_trait_kind_from_def_id(def_id)) - { - expected_kind = Some( - expected_kind - .map_or_else(|| closure_kind, |current| cmp::min(current, closure_kind)), - ); + + if let Some(trait_def_id) = trait_def_id { + let found_kind = match closure_kind { + hir::ClosureKind::Closure => self.tcx.fn_trait_kind_from_def_id(trait_def_id), + hir::ClosureKind::CoroutineClosure(hir::CoroutineDesugaring::Async) => { + self.tcx.async_fn_trait_kind_from_def_id(trait_def_id) + } + _ => None, + }; + + if let Some(found_kind) = found_kind { + expected_kind = Some( + expected_kind + .map_or_else(|| found_kind, |current| cmp::min(current, found_kind)), + ); + } } } @@ -445,14 +458,21 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> { fn deduce_sig_from_projection( &self, cause_span: Option, + closure_kind: hir::ClosureKind, projection: ty::PolyProjectionPredicate<'tcx>, ) -> Option> { let tcx = self.tcx; let trait_def_id = projection.trait_def_id(tcx); - // For now, we only do signature deduction based off of the `Fn` traits. - if !tcx.is_fn_trait(trait_def_id) { - return None; + + // For now, we only do signature deduction based off of the `Fn` and `AsyncFn` traits, + // for closures and async closures, respectively. + match closure_kind { + hir::ClosureKind::Closure + if self.tcx.fn_trait_kind_from_def_id(trait_def_id).is_some() => {} + hir::ClosureKind::CoroutineClosure(hir::CoroutineDesugaring::Async) + if self.tcx.async_fn_trait_kind_from_def_id(trait_def_id).is_some() => {} + _ => return None, } let arg_param_ty = projection.skip_binder().projection_ty.args.type_at(1); diff --git a/tests/ui/async-await/async-closures/signature-deduction.rs b/tests/ui/async-await/async-closures/signature-deduction.rs new file mode 100644 index 0000000000000..031dab1029658 --- /dev/null +++ b/tests/ui/async-await/async-closures/signature-deduction.rs @@ -0,0 +1,10 @@ +//@ check-pass +//@ edition: 2021 + +#![feature(async_closure)] + +async fn foo(x: impl async Fn(&str) -> &str) {} + +fn main() { + foo(async |x| x); +} From e71f207499d3bdcdbcc858bc63a478c0dee45470 Mon Sep 17 00:00:00 2001 From: WANG Rui Date: Mon, 5 Jun 2023 19:51:24 +0800 Subject: [PATCH 02/15] Add new Tier-3 target: `loongarch64-unknown-linux-musl` MCP: https://github.com/rust-lang/compiler-team/issues/518 --- compiler/rustc_target/src/spec/mod.rs | 1 + .../targets/loongarch64_unknown_linux_musl.rs | 18 ++++++++++++++++++ src/doc/rustc/src/platform-support.md | 1 + 3 files changed, 20 insertions(+) create mode 100644 compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_musl.rs diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index 651d563227750..79161afc87cbe 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -1402,6 +1402,7 @@ supported_targets! { ("i686-unknown-linux-gnu", i686_unknown_linux_gnu), ("i586-unknown-linux-gnu", i586_unknown_linux_gnu), ("loongarch64-unknown-linux-gnu", loongarch64_unknown_linux_gnu), + ("loongarch64-unknown-linux-musl", loongarch64_unknown_linux_musl), ("m68k-unknown-linux-gnu", m68k_unknown_linux_gnu), ("csky-unknown-linux-gnuabiv2", csky_unknown_linux_gnuabiv2), ("csky-unknown-linux-gnuabiv2hf", csky_unknown_linux_gnuabiv2hf), diff --git a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_musl.rs new file mode 100644 index 0000000000000..01a003ce8fa45 --- /dev/null +++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_musl.rs @@ -0,0 +1,18 @@ +use crate::spec::{base, Target, TargetOptions}; + +pub fn target() -> Target { + Target { + llvm_target: "loongarch64-unknown-linux-musl".into(), + pointer_width: 64, + data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".into(), + arch: "loongarch64".into(), + options: TargetOptions { + cpu: "generic".into(), + features: "+f,+d".into(), + llvm_abiname: "lp64d".into(), + max_atomic_width: Some(64), + crt_static_default: false, + ..base::linux_musl::opts() + }, + } +} diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md index f1e3ad81b8528..d15bea04d3066 100644 --- a/src/doc/rustc/src/platform-support.md +++ b/src/doc/rustc/src/platform-support.md @@ -167,6 +167,7 @@ target | std | notes `i686-unknown-freebsd` | ✓ | 32-bit FreeBSD [^x86_32-floats-return-ABI] `i686-unknown-linux-musl` | ✓ | 32-bit Linux with MUSL [^x86_32-floats-return-ABI] [`i686-unknown-uefi`](platform-support/unknown-uefi.md) | * | 32-bit UEFI +[`loongarch64-unknown-linux-musl`](platform-support/loongarch-linux.md) | ? | | LoongArch64 Linux (LP64D ABI) [`loongarch64-unknown-none`](platform-support/loongarch-none.md) | * | | LoongArch64 Bare-metal (LP64D ABI) [`loongarch64-unknown-none-softfloat`](platform-support/loongarch-none.md) | * | | LoongArch64 Bare-metal (LP64S ABI) [`nvptx64-nvidia-cuda`](platform-support/nvptx64-nvidia-cuda.md) | * | --emit=asm generates PTX code that [runs on NVIDIA GPUs] From aa1ab01a72ec47c32b0f9be0f1ffaf7ec4bd1e78 Mon Sep 17 00:00:00 2001 From: WANG Rui Date: Fri, 1 Mar 2024 11:43:27 +0800 Subject: [PATCH 03/15] tests: Add loongarch64-unknown-linux-musl target --- tests/assembly/targets/targets-elf.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/assembly/targets/targets-elf.rs b/tests/assembly/targets/targets-elf.rs index a741f5deb6e8c..c185bb60c0235 100644 --- a/tests/assembly/targets/targets-elf.rs +++ b/tests/assembly/targets/targets-elf.rs @@ -234,6 +234,9 @@ //@ revisions: loongarch64_unknown_linux_gnu //@ [loongarch64_unknown_linux_gnu] compile-flags: --target loongarch64-unknown-linux-gnu //@ [loongarch64_unknown_linux_gnu] needs-llvm-components: loongarch +//@ revisions: loongarch64_unknown_linux_musl +//@ [loongarch64_unknown_linux_musl] compile-flags: --target loongarch64-unknown-linux-musl +//@ [loongarch64_unknown_linux_musl] needs-llvm-components: loongarch //@ revisions: loongarch64_unknown_none //@ [loongarch64_unknown_none] compile-flags: --target loongarch64-unknown-none //@ [loongarch64_unknown_none] needs-llvm-components: loongarch From 374607d6b9abb6e005200e79d1817b4a4f609e41 Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 2 Mar 2024 12:53:28 +0100 Subject: [PATCH 04/15] const_eval_select: make it safe but be careful with what we expose on stable for now --- .../rustc_hir_analysis/src/check/intrinsic.rs | 3 +- library/alloc/src/alloc.rs | 1 + library/core/src/ffi/c_str.rs | 10 ++++- library/core/src/intrinsics.rs | 42 ++++++++++--------- library/core/src/num/f32.rs | 10 ++++- library/core/src/num/f64.rs | 10 ++++- library/core/src/panicking.rs | 1 + library/core/src/ptr/const_ptr.rs | 11 ++++- library/core/src/ptr/mod.rs | 1 + library/core/src/ptr/mut_ptr.rs | 10 ++++- library/core/src/slice/index.rs | 7 +++- library/core/src/str/mod.rs | 1 + .../intrinsics/const-eval-select-backtrace.rs | 5 +-- .../const-eval-select-backtrace.run.stderr | 2 +- .../intrinsics/const-eval-select-stability.rs | 2 +- .../ui/intrinsics/const-eval-select-x86_64.rs | 4 +- tests/ui/intrinsics/const-eval-select.rs | 4 +- .../effects/minicore.rs | 3 +- 18 files changed, 84 insertions(+), 43 deletions(-) diff --git a/compiler/rustc_hir_analysis/src/check/intrinsic.rs b/compiler/rustc_hir_analysis/src/check/intrinsic.rs index 6e9b4236e2088..98e81a0e0f902 100644 --- a/compiler/rustc_hir_analysis/src/check/intrinsic.rs +++ b/compiler/rustc_hir_analysis/src/check/intrinsic.rs @@ -128,7 +128,8 @@ pub fn intrinsic_operation_unsafety(tcx: TyCtxt<'_>, intrinsic_id: LocalDefId) - | sym::fsub_algebraic | sym::fmul_algebraic | sym::fdiv_algebraic - | sym::frem_algebraic => hir::Unsafety::Normal, + | sym::frem_algebraic + | sym::const_eval_select => hir::Unsafety::Normal, _ => hir::Unsafety::Unsafe, }; diff --git a/library/alloc/src/alloc.rs b/library/alloc/src/alloc.rs index 0b1429397559d..e99d6268e535b 100644 --- a/library/alloc/src/alloc.rs +++ b/library/alloc/src/alloc.rs @@ -385,6 +385,7 @@ pub const fn handle_alloc_error(layout: Layout) -> ! { } #[cfg(not(feature = "panic_immediate_abort"))] + #[cfg_attr(not(bootstrap), allow(unused_unsafe))] // on bootstrap bump, remove unsafe block unsafe { core::intrinsics::const_eval_select((layout,), ct_error, rt_error) } diff --git a/library/core/src/ffi/c_str.rs b/library/core/src/ffi/c_str.rs index 20186a2de0fd8..0825281090cd1 100644 --- a/library/core/src/ffi/c_str.rs +++ b/library/core/src/ffi/c_str.rs @@ -428,10 +428,13 @@ impl CStr { unsafe { &*(bytes as *const [u8] as *const CStr) } } + #[cfg_attr(not(bootstrap), allow(unused_unsafe))] // on bootstrap bump, remove unsafe block // SAFETY: The const and runtime versions have identical behavior // unless the safety contract of `from_bytes_with_nul_unchecked` is // violated, which is UB. - unsafe { intrinsics::const_eval_select((bytes,), const_impl, rt_impl) } + unsafe { + intrinsics::const_eval_select((bytes,), const_impl, rt_impl) + } } /// Returns the inner pointer to this C string. @@ -719,6 +722,9 @@ const unsafe fn const_strlen(ptr: *const c_char) -> usize { unsafe { strlen(s) } } + #[cfg_attr(not(bootstrap), allow(unused_unsafe))] // on bootstrap bump, remove unsafe block // SAFETY: the two functions always provide equivalent functionality - unsafe { intrinsics::const_eval_select((ptr,), strlen_ct, strlen_rt) } + unsafe { + intrinsics::const_eval_select((ptr,), strlen_ct, strlen_rt) + } } diff --git a/library/core/src/intrinsics.rs b/library/core/src/intrinsics.rs index 96e667d63c5f3..9f8f99420f128 100644 --- a/library/core/src/intrinsics.rs +++ b/library/core/src/intrinsics.rs @@ -2515,6 +2515,8 @@ extern "rust-intrinsic" { /// intrinsic will be replaced with a call to `called_in_const`. It gets /// replaced with a call to `called_at_rt` otherwise. /// + /// This function is safe to call, but note the stability concerns below. + /// /// # Type Requirements /// /// The two functions must be both function items. They cannot be function @@ -2524,45 +2526,47 @@ extern "rust-intrinsic" { /// the two functions, therefore, both functions must accept the same type of /// arguments. Both functions must return RET. /// - /// # Safety + /// # Stability concerns /// - /// The two functions must behave observably equivalent. Safe code in other - /// crates may assume that calling a `const fn` at compile-time and at run-time - /// produces the same result. A function that produces a different result when - /// evaluated at run-time, or has any other observable side-effects, is - /// *unsound*. + /// Rust has not yet decided that `const fn` are allowed to tell whether + /// they run at compile-time or at runtime. Therefore, when using this + /// intrinsic anywhere that can be reached from stable, it is crucial that + /// the end-to-end behavior of the stable `const fn` is the same for both + /// modes of execution. (Here, Undefined Behavior is considerd "the same" + /// as any other behavior, so if the function exhibits UB at runtime then + /// it may do whatever it wants at compile-time.) /// /// Here is an example of how this could cause a problem: /// ```no_run /// #![feature(const_eval_select)] /// #![feature(core_intrinsics)] /// # #![allow(internal_features)] - /// use std::hint::unreachable_unchecked; + /// # #![cfg_attr(bootstrap, allow(unused))] /// use std::intrinsics::const_eval_select; /// - /// // Crate A + /// // Standard library + /// # #[cfg(not(bootstrap))] /// pub const fn inconsistent() -> i32 { /// fn runtime() -> i32 { 1 } /// const fn compiletime() -> i32 { 2 } /// - /// unsafe { - // // ⚠ This code violates the required equivalence of `compiletime` - /// // and `runtime`. - /// const_eval_select((), compiletime, runtime) - /// } + // // ⚠ This code violates the required equivalence of `compiletime` + /// // and `runtime`. + /// const_eval_select((), compiletime, runtime) /// } + /// # #[cfg(bootstrap)] + /// # pub const fn inconsistent() -> i32 { 0 } /// - /// // Crate B + /// // User Crate /// const X: i32 = inconsistent(); /// let x = inconsistent(); - /// if x != X { unsafe { unreachable_unchecked(); }} + /// assert_eq!(x, X); /// ``` /// - /// This code causes Undefined Behavior when being run, since the - /// `unreachable_unchecked` is actually being reached. The bug is in *crate A*, - /// which violates the principle that a `const fn` must behave the same at - /// compile-time and at run-time. The unsafe code in crate B is fine. + /// Currently such an assertion would always succeed; until Rust decides + /// otherwise, that principle should not be violated. #[rustc_const_unstable(feature = "const_eval_select", issue = "none")] + #[cfg_attr(not(bootstrap), rustc_safe_intrinsic)] pub fn const_eval_select( arg: ARG, called_in_const: F, diff --git a/library/core/src/num/f32.rs b/library/core/src/num/f32.rs index 47e16018a47ce..abdcb7099cacb 100644 --- a/library/core/src/num/f32.rs +++ b/library/core/src/num/f32.rs @@ -1153,8 +1153,11 @@ impl f32 { // Stability concerns. unsafe { mem::transmute(x) } } + #[cfg_attr(not(bootstrap), allow(unused_unsafe))] // on bootstrap bump, remove unsafe block // SAFETY: We use internal implementations that either always work or fail at compile time. - unsafe { intrinsics::const_eval_select((self,), ct_f32_to_u32, rt_f32_to_u32) } + unsafe { + intrinsics::const_eval_select((self,), ct_f32_to_u32, rt_f32_to_u32) + } } /// Raw transmutation from `u32`. @@ -1245,8 +1248,11 @@ impl f32 { // Stability concerns. unsafe { mem::transmute(x) } } + #[cfg_attr(not(bootstrap), allow(unused_unsafe))] // on bootstrap bump, remove unsafe block // SAFETY: We use internal implementations that either always work or fail at compile time. - unsafe { intrinsics::const_eval_select((v,), ct_u32_to_f32, rt_u32_to_f32) } + unsafe { + intrinsics::const_eval_select((v,), ct_u32_to_f32, rt_u32_to_f32) + } } /// Return the memory representation of this floating point number as a byte array in diff --git a/library/core/src/num/f64.rs b/library/core/src/num/f64.rs index cd69e758d28da..f4d2a4f216734 100644 --- a/library/core/src/num/f64.rs +++ b/library/core/src/num/f64.rs @@ -1146,8 +1146,11 @@ impl f64 { // Stability concerns. unsafe { mem::transmute::(rt) } } + #[cfg_attr(not(bootstrap), allow(unused_unsafe))] // on bootstrap bump, remove unsafe block // SAFETY: We use internal implementations that either always work or fail at compile time. - unsafe { intrinsics::const_eval_select((self,), ct_f64_to_u64, rt_f64_to_u64) } + unsafe { + intrinsics::const_eval_select((self,), ct_f64_to_u64, rt_f64_to_u64) + } } /// Raw transmutation from `u64`. @@ -1243,8 +1246,11 @@ impl f64 { // Stability concerns. unsafe { mem::transmute::(rt) } } + #[cfg_attr(not(bootstrap), allow(unused_unsafe))] // on bootstrap bump, remove unsafe block // SAFETY: We use internal implementations that either always work or fail at compile time. - unsafe { intrinsics::const_eval_select((v,), ct_u64_to_f64, rt_u64_to_f64) } + unsafe { + intrinsics::const_eval_select((v,), ct_u64_to_f64, rt_u64_to_f64) + } } /// Return the memory representation of this floating point number as a byte array in diff --git a/library/core/src/panicking.rs b/library/core/src/panicking.rs index 0819334b600b6..9e1184c8f5b88 100644 --- a/library/core/src/panicking.rs +++ b/library/core/src/panicking.rs @@ -117,6 +117,7 @@ pub const fn panic_nounwind_fmt(fmt: fmt::Arguments<'_>, force_no_backtrace: boo panic_fmt(fmt); } + #[cfg_attr(not(bootstrap), allow(unused_unsafe))] // on bootstrap bump, remove unsafe block // SAFETY: const panic does not care about unwinding unsafe { super::intrinsics::const_eval_select((fmt, force_no_backtrace), comptime, runtime); diff --git a/library/core/src/ptr/const_ptr.rs b/library/core/src/ptr/const_ptr.rs index 85a56d37ab75c..f2566fe9bccae 100644 --- a/library/core/src/ptr/const_ptr.rs +++ b/library/core/src/ptr/const_ptr.rs @@ -48,8 +48,11 @@ impl *const T { } } + #[cfg_attr(not(bootstrap), allow(unused_unsafe))] // on bootstrap bump, remove unsafe block // SAFETY: The two versions are equivalent at runtime. - unsafe { const_eval_select((self as *const u8,), const_impl, runtime_impl) } + unsafe { + const_eval_select((self as *const u8,), const_impl, runtime_impl) + } } /// Casts to a pointer of another type. @@ -806,6 +809,7 @@ impl *const T { where T: Sized, { + #[cfg_attr(not(bootstrap), allow(unused_unsafe))] // on bootstrap bump, remove unsafe block // SAFETY: The comparison has no side-effects, and the intrinsic // does this check internally in the CTFE implementation. unsafe { @@ -1623,8 +1627,11 @@ impl *const T { ptr.align_offset(align) == 0 } + #[cfg_attr(not(bootstrap), allow(unused_unsafe))] // on bootstrap bump, remove unsafe block // SAFETY: The two versions are equivalent at runtime. - unsafe { const_eval_select((self.cast::<()>(), align), const_impl, runtime_impl) } + unsafe { + const_eval_select((self.cast::<()>(), align), const_impl, runtime_impl) + } } } diff --git a/library/core/src/ptr/mod.rs b/library/core/src/ptr/mod.rs index fc5b08c9801a8..c0a3bbdb7048e 100644 --- a/library/core/src/ptr/mod.rs +++ b/library/core/src/ptr/mod.rs @@ -991,6 +991,7 @@ pub const unsafe fn swap_nonoverlapping(x: *mut T, y: *mut T, count: usize) { }; } + #[cfg_attr(not(bootstrap), allow(unused_unsafe))] // on bootstrap bump, remove unsafe block // SAFETY: the caller must guarantee that `x` and `y` are // valid for writes and properly aligned. unsafe { diff --git a/library/core/src/ptr/mut_ptr.rs b/library/core/src/ptr/mut_ptr.rs index 28ba26f5c16c4..8b0b22a02f2ba 100644 --- a/library/core/src/ptr/mut_ptr.rs +++ b/library/core/src/ptr/mut_ptr.rs @@ -48,8 +48,11 @@ impl *mut T { } } + #[cfg_attr(not(bootstrap), allow(unused_unsafe))] // on bootstrap bump, remove unsafe block // SAFETY: The two versions are equivalent at runtime. - unsafe { const_eval_select((self as *mut u8,), const_impl, runtime_impl) } + unsafe { + const_eval_select((self as *mut u8,), const_impl, runtime_impl) + } } /// Casts to a pointer of another type. @@ -1896,8 +1899,11 @@ impl *mut T { ptr.align_offset(align) == 0 } + #[cfg_attr(not(bootstrap), allow(unused_unsafe))] // on bootstrap bump, remove unsafe block // SAFETY: The two versions are equivalent at runtime. - unsafe { const_eval_select((self.cast::<()>(), align), const_impl, runtime_impl) } + unsafe { + const_eval_select((self.cast::<()>(), align), const_impl, runtime_impl) + } } } diff --git a/library/core/src/slice/index.rs b/library/core/src/slice/index.rs index 0e2d45c4ada6d..c771ea7047242 100644 --- a/library/core/src/slice/index.rs +++ b/library/core/src/slice/index.rs @@ -35,6 +35,7 @@ where #[track_caller] #[rustc_const_unstable(feature = "const_slice_index", issue = "none")] const fn slice_start_index_len_fail(index: usize, len: usize) -> ! { + #[cfg_attr(not(bootstrap), allow(unused_unsafe))] // on bootstrap bump, remove unsafe block // SAFETY: we are just panicking here unsafe { const_eval_select( @@ -63,6 +64,7 @@ const fn slice_start_index_len_fail_ct(_: usize, _: usize) -> ! { #[track_caller] #[rustc_const_unstable(feature = "const_slice_index", issue = "none")] const fn slice_end_index_len_fail(index: usize, len: usize) -> ! { + #[cfg_attr(not(bootstrap), allow(unused_unsafe))] // on bootstrap bump, remove unsafe block // SAFETY: we are just panicking here unsafe { const_eval_select((index, len), slice_end_index_len_fail_ct, slice_end_index_len_fail_rt) @@ -87,8 +89,11 @@ const fn slice_end_index_len_fail_ct(_: usize, _: usize) -> ! { #[track_caller] #[rustc_const_unstable(feature = "const_slice_index", issue = "none")] const fn slice_index_order_fail(index: usize, end: usize) -> ! { + #[cfg_attr(not(bootstrap), allow(unused_unsafe))] // on bootstrap bump, remove unsafe block // SAFETY: we are just panicking here - unsafe { const_eval_select((index, end), slice_index_order_fail_ct, slice_index_order_fail_rt) } + unsafe { + const_eval_select((index, end), slice_index_order_fail_ct, slice_index_order_fail_rt) + } } // FIXME const-hack diff --git a/library/core/src/str/mod.rs b/library/core/src/str/mod.rs index f965a50058b1b..4943bbc45d07a 100644 --- a/library/core/src/str/mod.rs +++ b/library/core/src/str/mod.rs @@ -86,6 +86,7 @@ use iter::{MatchesInternal, SplitNInternal}; #[rustc_allow_const_fn_unstable(const_eval_select)] #[cfg(not(feature = "panic_immediate_abort"))] const fn slice_error_fail(s: &str, begin: usize, end: usize) -> ! { + #[cfg_attr(not(bootstrap), allow(unused_unsafe))] // on bootstrap bump, remove unsafe block // SAFETY: panics for both branches unsafe { crate::intrinsics::const_eval_select( diff --git a/tests/ui/intrinsics/const-eval-select-backtrace.rs b/tests/ui/intrinsics/const-eval-select-backtrace.rs index d6b1c865bdfc7..ea4374f5d328e 100644 --- a/tests/ui/intrinsics/const-eval-select-backtrace.rs +++ b/tests/ui/intrinsics/const-eval-select-backtrace.rs @@ -12,8 +12,5 @@ fn uhoh() { const fn c() {} fn main() { - // safety: this is unsound and just used to test - unsafe { - std::intrinsics::const_eval_select((), c, uhoh); - } + std::intrinsics::const_eval_select((), c, uhoh); } diff --git a/tests/ui/intrinsics/const-eval-select-backtrace.run.stderr b/tests/ui/intrinsics/const-eval-select-backtrace.run.stderr index 3f196bd8abc39..8f38d54146b88 100644 --- a/tests/ui/intrinsics/const-eval-select-backtrace.run.stderr +++ b/tests/ui/intrinsics/const-eval-select-backtrace.run.stderr @@ -1,3 +1,3 @@ -thread 'main' panicked at $DIR/const-eval-select-backtrace.rs:17:9: +thread 'main' panicked at $DIR/const-eval-select-backtrace.rs:15:5: Aaah! note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace diff --git a/tests/ui/intrinsics/const-eval-select-stability.rs b/tests/ui/intrinsics/const-eval-select-stability.rs index f9554decec16b..575bc0cadda1b 100644 --- a/tests/ui/intrinsics/const-eval-select-stability.rs +++ b/tests/ui/intrinsics/const-eval-select-stability.rs @@ -13,7 +13,7 @@ const fn nothing(){} #[stable(since = "1.0", feature = "hey")] #[rustc_const_stable(since = "1.0", feature = "const_hey")] -pub const unsafe fn hey() { +pub const fn hey() { const_eval_select((), nothing, log); //~^ ERROR `const_eval_select` is not yet stable as a const fn } diff --git a/tests/ui/intrinsics/const-eval-select-x86_64.rs b/tests/ui/intrinsics/const-eval-select-x86_64.rs index 5ba7a443d0bb9..c17be2ddaca39 100644 --- a/tests/ui/intrinsics/const-eval-select-x86_64.rs +++ b/tests/ui/intrinsics/const-eval-select-x86_64.rs @@ -22,9 +22,7 @@ fn eq_rt(x: [i32; 4], y: [i32; 4]) -> bool { } const fn eq(x: [i32; 4], y: [i32; 4]) -> bool { - unsafe { - const_eval_select((x, y), eq_ct, eq_rt) - } + const_eval_select((x, y), eq_ct, eq_rt) } fn main() { diff --git a/tests/ui/intrinsics/const-eval-select.rs b/tests/ui/intrinsics/const-eval-select.rs index 353105cb0a163..66d83585fcec8 100644 --- a/tests/ui/intrinsics/const-eval-select.rs +++ b/tests/ui/intrinsics/const-eval-select.rs @@ -13,9 +13,9 @@ fn no() -> bool { false } -// not a sound use case; testing only +// not allowed on stable; testing only const fn is_const_eval() -> bool { - unsafe { const_eval_select((), yes, no) } + const_eval_select((), yes, no) } fn main() { diff --git a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs index 5ee38078a2950..1b380c989fa4a 100644 --- a/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs +++ b/tests/ui/rfcs/rfc-2632-const-trait-impl/effects/minicore.rs @@ -511,6 +511,7 @@ const fn drop(_: T) {} extern "rust-intrinsic" { #[rustc_const_stable(feature = "const_eval_select", since = "1.0.0")] + #[rustc_safe_intrinsic] fn const_eval_select( arg: ARG, called_in_const: F, @@ -525,5 +526,5 @@ fn test_const_eval_select() { const fn const_fn() {} fn rt_fn() {} - unsafe { const_eval_select((), const_fn, rt_fn); } + const_eval_select((), const_fn, rt_fn); } From d858809ca5f4a945377c47eb18fc7ed9202da24c Mon Sep 17 00:00:00 2001 From: Ralf Jung Date: Sat, 2 Mar 2024 19:03:50 +0100 Subject: [PATCH 05/15] typo Co-authored-by: bjorn3 <17426603+bjorn3@users.noreply.github.com> --- library/core/src/intrinsics.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/intrinsics.rs b/library/core/src/intrinsics.rs index 9f8f99420f128..5e93f495ddf1d 100644 --- a/library/core/src/intrinsics.rs +++ b/library/core/src/intrinsics.rs @@ -2532,7 +2532,7 @@ extern "rust-intrinsic" { /// they run at compile-time or at runtime. Therefore, when using this /// intrinsic anywhere that can be reached from stable, it is crucial that /// the end-to-end behavior of the stable `const fn` is the same for both - /// modes of execution. (Here, Undefined Behavior is considerd "the same" + /// modes of execution. (Here, Undefined Behavior is considered "the same" /// as any other behavior, so if the function exhibits UB at runtime then /// it may do whatever it wants at compile-time.) /// From 4dbd2562b4e2c464218a2949442becad34d55955 Mon Sep 17 00:00:00 2001 From: Christopher Durham Date: Tue, 13 Feb 2024 22:24:29 -0500 Subject: [PATCH 06/15] Explain use of display adapters --- library/core/src/fmt/mod.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/library/core/src/fmt/mod.rs b/library/core/src/fmt/mod.rs index e1b7b46a1ed2f..f82e8a0d60bff 100644 --- a/library/core/src/fmt/mod.rs +++ b/library/core/src/fmt/mod.rs @@ -633,6 +633,23 @@ pub use macros::Debug; /// [tostring]: ../../std/string/trait.ToString.html /// [tostring_function]: ../../std/string/trait.ToString.html#tymethod.to_string /// +/// # Internationalization +/// +/// Because a type only has one `Display` implementation, it is often preferable +/// to only implement `Display` when there is a single most "obvious" way that +/// values can be formatted as text. This could mean formatting according to the +/// "invariant" culture and "undefined" locale, or it could mean that the type +/// display is designed for a specific culture/locale, such as developer logs. +/// +/// If not all values have a justifiably canonical textual format or if you want +/// to support alternative formats not covered by the standard set of possible +/// [formatting traits], the most flexible approach is display adapters: methods +/// like [`str::escape_default`] or [`Path::display`] which create a wrapper +/// implementing `Display` to output the specific display format. +/// +/// [formatting traits]: ../../std/fmt/index.html#formatting-traits +/// [`Path::display`]: ../../std/path/struct.Path.html#method.display +/// /// # Examples /// /// Implementing `Display` on a type: From 215a4b6c2d71f2f7dd6254fcecbfc15bbc6fb392 Mon Sep 17 00:00:00 2001 From: Christopher Durham Date: Mon, 4 Mar 2024 19:49:45 -0500 Subject: [PATCH 07/15] doc wording improvements Co-authored-by: Simon Farnsworth --- library/core/src/fmt/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/core/src/fmt/mod.rs b/library/core/src/fmt/mod.rs index f82e8a0d60bff..4d73c8c3f99a9 100644 --- a/library/core/src/fmt/mod.rs +++ b/library/core/src/fmt/mod.rs @@ -635,7 +635,7 @@ pub use macros::Debug; /// /// # Internationalization /// -/// Because a type only has one `Display` implementation, it is often preferable +/// Because a type can only have one `Display` implementation, it is often preferable /// to only implement `Display` when there is a single most "obvious" way that /// values can be formatted as text. This could mean formatting according to the /// "invariant" culture and "undefined" locale, or it could mean that the type From b5d7da878fa329b37f06d37c6a1a4d049953e7a0 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Fri, 1 Mar 2024 13:00:06 +1100 Subject: [PATCH 08/15] Decouple `DummyAstNode` and `DummyResult`. They are two different ways of creating dummy results, with two different purposes. Their implementations are separate except for crates, where `DummyResult` depends on `DummyAstNode`. This commit removes that dependency, so they are now fully separate. It also expands the comment on `DummyAstNode`. --- compiler/rustc_ast/src/mut_visit.rs | 5 ++++- compiler/rustc_expand/src/base.rs | 14 ++++++++++++-- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/compiler/rustc_ast/src/mut_visit.rs b/compiler/rustc_ast/src/mut_visit.rs index bbbb34f7f2f48..da4328d8ce267 100644 --- a/compiler/rustc_ast/src/mut_visit.rs +++ b/compiler/rustc_ast/src/mut_visit.rs @@ -1604,7 +1604,10 @@ pub fn noop_visit_capture_by(capture_by: &mut CaptureBy, vis: &mu } } -/// Some value for the AST node that is valid but possibly meaningless. +/// Some value for the AST node that is valid but possibly meaningless. Similar +/// to `Default` but not intended for wide use. The value will never be used +/// meaningfully, it exists just to support unwinding in `visit_clobber` in the +/// case where its closure panics. pub trait DummyAstNode { fn dummy() -> Self; } diff --git a/compiler/rustc_expand/src/base.rs b/compiler/rustc_expand/src/base.rs index 485f0e7e46deb..d8ac4a540378e 100644 --- a/compiler/rustc_expand/src/base.rs +++ b/compiler/rustc_expand/src/base.rs @@ -4,7 +4,6 @@ use crate::expand::{self, AstFragment, Invocation}; use crate::module::DirOwnership; use rustc_ast::attr::MarkedAttrs; -use rustc_ast::mut_visit::DummyAstNode; use rustc_ast::ptr::P; use rustc_ast::token::{self, Nonterminal}; use rustc_ast::tokenstream::TokenStream; @@ -582,6 +581,17 @@ impl DummyResult { tokens: None, }) } + + /// A plain dummy crate. + pub fn raw_crate() -> ast::Crate { + ast::Crate { + attrs: Default::default(), + items: Default::default(), + spans: Default::default(), + id: ast::DUMMY_NODE_ID, + is_placeholder: Default::default(), + } + } } impl MacResult for DummyResult { @@ -650,7 +660,7 @@ impl MacResult for DummyResult { } fn make_crate(self: Box) -> Option { - Some(DummyAstNode::dummy()) + Some(DummyResult::raw_crate()) } } From a9dff2d931ad6844344c1b81f343ccdd1f4abdd9 Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Sat, 2 Mar 2024 08:24:45 +1100 Subject: [PATCH 09/15] Remove unused `impl DummyAstNode for Block`. --- compiler/rustc_ast/src/mut_visit.rs | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/compiler/rustc_ast/src/mut_visit.rs b/compiler/rustc_ast/src/mut_visit.rs index da4328d8ce267..c517c6138ceb6 100644 --- a/compiler/rustc_ast/src/mut_visit.rs +++ b/compiler/rustc_ast/src/mut_visit.rs @@ -1682,19 +1682,6 @@ impl DummyAstNode for Stmt { } } -impl DummyAstNode for Block { - fn dummy() -> Self { - Block { - stmts: Default::default(), - id: DUMMY_NODE_ID, - rules: BlockCheckMode::Default, - span: Default::default(), - tokens: Default::default(), - could_be_bare_literal: Default::default(), - } - } -} - impl DummyAstNode for Crate { fn dummy() -> Self { Crate { From c98be3254fdd8bde32489e4a1a9b0d88185a506f Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Wed, 28 Feb 2024 12:20:04 +0000 Subject: [PATCH 10/15] Stop using Bubble in coherence and instead emulate it with an intercrate check --- compiler/rustc_infer/src/infer/opaque_types.rs | 15 +++++++++++++-- .../rustc_trait_selection/src/traits/coherence.rs | 2 -- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/compiler/rustc_infer/src/infer/opaque_types.rs b/compiler/rustc_infer/src/infer/opaque_types.rs index 7a789a1b41bca..70a07f06b1f23 100644 --- a/compiler/rustc_infer/src/infer/opaque_types.rs +++ b/compiler/rustc_infer/src/infer/opaque_types.rs @@ -101,6 +101,15 @@ impl<'tcx> InferCtxt<'tcx> { let process = |a: Ty<'tcx>, b: Ty<'tcx>| match *a.kind() { ty::Alias(ty::Opaque, ty::AliasTy { def_id, args, .. }) if def_id.is_local() => { let def_id = def_id.expect_local(); + if self.intercrate { + // See comment on `insert_hidden_type` for why this is sufficient in coherence + return Some(self.register_hidden_type( + OpaqueTypeKey { def_id, args }, + cause.clone(), + param_env, + b, + )); + } match self.defining_use_anchor { DefiningAnchor::Bind(_) => { // Check that this is `impl Trait` type is @@ -142,8 +151,10 @@ impl<'tcx> InferCtxt<'tcx> { } } DefiningAnchor::Bubble => {} - DefiningAnchor::Error => return None, - }; + DefiningAnchor::Error => { + return None; + } + } if let ty::Alias(ty::Opaque, ty::AliasTy { def_id: b_def_id, .. }) = *b.kind() { // We could accept this, but there are various ways to handle this situation, and we don't // want to make a decision on it right now. Likely this case is so super rare anyway, that diff --git a/compiler/rustc_trait_selection/src/traits/coherence.rs b/compiler/rustc_trait_selection/src/traits/coherence.rs index 68111c4cc1fdc..63962c59ff2ea 100644 --- a/compiler/rustc_trait_selection/src/traits/coherence.rs +++ b/compiler/rustc_trait_selection/src/traits/coherence.rs @@ -26,7 +26,6 @@ use rustc_infer::traits::{util, FulfillmentErrorCode, TraitEngine, TraitEngineEx use rustc_middle::traits::query::NoSolution; use rustc_middle::traits::solve::{CandidateSource, Certainty, Goal}; use rustc_middle::traits::specialization_graph::OverlapMode; -use rustc_middle::traits::DefiningAnchor; use rustc_middle::ty::fast_reject::{DeepRejectCtxt, TreatParams}; use rustc_middle::ty::visit::{TypeVisitable, TypeVisitableExt}; use rustc_middle::ty::{self, Ty, TyCtxt, TypeSuperVisitable, TypeVisitor}; @@ -207,7 +206,6 @@ fn overlap<'tcx>( let infcx = tcx .infer_ctxt() - .with_opaque_type_inference(DefiningAnchor::Bubble) .skip_leak_check(skip_leak_check.is_yes()) .intercrate(true) .with_next_trait_solver(tcx.next_trait_solver_in_coherence()) From 2ee0409f323574af15c5d75dbfc42b1721720de8 Mon Sep 17 00:00:00 2001 From: David Wood Date: Mon, 19 Feb 2024 15:07:08 +0000 Subject: [PATCH 11/15] errors: share `SilentEmitter` between rustc and rustfmt Signed-off-by: David Wood --- compiler/rustc_errors/src/emitter.rs | 32 ++----- compiler/rustc_errors/src/lib.rs | 95 +++++++++++++++----- compiler/rustc_interface/src/interface.rs | 14 +-- compiler/rustc_session/src/parse.rs | 18 ++-- src/tools/rustfmt/src/parse/session.rs | 73 ++++++--------- src/tools/rustfmt/tests/rustfmt/main.rs | 2 +- src/tools/rustfmt/tests/target/issue_6082.rs | 5 ++ 7 files changed, 131 insertions(+), 108 deletions(-) create mode 100644 src/tools/rustfmt/tests/target/issue_6082.rs diff --git a/compiler/rustc_errors/src/emitter.rs b/compiler/rustc_errors/src/emitter.rs index 293d8f01e673a..57b8df52f4b79 100644 --- a/compiler/rustc_errors/src/emitter.rs +++ b/compiler/rustc_errors/src/emitter.rs @@ -10,7 +10,6 @@ use rustc_span::source_map::SourceMap; use rustc_span::{FileLines, FileName, SourceFile, Span}; -use crate::error::TranslateError; use crate::snippet::{ Annotation, AnnotationColumn, AnnotationType, Line, MultilineAnnotation, Style, StyledString, }; @@ -539,18 +538,9 @@ impl Emitter for HumanEmitter { /// Fatal diagnostics are forwarded to `fatal_dcx` to avoid silent /// failures of rustc, as witnessed e.g. in issue #89358. pub struct SilentEmitter { + pub fallback_bundle: LazyFallbackBundle, pub fatal_dcx: DiagCtxt, - pub fatal_note: String, -} - -pub fn silent_translate<'a>(message: &'a DiagMessage) -> Result, TranslateError<'_>> { - match message { - DiagMessage::Str(msg) | DiagMessage::Translated(msg) => Ok(Cow::Borrowed(msg)), - DiagMessage::FluentIdentifier(identifier, _) => { - // Any value works here. - Ok(identifier.clone()) - } - } + pub fatal_note: Option, } impl Translate for SilentEmitter { @@ -559,17 +549,9 @@ impl Translate for SilentEmitter { } fn fallback_fluent_bundle(&self) -> &FluentBundle { - panic!("silent emitter attempted to translate message") - } - - // Override `translate_message` for the silent emitter because eager translation of - // subdiagnostics result in a call to this. - fn translate_message<'a>( - &'a self, - message: &'a DiagMessage, - _: &'a FluentArgs<'_>, - ) -> Result, TranslateError<'_>> { - silent_translate(message) + // Ideally this field wouldn't be necessary and the fallback bundle in `fatal_dcx` would be + // used but the lock prevents this. + &self.fallback_bundle } } @@ -580,7 +562,9 @@ impl Emitter for SilentEmitter { fn emit_diagnostic(&mut self, mut diag: DiagInner) { if diag.level == Level::Fatal { - diag.sub(Level::Note, self.fatal_note.clone(), MultiSpan::new()); + if let Some(fatal_note) = &self.fatal_note { + diag.sub(Level::Note, fatal_note.clone(), MultiSpan::new()); + } self.fatal_dcx.emit_diagnostic(diag); } } diff --git a/compiler/rustc_errors/src/lib.rs b/compiler/rustc_errors/src/lib.rs index 0a6d66f52dad0..0caa8fa9e8abe 100644 --- a/compiler/rustc_errors/src/lib.rs +++ b/compiler/rustc_errors/src/lib.rs @@ -63,7 +63,7 @@ use emitter::{is_case_difference, DynEmitter, Emitter}; use registry::Registry; use rustc_data_structures::fx::{FxHashSet, FxIndexMap, FxIndexSet}; use rustc_data_structures::stable_hasher::{Hash128, StableHasher}; -use rustc_data_structures::sync::Lock; +use rustc_data_structures::sync::{Lock, Lrc}; use rustc_data_structures::AtomicRef; use rustc_lint_defs::LintExpectationId; use rustc_span::source_map::SourceMap; @@ -606,29 +606,54 @@ impl DiagCtxt { } pub fn new(emitter: Box) -> Self { - Self { - inner: Lock::new(DiagCtxtInner { - flags: DiagCtxtFlags { can_emit_warnings: true, ..Default::default() }, - err_guars: Vec::new(), - lint_err_guars: Vec::new(), - delayed_bugs: Vec::new(), - deduplicated_err_count: 0, - deduplicated_warn_count: 0, - emitter, - must_produce_diag: false, - has_printed: false, - suppressed_expected_diag: false, - taught_diagnostics: Default::default(), - emitted_diagnostic_codes: Default::default(), - emitted_diagnostics: Default::default(), - stashed_diagnostics: Default::default(), - future_breakage_diagnostics: Vec::new(), - check_unstable_expect_diagnostics: false, - unstable_expect_diagnostics: Vec::new(), - fulfilled_expectations: Default::default(), - ice_file: None, - }), + Self { inner: Lock::new(DiagCtxtInner::new(emitter)) } + } + + pub fn make_silent(&mut self, fallback_bundle: LazyFallbackBundle, fatal_note: Option) { + self.wrap_emitter(|old_dcx| { + Box::new(emitter::SilentEmitter { + fallback_bundle, + fatal_dcx: DiagCtxt { inner: Lock::new(old_dcx) }, + fatal_note, + }) + }); + } + + fn wrap_emitter(&mut self, f: F) + where + F: FnOnce(DiagCtxtInner) -> Box, + { + // A empty type that implements `Emitter` so that a `DiagCtxtInner` can be constructed + // to temporarily swap in place of the real one, which will be used in constructing + // its replacement. + struct FalseEmitter; + + impl Emitter for FalseEmitter { + fn emit_diagnostic(&mut self, _: DiagInner) { + unimplemented!("false emitter must only used during `wrap_emitter`") + } + + fn source_map(&self) -> Option<&Lrc> { + unimplemented!("false emitter must only used during `wrap_emitter`") + } } + + impl translation::Translate for FalseEmitter { + fn fluent_bundle(&self) -> Option<&Lrc> { + unimplemented!("false emitter must only used during `wrap_emitter`") + } + + fn fallback_fluent_bundle(&self) -> &FluentBundle { + unimplemented!("false emitter must only used during `wrap_emitter`") + } + } + + let mut inner = self.inner.borrow_mut(); + let mut prev_dcx = DiagCtxtInner::new(Box::new(FalseEmitter)); + std::mem::swap(&mut *inner, &mut prev_dcx); + let new_emitter = f(prev_dcx); + let mut new_dcx = DiagCtxtInner::new(new_emitter); + std::mem::swap(&mut *inner, &mut new_dcx); } /// Translate `message` eagerly with `args` to `SubdiagMessage::Eager`. @@ -1345,6 +1370,30 @@ impl DiagCtxt { // `DiagCtxt::foo()` just borrows `inner` and forwards a call to // `DiagCtxtInner::foo`. impl DiagCtxtInner { + fn new(emitter: Box) -> Self { + Self { + flags: DiagCtxtFlags { can_emit_warnings: true, ..Default::default() }, + err_guars: Vec::new(), + lint_err_guars: Vec::new(), + delayed_bugs: Vec::new(), + deduplicated_err_count: 0, + deduplicated_warn_count: 0, + emitter, + must_produce_diag: false, + has_printed: false, + suppressed_expected_diag: false, + taught_diagnostics: Default::default(), + emitted_diagnostic_codes: Default::default(), + emitted_diagnostics: Default::default(), + stashed_diagnostics: Default::default(), + future_breakage_diagnostics: Vec::new(), + check_unstable_expect_diagnostics: false, + unstable_expect_diagnostics: Vec::new(), + fulfilled_expectations: Default::default(), + ice_file: None, + } + } + /// Emit all stashed diagnostics. fn emit_stashed_diagnostics(&mut self) -> Option { let mut guar = None; diff --git a/compiler/rustc_interface/src/interface.rs b/compiler/rustc_interface/src/interface.rs index 3a2bbed19beff..b2ec8e5342924 100644 --- a/compiler/rustc_interface/src/interface.rs +++ b/compiler/rustc_interface/src/interface.rs @@ -45,9 +45,10 @@ pub struct Compiler { pub(crate) fn parse_cfg(dcx: &DiagCtxt, cfgs: Vec) -> Cfg { cfgs.into_iter() .map(|s| { - let psess = ParseSess::with_silent_emitter(format!( - "this error occurred on the command line: `--cfg={s}`" - )); + let psess = ParseSess::with_silent_emitter( + vec![crate::DEFAULT_LOCALE_RESOURCE, rustc_parse::DEFAULT_LOCALE_RESOURCE], + format!("this error occurred on the command line: `--cfg={s}`"), + ); let filename = FileName::cfg_spec_source_code(&s); macro_rules! error { @@ -107,9 +108,10 @@ pub(crate) fn parse_check_cfg(dcx: &DiagCtxt, specs: Vec) -> CheckCfg { let mut check_cfg = CheckCfg { exhaustive_names, exhaustive_values, ..CheckCfg::default() }; for s in specs { - let psess = ParseSess::with_silent_emitter(format!( - "this error occurred on the command line: `--check-cfg={s}`" - )); + let psess = ParseSess::with_silent_emitter( + vec![crate::DEFAULT_LOCALE_RESOURCE, rustc_parse::DEFAULT_LOCALE_RESOURCE], + format!("this error occurred on the command line: `--check-cfg={s}`"), + ); let filename = FileName::cfg_spec_source_code(&s); macro_rules! error { diff --git a/compiler/rustc_session/src/parse.rs b/compiler/rustc_session/src/parse.rs index 25b5422f3225f..506bd5d5dbd81 100644 --- a/compiler/rustc_session/src/parse.rs +++ b/compiler/rustc_session/src/parse.rs @@ -265,14 +265,20 @@ impl ParseSess { } } - pub fn with_silent_emitter(fatal_note: String) -> Self { - let fallback_bundle = fallback_fluent_bundle(Vec::new(), false); + pub fn with_silent_emitter(locale_resources: Vec<&'static str>, fatal_note: String) -> Self { + let fallback_bundle = fallback_fluent_bundle(locale_resources, false); let sm = Lrc::new(SourceMap::new(FilePathMapping::empty())); - let emitter = - Box::new(HumanEmitter::new(stderr_destination(ColorConfig::Auto), fallback_bundle)); + let emitter = Box::new(HumanEmitter::new( + stderr_destination(ColorConfig::Auto), + fallback_bundle.clone(), + )); let fatal_dcx = DiagCtxt::new(emitter); - let dcx = - DiagCtxt::new(Box::new(SilentEmitter { fatal_dcx, fatal_note })).disable_warnings(); + let dcx = DiagCtxt::new(Box::new(SilentEmitter { + fallback_bundle, + fatal_dcx, + fatal_note: Some(fatal_note), + })) + .disable_warnings(); ParseSess::with_dcx(dcx, sm) } diff --git a/src/tools/rustfmt/src/parse/session.rs b/src/tools/rustfmt/src/parse/session.rs index 11af986051351..60a89a5753641 100644 --- a/src/tools/rustfmt/src/parse/session.rs +++ b/src/tools/rustfmt/src/parse/session.rs @@ -1,9 +1,8 @@ -use std::borrow::Cow; use std::path::Path; use std::sync::atomic::{AtomicBool, Ordering}; use rustc_data_structures::sync::{IntoDynSyncSend, Lrc}; -use rustc_errors::emitter::{stderr_destination, DynEmitter, Emitter, HumanEmitter}; +use rustc_errors::emitter::{stderr_destination, DynEmitter, Emitter, HumanEmitter, SilentEmitter}; use rustc_errors::translation::Translate; use rustc_errors::{ColorConfig, Diag, DiagCtxt, DiagInner, Level as DiagnosticLevel}; use rustc_session::parse::ParseSess as RawParseSess; @@ -28,41 +27,6 @@ pub(crate) struct ParseSess { can_reset_errors: Lrc, } -/// Emitter which discards every error. -struct SilentEmitter; - -impl Translate for SilentEmitter { - fn fluent_bundle(&self) -> Option<&Lrc> { - None - } - - fn fallback_fluent_bundle(&self) -> &rustc_errors::FluentBundle { - panic!("silent emitter attempted to translate a diagnostic"); - } - - // Override `translate_message` for the silent emitter because eager translation of - // subdiagnostics result in a call to this. - fn translate_message<'a>( - &'a self, - message: &'a rustc_errors::DiagMessage, - _: &'a rustc_errors::translation::FluentArgs<'_>, - ) -> Result, rustc_errors::error::TranslateError<'_>> { - rustc_errors::emitter::silent_translate(message) - } -} - -impl Emitter for SilentEmitter { - fn source_map(&self) -> Option<&Lrc> { - None - } - - fn emit_diagnostic(&mut self, _diag: DiagInner) {} -} - -fn silent_emitter() -> Box { - Box::new(SilentEmitter {}) -} - /// Emit errors against every files expect ones specified in the `ignore_path_set`. struct SilentOnIgnoredFilesEmitter { ignore_path_set: IntoDynSyncSend>, @@ -143,17 +107,23 @@ fn default_dcx( ColorConfig::Never }; - let emitter = if hide_parse_errors { - silent_emitter() + let fallback_bundle = rustc_errors::fallback_fluent_bundle( + rustc_driver::DEFAULT_LOCALE_RESOURCES.to_vec(), + false, + ); + let emitter = Box::new( + HumanEmitter::new(stderr_destination(emit_color), fallback_bundle.clone()) + .sm(Some(source_map.clone())), + ); + + let emitter: Box = if hide_parse_errors { + Box::new(SilentEmitter { + fallback_bundle, + fatal_dcx: DiagCtxt::new(emitter), + fatal_note: None, + }) } else { - let fallback_bundle = rustc_errors::fallback_fluent_bundle( - rustc_driver::DEFAULT_LOCALE_RESOURCES.to_vec(), - false, - ); - Box::new( - HumanEmitter::new(stderr_destination(emit_color), fallback_bundle) - .sm(Some(source_map.clone())), - ) + emitter }; DiagCtxt::new(Box::new(SilentOnIgnoredFilesEmitter { has_non_ignorable_parser_errors: false, @@ -232,7 +202,14 @@ impl ParseSess { } pub(crate) fn set_silent_emitter(&mut self) { - self.raw_psess.dcx = DiagCtxt::new(silent_emitter()); + // Ideally this invocation wouldn't be necessary and the fallback bundle in + // `self.parse_sess.dcx` could be used, but the lock in `DiagCtxt` prevents this. + // See `::fallback_fluent_bundle`. + let fallback_bundle = rustc_errors::fallback_fluent_bundle( + rustc_driver::DEFAULT_LOCALE_RESOURCES.to_vec(), + false, + ); + self.raw_psess.dcx.make_silent(fallback_bundle, None); } pub(crate) fn span_to_filename(&self, span: Span) -> FileName { diff --git a/src/tools/rustfmt/tests/rustfmt/main.rs b/src/tools/rustfmt/tests/rustfmt/main.rs index 7dcf7c8416eec..e66fad1e7fa7b 100644 --- a/src/tools/rustfmt/tests/rustfmt/main.rs +++ b/src/tools/rustfmt/tests/rustfmt/main.rs @@ -176,7 +176,7 @@ fn rustfmt_emits_error_on_line_overflow_true() { #[test] #[allow(non_snake_case)] fn dont_emit_ICE() { - let files = ["tests/target/issue_5728.rs", "tests/target/issue_5729.rs"]; + let files = ["tests/target/issue_5728.rs", "tests/target/issue_5729.rs", "tests/target/issue_6082.rs"]; for file in files { let args = [file]; diff --git a/src/tools/rustfmt/tests/target/issue_6082.rs b/src/tools/rustfmt/tests/target/issue_6082.rs new file mode 100644 index 0000000000000..58e512c710e98 --- /dev/null +++ b/src/tools/rustfmt/tests/target/issue_6082.rs @@ -0,0 +1,5 @@ +macro_rules! test { + ($T:ident, $b:lifetime) => { + Box<$T<$b>> + }; +} From ec24d7567a186c57d8dea19e3e03cb6e08958204 Mon Sep 17 00:00:00 2001 From: WANG Rui Date: Tue, 5 Mar 2024 20:20:32 +0800 Subject: [PATCH 12/15] loongarch: add frecipe and relax target feature --- compiler/rustc_target/src/target_features.rs | 2 ++ tests/ui/check-cfg/well-known-values.stderr | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler/rustc_target/src/target_features.rs b/compiler/rustc_target/src/target_features.rs index 2b7ac68c21dfb..b5cee4f34f5ee 100644 --- a/compiler/rustc_target/src/target_features.rs +++ b/compiler/rustc_target/src/target_features.rs @@ -377,10 +377,12 @@ const LOONGARCH_ALLOWED_FEATURES: &[(&str, Stability)] = &[ // tidy-alphabetical-start ("d", Unstable(sym::loongarch_target_feature)), ("f", Unstable(sym::loongarch_target_feature)), + ("frecipe", Unstable(sym::loongarch_target_feature)), ("lasx", Unstable(sym::loongarch_target_feature)), ("lbt", Unstable(sym::loongarch_target_feature)), ("lsx", Unstable(sym::loongarch_target_feature)), ("lvz", Unstable(sym::loongarch_target_feature)), + ("relax", Unstable(sym::loongarch_target_feature)), ("ual", Unstable(sym::loongarch_target_feature)), // tidy-alphabetical-end ]; diff --git a/tests/ui/check-cfg/well-known-values.stderr b/tests/ui/check-cfg/well-known-values.stderr index 01fc3f83f162b..b84a12bffc1e8 100644 --- a/tests/ui/check-cfg/well-known-values.stderr +++ b/tests/ui/check-cfg/well-known-values.stderr @@ -154,7 +154,7 @@ warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` LL | target_feature = "_UNEXPECTED_VALUE", | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | - = note: expected values for `target_feature` are: `10e60`, `2e3`, `3e3r1`, `3e3r2`, `3e3r3`, `3e7`, `7e10`, `a`, `aclass`, `adx`, `aes`, `altivec`, `alu32`, `atomics`, `avx`, `avx2`, `avx512bf16`, `avx512bitalg`, `avx512bw`, `avx512cd`, `avx512dq`, `avx512er`, `avx512f`, `avx512fp16`, `avx512ifma`, `avx512pf`, `avx512vbmi`, `avx512vbmi2`, `avx512vl`, `avx512vnni`, `avx512vp2intersect`, `avx512vpopcntdq`, `bf16`, `bmi1`, `bmi2`, `bti`, `bulk-memory`, `c`, `cache`, `cmpxchg16b`, `crc`, `crt-static`, `d`, `d32`, `dit`, `doloop`, `dotprod`, `dpb`, `dpb2`, `dsp`, `dsp1e2`, `dspe60`, `e`, `e1`, `e2`, `edsp`, `elrw`, `ermsb`, `exception-handling`, `f`, `f16c`, `f32mm`, `f64mm`, `fast-unaligned-access`, `fcma`, `fdivdu`, `fhm`, `flagm`, `float1e2`, `float1e3`, `float3e4`, `float7e60`, `floate1`, `fma`, `fp-armv8`, `fp16`, `fp64`, `fpuv2_df`, `fpuv2_sf`, `fpuv3_df`, `fpuv3_hf`, `fpuv3_hi`, `fpuv3_sf`, `frintts`, `fxsr`, `gfni`, `hard-float`, `hard-float-abi`, `hard-tp`, `high-registers`, `hvx`, `hvx-length128b`, `hwdiv`, `i8mm`, `jsconv`, `lahfsahf`, `lasx`, `lbt`, `lor`, `lse`, `lsx`, `lvz`, `lzcnt`, `m`, `mclass`, `movbe`, `mp`, `mp1e2`, `msa`, `mte`, `multivalue`, `mutable-globals`, `neon`, `nontrapping-fptoint`, `nvic`, `paca`, `pacg`, `pan`, `pclmulqdq`, `pmuv3`, `popcnt`, `power10-vector`, `power8-altivec`, `power8-vector`, `power9-altivec`, `power9-vector`, `prfchw`, `rand`, `ras`, `rclass`, `rcpc`, `rcpc2`, `rdm`, `rdrand`, `rdseed`, `reference-types`, `relax`, `relaxed-simd`, `rtm`, `sb`, `sha`, `sha2`, `sha3`, `sign-ext`, `simd128`, `sm4`, `spe`, `ssbs`, `sse`, `sse2`, `sse3`, `sse4.1`, `sse4.2`, `sse4a`, `ssse3`, `sve`, `sve2`, `sve2-aes`, `sve2-bitperm`, `sve2-sha3`, `sve2-sm4`, `tbm`, `thumb-mode`, `thumb2`, `tme`, `trust`, `trustzone`, `ual`, `v`, `v5te`, `v6`, `v6k`, `v6t2`, `v7`, `v8`, `v8.1a`, `v8.2a`, `v8.3a`, `v8.4a`, `v8.5a`, `v8.6a`, `v8.7a`, `vaes`, `vdsp2e60f`, `vdspv1`, `vdspv2`, `vfp2`, `vfp3`, `vfp4`, `vh`, `virt`, `virtualization`, `vpclmulqdq`, `vsx`, `xsave`, `xsavec`, `xsaveopt`, `xsaves`, `zba`, `zbb`, `zbc`, `zbkb`, `zbkc`, `zbkx`, `zbs`, `zdinx`, `zfh`, `zfhmin`, `zfinx`, `zhinx`, `zhinxmin`, `zk`, `zkn`, `zknd`, `zkne`, `zknh`, `zkr`, `zks`, `zksed`, `zksh`, `zkt` + = note: expected values for `target_feature` are: `10e60`, `2e3`, `3e3r1`, `3e3r2`, `3e3r3`, `3e7`, `7e10`, `a`, `aclass`, `adx`, `aes`, `altivec`, `alu32`, `atomics`, `avx`, `avx2`, `avx512bf16`, `avx512bitalg`, `avx512bw`, `avx512cd`, `avx512dq`, `avx512er`, `avx512f`, `avx512fp16`, `avx512ifma`, `avx512pf`, `avx512vbmi`, `avx512vbmi2`, `avx512vl`, `avx512vnni`, `avx512vp2intersect`, `avx512vpopcntdq`, `bf16`, `bmi1`, `bmi2`, `bti`, `bulk-memory`, `c`, `cache`, `cmpxchg16b`, `crc`, `crt-static`, `d`, `d32`, `dit`, `doloop`, `dotprod`, `dpb`, `dpb2`, `dsp`, `dsp1e2`, `dspe60`, `e`, `e1`, `e2`, `edsp`, `elrw`, `ermsb`, `exception-handling`, `f`, `f16c`, `f32mm`, `f64mm`, `fast-unaligned-access`, `fcma`, `fdivdu`, `fhm`, `flagm`, `float1e2`, `float1e3`, `float3e4`, `float7e60`, `floate1`, `fma`, `fp-armv8`, `fp16`, `fp64`, `fpuv2_df`, `fpuv2_sf`, `fpuv3_df`, `fpuv3_hf`, `fpuv3_hi`, `fpuv3_sf`, `frecipe`, `frintts`, `fxsr`, `gfni`, `hard-float`, `hard-float-abi`, `hard-tp`, `high-registers`, `hvx`, `hvx-length128b`, `hwdiv`, `i8mm`, `jsconv`, `lahfsahf`, `lasx`, `lbt`, `lor`, `lse`, `lsx`, `lvz`, `lzcnt`, `m`, `mclass`, `movbe`, `mp`, `mp1e2`, `msa`, `mte`, `multivalue`, `mutable-globals`, `neon`, `nontrapping-fptoint`, `nvic`, `paca`, `pacg`, `pan`, `pclmulqdq`, `pmuv3`, `popcnt`, `power10-vector`, `power8-altivec`, `power8-vector`, `power9-altivec`, `power9-vector`, `prfchw`, `rand`, `ras`, `rclass`, `rcpc`, `rcpc2`, `rdm`, `rdrand`, `rdseed`, `reference-types`, `relax`, `relaxed-simd`, `rtm`, `sb`, `sha`, `sha2`, `sha3`, `sign-ext`, `simd128`, `sm4`, `spe`, `ssbs`, `sse`, `sse2`, `sse3`, `sse4.1`, `sse4.2`, `sse4a`, `ssse3`, `sve`, `sve2`, `sve2-aes`, `sve2-bitperm`, `sve2-sha3`, `sve2-sm4`, `tbm`, `thumb-mode`, `thumb2`, `tme`, `trust`, `trustzone`, `ual`, `v`, `v5te`, `v6`, `v6k`, `v6t2`, `v7`, `v8`, `v8.1a`, `v8.2a`, `v8.3a`, `v8.4a`, `v8.5a`, `v8.6a`, `v8.7a`, `vaes`, `vdsp2e60f`, `vdspv1`, `vdspv2`, `vfp2`, `vfp3`, `vfp4`, `vh`, `virt`, `virtualization`, `vpclmulqdq`, `vsx`, `xsave`, `xsavec`, `xsaveopt`, `xsaves`, `zba`, `zbb`, `zbc`, `zbkb`, `zbkc`, `zbkx`, `zbs`, `zdinx`, `zfh`, `zfhmin`, `zfinx`, `zhinx`, `zhinxmin`, `zk`, `zkn`, `zknd`, `zkne`, `zknh`, `zkr`, `zks`, `zksed`, `zksh`, `zkt` = note: see for more information about checking conditional configuration warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE` From 1db67fb854dfe56ff7b6e94e777e211b8d406dab Mon Sep 17 00:00:00 2001 From: Nilstrieb <48135649+Nilstrieb@users.noreply.github.com> Date: Sat, 2 Mar 2024 17:12:43 +0100 Subject: [PATCH 13/15] Add a `description` field to target definitions This is the short description (`64-bit MinGW (Windows 7+)`) including the platform requirements. The reason for doing it like this is that this PR will be quite prone to conflicts whenever targets get added, so it should be as simple as possible to get it merged. Future PRs which migrate targets are scoped to groups of targets, so they will not conflict as they can just touch these. This moves some of the information from the rustc book into the compiler. It cannot be queried yet, that is future work. It is also future work to fill out all the descriptions, which will coincide with the work of moving over existing target docs to the new format. --- compiler/rustc_target/src/spec/base/avr_gnu.rs | 1 + compiler/rustc_target/src/spec/mod.rs | 6 ++++++ .../rustc_target/src/spec/targets/aarch64_apple_darwin.rs | 1 + compiler/rustc_target/src/spec/targets/aarch64_apple_ios.rs | 1 + .../src/spec/targets/aarch64_apple_ios_macabi.rs | 1 + .../rustc_target/src/spec/targets/aarch64_apple_ios_sim.rs | 1 + .../rustc_target/src/spec/targets/aarch64_apple_tvos.rs | 1 + .../rustc_target/src/spec/targets/aarch64_apple_tvos_sim.rs | 1 + .../rustc_target/src/spec/targets/aarch64_apple_watchos.rs | 1 + .../src/spec/targets/aarch64_apple_watchos_sim.rs | 1 + .../src/spec/targets/aarch64_be_unknown_linux_gnu.rs | 1 + .../src/spec/targets/aarch64_be_unknown_linux_gnu_ilp32.rs | 1 + .../src/spec/targets/aarch64_be_unknown_netbsd.rs | 1 + .../rustc_target/src/spec/targets/aarch64_kmc_solid_asp3.rs | 1 + .../rustc_target/src/spec/targets/aarch64_linux_android.rs | 1 + .../spec/targets/aarch64_nintendo_switch_freestanding.rs | 1 + .../src/spec/targets/aarch64_pc_windows_gnullvm.rs | 1 + .../src/spec/targets/aarch64_pc_windows_msvc.rs | 1 + .../src/spec/targets/aarch64_unknown_freebsd.rs | 1 + .../src/spec/targets/aarch64_unknown_fuchsia.rs | 1 + .../rustc_target/src/spec/targets/aarch64_unknown_hermit.rs | 1 + .../src/spec/targets/aarch64_unknown_illumos.rs | 1 + .../src/spec/targets/aarch64_unknown_linux_gnu.rs | 1 + .../src/spec/targets/aarch64_unknown_linux_gnu_ilp32.rs | 1 + .../src/spec/targets/aarch64_unknown_linux_musl.rs | 1 + .../src/spec/targets/aarch64_unknown_linux_ohos.rs | 1 + .../rustc_target/src/spec/targets/aarch64_unknown_netbsd.rs | 1 + .../rustc_target/src/spec/targets/aarch64_unknown_none.rs | 1 + .../src/spec/targets/aarch64_unknown_none_softfloat.rs | 1 + .../src/spec/targets/aarch64_unknown_nto_qnx710.rs | 1 + .../src/spec/targets/aarch64_unknown_openbsd.rs | 1 + .../rustc_target/src/spec/targets/aarch64_unknown_redox.rs | 1 + .../rustc_target/src/spec/targets/aarch64_unknown_teeos.rs | 1 + .../rustc_target/src/spec/targets/aarch64_unknown_uefi.rs | 1 + .../src/spec/targets/aarch64_uwp_windows_msvc.rs | 1 + .../rustc_target/src/spec/targets/aarch64_wrs_vxworks.rs | 1 + .../rustc_target/src/spec/targets/arm64_32_apple_watchos.rs | 1 + .../rustc_target/src/spec/targets/arm64e_apple_darwin.rs | 1 + compiler/rustc_target/src/spec/targets/arm64e_apple_ios.rs | 1 + .../rustc_target/src/spec/targets/arm_linux_androideabi.rs | 1 + .../src/spec/targets/arm_unknown_linux_gnueabi.rs | 1 + .../src/spec/targets/arm_unknown_linux_gnueabihf.rs | 1 + .../src/spec/targets/arm_unknown_linux_musleabi.rs | 1 + .../src/spec/targets/arm_unknown_linux_musleabihf.rs | 1 + .../src/spec/targets/armeb_unknown_linux_gnueabi.rs | 1 + .../rustc_target/src/spec/targets/armebv7r_none_eabi.rs | 1 + .../rustc_target/src/spec/targets/armebv7r_none_eabihf.rs | 1 + compiler/rustc_target/src/spec/targets/armv4t_none_eabi.rs | 1 + .../src/spec/targets/armv4t_unknown_linux_gnueabi.rs | 1 + compiler/rustc_target/src/spec/targets/armv5te_none_eabi.rs | 1 + .../src/spec/targets/armv5te_unknown_linux_gnueabi.rs | 1 + .../src/spec/targets/armv5te_unknown_linux_musleabi.rs | 1 + .../src/spec/targets/armv5te_unknown_linux_uclibceabi.rs | 1 + .../rustc_target/src/spec/targets/armv6_unknown_freebsd.rs | 1 + .../src/spec/targets/armv6_unknown_netbsd_eabihf.rs | 1 + .../rustc_target/src/spec/targets/armv6k_nintendo_3ds.rs | 1 + .../src/spec/targets/armv7_linux_androideabi.rs | 1 + .../src/spec/targets/armv7_sony_vita_newlibeabihf.rs | 1 + .../rustc_target/src/spec/targets/armv7_unknown_freebsd.rs | 1 + .../src/spec/targets/armv7_unknown_linux_gnueabi.rs | 1 + .../src/spec/targets/armv7_unknown_linux_gnueabihf.rs | 1 + .../src/spec/targets/armv7_unknown_linux_musleabi.rs | 1 + .../src/spec/targets/armv7_unknown_linux_musleabihf.rs | 1 + .../src/spec/targets/armv7_unknown_linux_ohos.rs | 1 + .../src/spec/targets/armv7_unknown_linux_uclibceabi.rs | 1 + .../src/spec/targets/armv7_unknown_linux_uclibceabihf.rs | 1 + .../src/spec/targets/armv7_unknown_netbsd_eabihf.rs | 1 + .../src/spec/targets/armv7_wrs_vxworks_eabihf.rs | 1 + .../src/spec/targets/armv7a_kmc_solid_asp3_eabi.rs | 1 + .../src/spec/targets/armv7a_kmc_solid_asp3_eabihf.rs | 1 + compiler/rustc_target/src/spec/targets/armv7a_none_eabi.rs | 1 + .../rustc_target/src/spec/targets/armv7a_none_eabihf.rs | 1 + .../rustc_target/src/spec/targets/armv7k_apple_watchos.rs | 1 + compiler/rustc_target/src/spec/targets/armv7r_none_eabi.rs | 1 + .../rustc_target/src/spec/targets/armv7r_none_eabihf.rs | 1 + compiler/rustc_target/src/spec/targets/armv7s_apple_ios.rs | 1 + .../rustc_target/src/spec/targets/armv8r_none_eabihf.rs | 1 + .../rustc_target/src/spec/targets/bpfeb_unknown_none.rs | 1 + .../rustc_target/src/spec/targets/bpfel_unknown_none.rs | 1 + .../src/spec/targets/csky_unknown_linux_gnuabiv2.rs | 1 + .../src/spec/targets/csky_unknown_linux_gnuabiv2hf.rs | 1 + .../src/spec/targets/hexagon_unknown_linux_musl.rs | 1 + .../src/spec/targets/hexagon_unknown_none_elf.rs | 1 + compiler/rustc_target/src/spec/targets/i386_apple_ios.rs | 1 + .../rustc_target/src/spec/targets/i586_pc_nto_qnx700.rs | 1 + .../rustc_target/src/spec/targets/i586_unknown_netbsd.rs | 1 + compiler/rustc_target/src/spec/targets/i686_apple_darwin.rs | 1 + .../rustc_target/src/spec/targets/i686_linux_android.rs | 1 + .../rustc_target/src/spec/targets/i686_pc_windows_gnu.rs | 1 + .../src/spec/targets/i686_pc_windows_gnullvm.rs | 1 + .../rustc_target/src/spec/targets/i686_pc_windows_msvc.rs | 1 + .../rustc_target/src/spec/targets/i686_unknown_freebsd.rs | 1 + .../rustc_target/src/spec/targets/i686_unknown_haiku.rs | 1 + .../rustc_target/src/spec/targets/i686_unknown_hurd_gnu.rs | 1 + .../rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs | 1 + .../src/spec/targets/i686_unknown_linux_musl.rs | 1 + .../rustc_target/src/spec/targets/i686_unknown_netbsd.rs | 1 + .../rustc_target/src/spec/targets/i686_unknown_openbsd.rs | 1 + compiler/rustc_target/src/spec/targets/i686_unknown_uefi.rs | 1 + .../rustc_target/src/spec/targets/i686_uwp_windows_gnu.rs | 1 + .../rustc_target/src/spec/targets/i686_uwp_windows_msvc.rs | 1 + .../rustc_target/src/spec/targets/i686_win7_windows_msvc.rs | 1 + compiler/rustc_target/src/spec/targets/i686_wrs_vxworks.rs | 1 + .../src/spec/targets/loongarch64_unknown_linux_gnu.rs | 1 + .../src/spec/targets/loongarch64_unknown_none.rs | 1 + .../src/spec/targets/loongarch64_unknown_none_softfloat.rs | 1 + .../rustc_target/src/spec/targets/m68k_unknown_linux_gnu.rs | 1 + .../src/spec/targets/mips64_openwrt_linux_musl.rs | 1 + .../src/spec/targets/mips64_unknown_linux_gnuabi64.rs | 1 + .../src/spec/targets/mips64_unknown_linux_muslabi64.rs | 1 + .../src/spec/targets/mips64el_unknown_linux_gnuabi64.rs | 1 + .../src/spec/targets/mips64el_unknown_linux_muslabi64.rs | 1 + .../rustc_target/src/spec/targets/mips_unknown_linux_gnu.rs | 1 + .../src/spec/targets/mips_unknown_linux_musl.rs | 1 + .../src/spec/targets/mips_unknown_linux_uclibc.rs | 1 + compiler/rustc_target/src/spec/targets/mipsel_sony_psp.rs | 1 + compiler/rustc_target/src/spec/targets/mipsel_sony_psx.rs | 1 + .../src/spec/targets/mipsel_unknown_linux_gnu.rs | 1 + .../src/spec/targets/mipsel_unknown_linux_musl.rs | 1 + .../src/spec/targets/mipsel_unknown_linux_uclibc.rs | 1 + .../rustc_target/src/spec/targets/mipsel_unknown_netbsd.rs | 1 + .../rustc_target/src/spec/targets/mipsel_unknown_none.rs | 1 + .../src/spec/targets/mipsisa32r6_unknown_linux_gnu.rs | 1 + .../src/spec/targets/mipsisa32r6el_unknown_linux_gnu.rs | 1 + .../src/spec/targets/mipsisa64r6_unknown_linux_gnuabi64.rs | 1 + .../spec/targets/mipsisa64r6el_unknown_linux_gnuabi64.rs | 1 + compiler/rustc_target/src/spec/targets/msp430_none_elf.rs | 1 + .../rustc_target/src/spec/targets/nvptx64_nvidia_cuda.rs | 1 + compiler/rustc_target/src/spec/targets/powerpc64_ibm_aix.rs | 1 + .../src/spec/targets/powerpc64_unknown_freebsd.rs | 1 + .../src/spec/targets/powerpc64_unknown_linux_gnu.rs | 1 + .../src/spec/targets/powerpc64_unknown_linux_musl.rs | 1 + .../src/spec/targets/powerpc64_unknown_openbsd.rs | 1 + .../rustc_target/src/spec/targets/powerpc64_wrs_vxworks.rs | 1 + .../src/spec/targets/powerpc64le_unknown_freebsd.rs | 1 + .../src/spec/targets/powerpc64le_unknown_linux_gnu.rs | 1 + .../src/spec/targets/powerpc64le_unknown_linux_musl.rs | 1 + .../src/spec/targets/powerpc_unknown_freebsd.rs | 1 + .../src/spec/targets/powerpc_unknown_linux_gnu.rs | 1 + .../src/spec/targets/powerpc_unknown_linux_gnuspe.rs | 1 + .../src/spec/targets/powerpc_unknown_linux_musl.rs | 1 + .../rustc_target/src/spec/targets/powerpc_unknown_netbsd.rs | 1 + .../src/spec/targets/powerpc_unknown_openbsd.rs | 1 + .../rustc_target/src/spec/targets/powerpc_wrs_vxworks.rs | 1 + .../src/spec/targets/powerpc_wrs_vxworks_spe.rs | 1 + .../src/spec/targets/riscv32gc_unknown_linux_gnu.rs | 1 + .../src/spec/targets/riscv32gc_unknown_linux_musl.rs | 1 + .../src/spec/targets/riscv32i_unknown_none_elf.rs | 1 + .../src/spec/targets/riscv32im_risc0_zkvm_elf.rs | 1 + .../src/spec/targets/riscv32im_unknown_none_elf.rs | 1 + .../rustc_target/src/spec/targets/riscv32imac_esp_espidf.rs | 1 + .../src/spec/targets/riscv32imac_unknown_none_elf.rs | 1 + .../src/spec/targets/riscv32imac_unknown_xous_elf.rs | 1 + .../src/spec/targets/riscv32imafc_esp_espidf.rs | 1 + .../src/spec/targets/riscv32imafc_unknown_none_elf.rs | 1 + .../rustc_target/src/spec/targets/riscv32imc_esp_espidf.rs | 1 + .../src/spec/targets/riscv32imc_unknown_none_elf.rs | 1 + .../rustc_target/src/spec/targets/riscv64_linux_android.rs | 1 + .../src/spec/targets/riscv64gc_unknown_freebsd.rs | 1 + .../src/spec/targets/riscv64gc_unknown_fuchsia.rs | 1 + .../src/spec/targets/riscv64gc_unknown_hermit.rs | 1 + .../src/spec/targets/riscv64gc_unknown_linux_gnu.rs | 1 + .../src/spec/targets/riscv64gc_unknown_linux_musl.rs | 1 + .../src/spec/targets/riscv64gc_unknown_netbsd.rs | 1 + .../src/spec/targets/riscv64gc_unknown_none_elf.rs | 1 + .../src/spec/targets/riscv64gc_unknown_openbsd.rs | 1 + .../src/spec/targets/riscv64imac_unknown_none_elf.rs | 1 + .../src/spec/targets/s390x_unknown_linux_gnu.rs | 1 + .../src/spec/targets/s390x_unknown_linux_musl.rs | 1 + .../src/spec/targets/sparc64_unknown_linux_gnu.rs | 1 + .../rustc_target/src/spec/targets/sparc64_unknown_netbsd.rs | 1 + .../src/spec/targets/sparc64_unknown_openbsd.rs | 1 + .../src/spec/targets/sparc_unknown_linux_gnu.rs | 1 + .../rustc_target/src/spec/targets/sparc_unknown_none_elf.rs | 1 + .../rustc_target/src/spec/targets/sparcv9_sun_solaris.rs | 1 + .../rustc_target/src/spec/targets/thumbv4t_none_eabi.rs | 1 + .../rustc_target/src/spec/targets/thumbv5te_none_eabi.rs | 1 + .../rustc_target/src/spec/targets/thumbv6m_none_eabi.rs | 1 + .../src/spec/targets/thumbv7a_pc_windows_msvc.rs | 1 + .../src/spec/targets/thumbv7a_uwp_windows_msvc.rs | 1 + .../rustc_target/src/spec/targets/thumbv7em_none_eabi.rs | 1 + .../rustc_target/src/spec/targets/thumbv7em_none_eabihf.rs | 1 + .../rustc_target/src/spec/targets/thumbv7m_none_eabi.rs | 1 + .../src/spec/targets/thumbv7neon_linux_androideabi.rs | 1 + .../src/spec/targets/thumbv7neon_unknown_linux_gnueabihf.rs | 1 + .../spec/targets/thumbv7neon_unknown_linux_musleabihf.rs | 1 + .../src/spec/targets/thumbv8m_base_none_eabi.rs | 1 + .../src/spec/targets/thumbv8m_main_none_eabi.rs | 1 + .../src/spec/targets/thumbv8m_main_none_eabihf.rs | 1 + .../src/spec/targets/wasm32_unknown_emscripten.rs | 1 + .../rustc_target/src/spec/targets/wasm32_unknown_unknown.rs | 1 + .../src/spec/targets/wasm32_wasi_preview1_threads.rs | 1 + compiler/rustc_target/src/spec/targets/wasm32_wasip1.rs | 1 + compiler/rustc_target/src/spec/targets/wasm32_wasip2.rs | 1 + .../rustc_target/src/spec/targets/wasm64_unknown_unknown.rs | 1 + .../rustc_target/src/spec/targets/x86_64_apple_darwin.rs | 1 + compiler/rustc_target/src/spec/targets/x86_64_apple_ios.rs | 1 + .../src/spec/targets/x86_64_apple_ios_macabi.rs | 1 + compiler/rustc_target/src/spec/targets/x86_64_apple_tvos.rs | 1 + .../src/spec/targets/x86_64_apple_watchos_sim.rs | 1 + .../src/spec/targets/x86_64_fortanix_unknown_sgx.rs | 1 + .../rustc_target/src/spec/targets/x86_64_linux_android.rs | 1 + .../rustc_target/src/spec/targets/x86_64_pc_nto_qnx710.rs | 1 + compiler/rustc_target/src/spec/targets/x86_64_pc_solaris.rs | 1 + .../rustc_target/src/spec/targets/x86_64_pc_windows_gnu.rs | 1 + .../src/spec/targets/x86_64_pc_windows_gnullvm.rs | 1 + .../rustc_target/src/spec/targets/x86_64_pc_windows_msvc.rs | 1 + .../src/spec/targets/x86_64_unikraft_linux_musl.rs | 1 + .../src/spec/targets/x86_64_unknown_dragonfly.rs | 1 + .../rustc_target/src/spec/targets/x86_64_unknown_freebsd.rs | 1 + .../rustc_target/src/spec/targets/x86_64_unknown_fuchsia.rs | 1 + .../rustc_target/src/spec/targets/x86_64_unknown_haiku.rs | 1 + .../rustc_target/src/spec/targets/x86_64_unknown_hermit.rs | 1 + .../rustc_target/src/spec/targets/x86_64_unknown_illumos.rs | 1 + .../src/spec/targets/x86_64_unknown_l4re_uclibc.rs | 1 + .../src/spec/targets/x86_64_unknown_linux_gnu.rs | 1 + .../src/spec/targets/x86_64_unknown_linux_gnux32.rs | 1 + .../src/spec/targets/x86_64_unknown_linux_musl.rs | 1 + .../src/spec/targets/x86_64_unknown_linux_ohos.rs | 1 + .../rustc_target/src/spec/targets/x86_64_unknown_netbsd.rs | 1 + .../rustc_target/src/spec/targets/x86_64_unknown_none.rs | 1 + .../rustc_target/src/spec/targets/x86_64_unknown_openbsd.rs | 1 + .../rustc_target/src/spec/targets/x86_64_unknown_redox.rs | 1 + .../rustc_target/src/spec/targets/x86_64_unknown_uefi.rs | 1 + .../rustc_target/src/spec/targets/x86_64_uwp_windows_gnu.rs | 1 + .../src/spec/targets/x86_64_uwp_windows_msvc.rs | 1 + .../src/spec/targets/x86_64_win7_windows_msvc.rs | 1 + .../rustc_target/src/spec/targets/x86_64_wrs_vxworks.rs | 1 + .../rustc_target/src/spec/targets/x86_64h_apple_darwin.rs | 1 + 229 files changed, 234 insertions(+) diff --git a/compiler/rustc_target/src/spec/base/avr_gnu.rs b/compiler/rustc_target/src/spec/base/avr_gnu.rs index cd324c94bbe8b..1e410cea8d635 100644 --- a/compiler/rustc_target/src/spec/base/avr_gnu.rs +++ b/compiler/rustc_target/src/spec/base/avr_gnu.rs @@ -8,6 +8,7 @@ use object::elf; pub fn target(target_cpu: &'static str, mmcu: &'static str) -> Target { Target { arch: "avr".into(), + description: None, data_layout: "e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-a:8".into(), llvm_target: "avr-unknown-unknown".into(), pointer_width: 16, diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index 4a8b6ee9cf25c..3fda1e1833c12 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -1741,6 +1741,11 @@ impl TargetWarnings { pub struct Target { /// Target triple to pass to LLVM. pub llvm_target: StaticCow, + /// A short description of the target including platform requirements, + /// for example "64-bit Linux (kernel 3.2+, glibc 2.17+)". + /// Optional for now, intended to be required in the future. + /// Part of #120745. + pub description: Option>, /// Number of bits in a pointer. Influences the `target_pointer_width` `cfg` variable. pub pointer_width: u32, /// Architecture to use for ABI considerations. Valid options include: "x86", @@ -2542,6 +2547,7 @@ impl Target { let mut base = Target { llvm_target: get_req_field("llvm-target")?.into(), + description: get_req_field("description").ok().map(Into::into), pointer_width: get_req_field("target-pointer-width")? .parse::() .map_err(|_| "target-pointer-width must be an integer".to_string())?, diff --git a/compiler/rustc_target/src/spec/targets/aarch64_apple_darwin.rs b/compiler/rustc_target/src/spec/targets/aarch64_apple_darwin.rs index 8e6c00b1255d4..05912d9368906 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_apple_darwin.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_apple_darwin.rs @@ -15,6 +15,7 @@ pub fn target() -> Target { // MACOSX_DEPLOYMENT_TARGET. To enable cross-language LTO to work // correctly, we do too. llvm_target: macos_llvm_target(arch).into(), + description: None, pointer_width: 64, data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(), arch: arch.target_arch(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_apple_ios.rs b/compiler/rustc_target/src/spec/targets/aarch64_apple_ios.rs index f291ac5458d34..6591d85384d01 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_apple_ios.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_apple_ios.rs @@ -12,6 +12,7 @@ pub fn target() -> Target { // This is required for the target to pick the right // MACH-O commands, so we do too. llvm_target: ios_llvm_target(arch).into(), + description: None, pointer_width: 64, data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(), arch: arch.target_arch(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_apple_ios_macabi.rs b/compiler/rustc_target/src/spec/targets/aarch64_apple_ios_macabi.rs index 300e301407924..2b3967a76ca12 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_apple_ios_macabi.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_apple_ios_macabi.rs @@ -8,6 +8,7 @@ pub fn target() -> Target { Target { llvm_target: mac_catalyst_llvm_target(arch).into(), + description: None, pointer_width: 64, data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(), arch: arch.target_arch(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_apple_ios_sim.rs b/compiler/rustc_target/src/spec/targets/aarch64_apple_ios_sim.rs index 41760e9093fa2..c5c6b71023b95 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_apple_ios_sim.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_apple_ios_sim.rs @@ -12,6 +12,7 @@ pub fn target() -> Target { // This is required for the simulator target to pick the right // MACH-O commands, so we do too. llvm_target: ios_sim_llvm_target(arch).into(), + description: None, pointer_width: 64, data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(), arch: arch.target_arch(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_apple_tvos.rs b/compiler/rustc_target/src/spec/targets/aarch64_apple_tvos.rs index e817308b6859d..1a292a524f66f 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_apple_tvos.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_apple_tvos.rs @@ -5,6 +5,7 @@ pub fn target() -> Target { let arch = Arch::Arm64; Target { llvm_target: tvos_llvm_target(arch).into(), + description: None, pointer_width: 64, data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(), arch: arch.target_arch(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_apple_tvos_sim.rs b/compiler/rustc_target/src/spec/targets/aarch64_apple_tvos_sim.rs index c4aa8479279df..0203b7cba93d1 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_apple_tvos_sim.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_apple_tvos_sim.rs @@ -5,6 +5,7 @@ pub fn target() -> Target { let arch = Arch::Arm64_sim; Target { llvm_target: tvos_sim_llvm_target(arch).into(), + description: None, pointer_width: 64, data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(), arch: arch.target_arch(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_apple_watchos.rs b/compiler/rustc_target/src/spec/targets/aarch64_apple_watchos.rs index c2cf2c4e96d52..727a28b8566ce 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_apple_watchos.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_apple_watchos.rs @@ -5,6 +5,7 @@ pub fn target() -> Target { let base = opts("watchos", Arch::Arm64); Target { llvm_target: "aarch64-apple-watchos".into(), + description: None, pointer_width: 64, data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(), arch: "aarch64".into(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_apple_watchos_sim.rs b/compiler/rustc_target/src/spec/targets/aarch64_apple_watchos_sim.rs index 96d43e6d27f1c..504035f8b0dfc 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_apple_watchos_sim.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_apple_watchos_sim.rs @@ -9,6 +9,7 @@ pub fn target() -> Target { // This is required for the simulator target to pick the right // MACH-O commands, so we do too. llvm_target: watchos_sim_llvm_target(arch).into(), + description: None, pointer_width: 64, data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(), arch: arch.target_arch(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_be_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/aarch64_be_unknown_linux_gnu.rs index 739a9e4a3dc97..da2f7ca4406aa 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_be_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_be_unknown_linux_gnu.rs @@ -4,6 +4,7 @@ use crate::spec::{base, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "aarch64_be-unknown-linux-gnu".into(), + description: None, pointer_width: 64, data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(), arch: "aarch64".into(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_be_unknown_linux_gnu_ilp32.rs b/compiler/rustc_target/src/spec/targets/aarch64_be_unknown_linux_gnu_ilp32.rs index 1b87c09e3fe70..3226722be9176 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_be_unknown_linux_gnu_ilp32.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_be_unknown_linux_gnu_ilp32.rs @@ -7,6 +7,7 @@ pub fn target() -> Target { Target { llvm_target: "aarch64_be-unknown-linux-gnu_ilp32".into(), + description: None, pointer_width: 32, data_layout: "E-m:e-p:32:32-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(), arch: "aarch64".into(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_be_unknown_netbsd.rs b/compiler/rustc_target/src/spec/targets/aarch64_be_unknown_netbsd.rs index 02e156f19decd..180bb3e552ad3 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_be_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_be_unknown_netbsd.rs @@ -4,6 +4,7 @@ use crate::spec::{base, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "aarch64_be-unknown-netbsd".into(), + description: None, pointer_width: 64, data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(), arch: "aarch64".into(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_kmc_solid_asp3.rs b/compiler/rustc_target/src/spec/targets/aarch64_kmc_solid_asp3.rs index 5b4ffc08a5784..df9dca165712f 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_kmc_solid_asp3.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_kmc_solid_asp3.rs @@ -4,6 +4,7 @@ pub fn target() -> Target { let base = base::solid::opts("asp3"); Target { llvm_target: "aarch64-unknown-none".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(), arch: "aarch64".into(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_linux_android.rs b/compiler/rustc_target/src/spec/targets/aarch64_linux_android.rs index db9a180856027..6f760f0e36a4b 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_linux_android.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_linux_android.rs @@ -6,6 +6,7 @@ use crate::spec::{base, SanitizerSet, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "aarch64-linux-android".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(), arch: "aarch64".into(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_nintendo_switch_freestanding.rs b/compiler/rustc_target/src/spec/targets/aarch64_nintendo_switch_freestanding.rs index 5a92225c4969b..221b550a3ac80 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_nintendo_switch_freestanding.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_nintendo_switch_freestanding.rs @@ -8,6 +8,7 @@ const LINKER_SCRIPT: &str = include_str!("./aarch64_nintendo_switch_freestanding pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-none".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(), arch: "aarch64".into(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_pc_windows_gnullvm.rs b/compiler/rustc_target/src/spec/targets/aarch64_pc_windows_gnullvm.rs index 1ea738142825c..8ef6bea6768b5 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_pc_windows_gnullvm.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_pc_windows_gnullvm.rs @@ -8,6 +8,7 @@ pub fn target() -> Target { Target { llvm_target: "aarch64-pc-windows-gnu".into(), + description: None, pointer_width: 64, data_layout: "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128".into(), arch: "aarch64".into(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/targets/aarch64_pc_windows_msvc.rs index cbd1329726a2f..12eba14925807 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_pc_windows_msvc.rs @@ -7,6 +7,7 @@ pub fn target() -> Target { Target { llvm_target: "aarch64-pc-windows-msvc".into(), + description: None, pointer_width: 64, data_layout: "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128".into(), arch: "aarch64".into(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_unknown_freebsd.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_freebsd.rs index 0ba91a54f1da0..b431750852109 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_freebsd.rs @@ -3,6 +3,7 @@ use crate::spec::{base, SanitizerSet, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-freebsd".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(), arch: "aarch64".into(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_unknown_fuchsia.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_fuchsia.rs index 430a1c5e7f14d..59ead79721b0e 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_unknown_fuchsia.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_fuchsia.rs @@ -3,6 +3,7 @@ use crate::spec::{base, SanitizerSet, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-fuchsia".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(), arch: "aarch64".into(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_unknown_hermit.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_hermit.rs index 50813b81b8d0d..1a8234006293f 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_unknown_hermit.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_hermit.rs @@ -3,6 +3,7 @@ use crate::spec::{base, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-hermit".into(), + description: None, pointer_width: 64, arch: "aarch64".into(), data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_unknown_illumos.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_illumos.rs index 634cb063a49b2..8344578d89410 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_unknown_illumos.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_illumos.rs @@ -11,6 +11,7 @@ pub fn target() -> Target { // LLVM does not currently have a separate illumos target, // so we still pass Solaris to it llvm_target: "aarch64-unknown-solaris2.11".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(), arch: "aarch64".into(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_gnu.rs index 5b3a2ffa5995a..dd29ef7b53076 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_gnu.rs @@ -3,6 +3,7 @@ use crate::spec::{base, SanitizerSet, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-linux-gnu".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(), arch: "aarch64".into(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_gnu_ilp32.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_gnu_ilp32.rs index 0ff5c8651e6fb..d1fe5ed863df6 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_gnu_ilp32.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_gnu_ilp32.rs @@ -3,6 +3,7 @@ use crate::spec::{base, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-linux-gnu_ilp32".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(), arch: "aarch64".into(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_musl.rs index d16ccd803a95c..0a20c47d1ada9 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_musl.rs @@ -14,6 +14,7 @@ pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-linux-musl".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(), arch: "aarch64".into(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_ohos.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_ohos.rs index 1be27a511085f..fdb5b8635b255 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_ohos.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_linux_ohos.rs @@ -8,6 +8,7 @@ pub fn target() -> Target { Target { // LLVM 15 doesn't support OpenHarmony yet, use a linux target instead. llvm_target: "aarch64-unknown-linux-musl".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(), arch: "aarch64".into(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_unknown_netbsd.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_netbsd.rs index 32a0816cf81c3..3aaebe85a0b6f 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_netbsd.rs @@ -3,6 +3,7 @@ use crate::spec::{base, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-netbsd".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(), arch: "aarch64".into(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_unknown_none.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_none.rs index 518597b3811c4..ca019a9a68316 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_unknown_none.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_none.rs @@ -31,6 +31,7 @@ pub fn target() -> Target { }; Target { llvm_target: "aarch64-unknown-none".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(), arch: "aarch64".into(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_unknown_none_softfloat.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_none_softfloat.rs index d56fbdbbe9085..8f837865bfa53 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_unknown_none_softfloat.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_none_softfloat.rs @@ -25,6 +25,7 @@ pub fn target() -> Target { }; Target { llvm_target: "aarch64-unknown-none".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(), arch: "aarch64".into(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_unknown_nto_qnx710.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_nto_qnx710.rs index aeeaab3af3232..3fb9fb7fd2733 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_unknown_nto_qnx710.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_nto_qnx710.rs @@ -3,6 +3,7 @@ use crate::spec::{base, Cc, LinkerFlavor, Lld, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-unknown".into(), + description: None, pointer_width: 64, // from: https://llvm.org/docs/LangRef.html#data-layout // e = little endian diff --git a/compiler/rustc_target/src/spec/targets/aarch64_unknown_openbsd.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_openbsd.rs index d5fca5c31a659..003f40c98035c 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_openbsd.rs @@ -3,6 +3,7 @@ use crate::spec::{base, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-openbsd".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(), arch: "aarch64".into(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_unknown_redox.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_redox.rs index 844fed472a268..c50cb5a300dde 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_unknown_redox.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_redox.rs @@ -8,6 +8,7 @@ pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-redox".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(), arch: "aarch64".into(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_unknown_teeos.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_teeos.rs index 204e9b061cec5..1cb59879e478f 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_unknown_teeos.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_teeos.rs @@ -8,6 +8,7 @@ pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-none".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(), arch: "aarch64".into(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_unknown_uefi.rs b/compiler/rustc_target/src/spec/targets/aarch64_unknown_uefi.rs index 9ed6ed2651f3c..bf14f6950eb89 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_unknown_uefi.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_unknown_uefi.rs @@ -12,6 +12,7 @@ pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-windows".into(), + description: None, pointer_width: 64, data_layout: "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128".into(), arch: "aarch64".into(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/targets/aarch64_uwp_windows_msvc.rs index c64b2c7d113fa..8399e091c39fc 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_uwp_windows_msvc.rs @@ -7,6 +7,7 @@ pub fn target() -> Target { Target { llvm_target: "aarch64-pc-windows-msvc".into(), + description: None, pointer_width: 64, data_layout: "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128".into(), arch: "aarch64".into(), diff --git a/compiler/rustc_target/src/spec/targets/aarch64_wrs_vxworks.rs b/compiler/rustc_target/src/spec/targets/aarch64_wrs_vxworks.rs index 48e142347d7bf..a26d41f81f027 100644 --- a/compiler/rustc_target/src/spec/targets/aarch64_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/targets/aarch64_wrs_vxworks.rs @@ -3,6 +3,7 @@ use crate::spec::{base, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-linux-gnu".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(), arch: "aarch64".into(), diff --git a/compiler/rustc_target/src/spec/targets/arm64_32_apple_watchos.rs b/compiler/rustc_target/src/spec/targets/arm64_32_apple_watchos.rs index 59e6022d985dd..318764abab2e7 100644 --- a/compiler/rustc_target/src/spec/targets/arm64_32_apple_watchos.rs +++ b/compiler/rustc_target/src/spec/targets/arm64_32_apple_watchos.rs @@ -5,6 +5,7 @@ pub fn target() -> Target { let base = opts("watchos", Arch::Arm64_32); Target { llvm_target: "arm64_32-apple-watchos".into(), + description: None, pointer_width: 32, data_layout: "e-m:o-p:32:32-i64:64-i128:128-n32:64-S128".into(), arch: "aarch64".into(), diff --git a/compiler/rustc_target/src/spec/targets/arm64e_apple_darwin.rs b/compiler/rustc_target/src/spec/targets/arm64e_apple_darwin.rs index 5d1f81158b696..fd3a52d2f1f36 100644 --- a/compiler/rustc_target/src/spec/targets/arm64e_apple_darwin.rs +++ b/compiler/rustc_target/src/spec/targets/arm64e_apple_darwin.rs @@ -15,6 +15,7 @@ pub fn target() -> Target { // MACOSX_DEPLOYMENT_TARGET. To enable cross-language LTO to work // correctly, we do too. llvm_target: macos_llvm_target(arch).into(), + description: None, pointer_width: 64, data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(), arch: arch.target_arch(), diff --git a/compiler/rustc_target/src/spec/targets/arm64e_apple_ios.rs b/compiler/rustc_target/src/spec/targets/arm64e_apple_ios.rs index 38657d7f1dfad..4d650921d39f7 100644 --- a/compiler/rustc_target/src/spec/targets/arm64e_apple_ios.rs +++ b/compiler/rustc_target/src/spec/targets/arm64e_apple_ios.rs @@ -12,6 +12,7 @@ pub fn target() -> Target { // This is required for the target to pick the right // MACH-O commands, so we do too. llvm_target: ios_llvm_target(arch).into(), + description: None, pointer_width: 64, data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".into(), arch: arch.target_arch(), diff --git a/compiler/rustc_target/src/spec/targets/arm_linux_androideabi.rs b/compiler/rustc_target/src/spec/targets/arm_linux_androideabi.rs index 43b27b414d88c..a3563b19b134d 100644 --- a/compiler/rustc_target/src/spec/targets/arm_linux_androideabi.rs +++ b/compiler/rustc_target/src/spec/targets/arm_linux_androideabi.rs @@ -3,6 +3,7 @@ use crate::spec::{base, SanitizerSet, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "arm-linux-androideabi".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/arm_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/targets/arm_unknown_linux_gnueabi.rs index e4fa54c4b7540..1bd29d11cb410 100644 --- a/compiler/rustc_target/src/spec/targets/arm_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/targets/arm_unknown_linux_gnueabi.rs @@ -3,6 +3,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "arm-unknown-linux-gnueabi".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/arm_unknown_linux_gnueabihf.rs b/compiler/rustc_target/src/spec/targets/arm_unknown_linux_gnueabihf.rs index f379ea35ecb6f..b705d67ad5cc6 100644 --- a/compiler/rustc_target/src/spec/targets/arm_unknown_linux_gnueabihf.rs +++ b/compiler/rustc_target/src/spec/targets/arm_unknown_linux_gnueabihf.rs @@ -3,6 +3,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "arm-unknown-linux-gnueabihf".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/arm_unknown_linux_musleabi.rs b/compiler/rustc_target/src/spec/targets/arm_unknown_linux_musleabi.rs index f3d5ff8924425..5f48330f673ad 100644 --- a/compiler/rustc_target/src/spec/targets/arm_unknown_linux_musleabi.rs +++ b/compiler/rustc_target/src/spec/targets/arm_unknown_linux_musleabi.rs @@ -6,6 +6,7 @@ pub fn target() -> Target { // to determine the calling convention and float ABI, and it doesn't // support the "musleabi" value. llvm_target: "arm-unknown-linux-gnueabi".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/arm_unknown_linux_musleabihf.rs b/compiler/rustc_target/src/spec/targets/arm_unknown_linux_musleabihf.rs index f3e366d59937a..6b94e673785b9 100644 --- a/compiler/rustc_target/src/spec/targets/arm_unknown_linux_musleabihf.rs +++ b/compiler/rustc_target/src/spec/targets/arm_unknown_linux_musleabihf.rs @@ -6,6 +6,7 @@ pub fn target() -> Target { // uses it to determine the calling convention and float ABI, and it // doesn't support the "musleabihf" value. llvm_target: "arm-unknown-linux-gnueabihf".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/armeb_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/targets/armeb_unknown_linux_gnueabi.rs index 07c7e1c58456e..0cd8a7cdcb6e6 100644 --- a/compiler/rustc_target/src/spec/targets/armeb_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/targets/armeb_unknown_linux_gnueabi.rs @@ -4,6 +4,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "armeb-unknown-linux-gnueabi".into(), + description: None, pointer_width: 32, data_layout: "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/armebv7r_none_eabi.rs b/compiler/rustc_target/src/spec/targets/armebv7r_none_eabi.rs index 446efa90d0985..6317bef05592f 100644 --- a/compiler/rustc_target/src/spec/targets/armebv7r_none_eabi.rs +++ b/compiler/rustc_target/src/spec/targets/armebv7r_none_eabi.rs @@ -6,6 +6,7 @@ use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, Targ pub fn target() -> Target { Target { llvm_target: "armebv7r-none-eabi".into(), + description: None, pointer_width: 32, data_layout: "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/armebv7r_none_eabihf.rs b/compiler/rustc_target/src/spec/targets/armebv7r_none_eabihf.rs index 0c9e99ff84bfd..13778ccb303da 100644 --- a/compiler/rustc_target/src/spec/targets/armebv7r_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/targets/armebv7r_none_eabihf.rs @@ -6,6 +6,7 @@ use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, Targ pub fn target() -> Target { Target { llvm_target: "armebv7r-none-eabihf".into(), + description: None, pointer_width: 32, data_layout: "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/armv4t_none_eabi.rs b/compiler/rustc_target/src/spec/targets/armv4t_none_eabi.rs index 44fdd3178af4f..e0f1756cdc21f 100644 --- a/compiler/rustc_target/src/spec/targets/armv4t_none_eabi.rs +++ b/compiler/rustc_target/src/spec/targets/armv4t_none_eabi.rs @@ -14,6 +14,7 @@ use crate::spec::{cvs, Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, pub fn target() -> Target { Target { llvm_target: "armv4t-none-eabi".into(), + description: None, pointer_width: 32, arch: "arm".into(), /* Data layout args are '-' separated: diff --git a/compiler/rustc_target/src/spec/targets/armv4t_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/targets/armv4t_unknown_linux_gnueabi.rs index 5ab753c3d61b4..94c9c77c252ff 100644 --- a/compiler/rustc_target/src/spec/targets/armv4t_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/targets/armv4t_unknown_linux_gnueabi.rs @@ -3,6 +3,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "armv4t-unknown-linux-gnueabi".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/armv5te_none_eabi.rs b/compiler/rustc_target/src/spec/targets/armv5te_none_eabi.rs index 5e23efecdbe19..280aa3b84ca22 100644 --- a/compiler/rustc_target/src/spec/targets/armv5te_none_eabi.rs +++ b/compiler/rustc_target/src/spec/targets/armv5te_none_eabi.rs @@ -5,6 +5,7 @@ use crate::spec::{base, cvs, FramePointer, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "armv5te-none-eabi".into(), + description: None, pointer_width: 32, arch: "arm".into(), /* Data layout args are '-' separated: diff --git a/compiler/rustc_target/src/spec/targets/armv5te_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/targets/armv5te_unknown_linux_gnueabi.rs index 7155ab289c0a6..6a4cc7fb78eb1 100644 --- a/compiler/rustc_target/src/spec/targets/armv5te_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/targets/armv5te_unknown_linux_gnueabi.rs @@ -3,6 +3,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "armv5te-unknown-linux-gnueabi".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/armv5te_unknown_linux_musleabi.rs b/compiler/rustc_target/src/spec/targets/armv5te_unknown_linux_musleabi.rs index 3f25ab2bcc195..eb1c67650fc37 100644 --- a/compiler/rustc_target/src/spec/targets/armv5te_unknown_linux_musleabi.rs +++ b/compiler/rustc_target/src/spec/targets/armv5te_unknown_linux_musleabi.rs @@ -7,6 +7,7 @@ pub fn target() -> Target { // uses it to determine the calling convention and float ABI, and LLVM // doesn't support the "musleabihf" value. llvm_target: "armv5te-unknown-linux-gnueabi".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/armv5te_unknown_linux_uclibceabi.rs b/compiler/rustc_target/src/spec/targets/armv5te_unknown_linux_uclibceabi.rs index af6e3baa27aea..6d20a9047de97 100644 --- a/compiler/rustc_target/src/spec/targets/armv5te_unknown_linux_uclibceabi.rs +++ b/compiler/rustc_target/src/spec/targets/armv5te_unknown_linux_uclibceabi.rs @@ -3,6 +3,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "armv5te-unknown-linux-uclibcgnueabi".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/armv6_unknown_freebsd.rs b/compiler/rustc_target/src/spec/targets/armv6_unknown_freebsd.rs index 70e40f60f22a0..1aec8e6681c92 100644 --- a/compiler/rustc_target/src/spec/targets/armv6_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/targets/armv6_unknown_freebsd.rs @@ -3,6 +3,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "armv6-unknown-freebsd-gnueabihf".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/armv6_unknown_netbsd_eabihf.rs b/compiler/rustc_target/src/spec/targets/armv6_unknown_netbsd_eabihf.rs index ca0db5e564001..86c8ade8b51f7 100644 --- a/compiler/rustc_target/src/spec/targets/armv6_unknown_netbsd_eabihf.rs +++ b/compiler/rustc_target/src/spec/targets/armv6_unknown_netbsd_eabihf.rs @@ -3,6 +3,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "armv6-unknown-netbsdelf-eabihf".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/armv6k_nintendo_3ds.rs b/compiler/rustc_target/src/spec/targets/armv6k_nintendo_3ds.rs index 23f4a5abf7795..01a08283f8230 100644 --- a/compiler/rustc_target/src/spec/targets/armv6k_nintendo_3ds.rs +++ b/compiler/rustc_target/src/spec/targets/armv6k_nintendo_3ds.rs @@ -12,6 +12,7 @@ pub fn target() -> Target { Target { llvm_target: "armv6k-none-eabihf".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/armv7_linux_androideabi.rs b/compiler/rustc_target/src/spec/targets/armv7_linux_androideabi.rs index bb3e574e32fef..bfeca4bbc9ee6 100644 --- a/compiler/rustc_target/src/spec/targets/armv7_linux_androideabi.rs +++ b/compiler/rustc_target/src/spec/targets/armv7_linux_androideabi.rs @@ -13,6 +13,7 @@ pub fn target() -> Target { base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-march=armv7-a"]); Target { llvm_target: "armv7-none-linux-android".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/armv7_sony_vita_newlibeabihf.rs b/compiler/rustc_target/src/spec/targets/armv7_sony_vita_newlibeabihf.rs index 62c93603621ab..5f068edbaade7 100644 --- a/compiler/rustc_target/src/spec/targets/armv7_sony_vita_newlibeabihf.rs +++ b/compiler/rustc_target/src/spec/targets/armv7_sony_vita_newlibeabihf.rs @@ -13,6 +13,7 @@ pub fn target() -> Target { Target { llvm_target: "thumbv7a-vita-eabihf".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/armv7_unknown_freebsd.rs b/compiler/rustc_target/src/spec/targets/armv7_unknown_freebsd.rs index 61b6d7a63e358..888eac89a980c 100644 --- a/compiler/rustc_target/src/spec/targets/armv7_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/targets/armv7_unknown_freebsd.rs @@ -3,6 +3,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "armv7-unknown-freebsd-gnueabihf".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_gnueabi.rs index ad9fd773b8b85..e04c97901644c 100644 --- a/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_gnueabi.rs @@ -6,6 +6,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "armv7-unknown-linux-gnueabi".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_gnueabihf.rs b/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_gnueabihf.rs index aad7977d504a0..401cef1f86c6b 100644 --- a/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_gnueabihf.rs +++ b/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_gnueabihf.rs @@ -6,6 +6,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "armv7-unknown-linux-gnueabihf".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_musleabi.rs b/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_musleabi.rs index 7f30a5ad7d7d0..4792eb930d636 100644 --- a/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_musleabi.rs +++ b/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_musleabi.rs @@ -11,6 +11,7 @@ pub fn target() -> Target { // to determine the calling convention and float ABI, and it doesn't // support the "musleabi" value. llvm_target: "armv7-unknown-linux-gnueabi".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_musleabihf.rs b/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_musleabihf.rs index ec5c6419f6399..948746235a7e0 100644 --- a/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_musleabihf.rs +++ b/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_musleabihf.rs @@ -8,6 +8,7 @@ pub fn target() -> Target { // uses it to determine the calling convention and float ABI, and LLVM // doesn't support the "musleabihf" value. llvm_target: "armv7-unknown-linux-gnueabihf".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_ohos.rs b/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_ohos.rs index 9f2ac541ddc91..62faf4b682a06 100644 --- a/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_ohos.rs +++ b/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_ohos.rs @@ -9,6 +9,7 @@ pub fn target() -> Target { Target { // LLVM 15 doesn't support OpenHarmony yet, use a linux target instead. llvm_target: "armv7-unknown-linux-gnueabi".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_uclibceabi.rs b/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_uclibceabi.rs index 212c80718f034..b33a6ec19ee47 100644 --- a/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_uclibceabi.rs +++ b/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_uclibceabi.rs @@ -7,6 +7,7 @@ pub fn target() -> Target { let base = base::linux_uclibc::opts(); Target { llvm_target: "armv7-unknown-linux-gnueabi".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_uclibceabihf.rs b/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_uclibceabihf.rs index f760ad9e79c2f..b64e325d7609f 100644 --- a/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_uclibceabihf.rs +++ b/compiler/rustc_target/src/spec/targets/armv7_unknown_linux_uclibceabihf.rs @@ -7,6 +7,7 @@ pub fn target() -> Target { let base = base::linux_uclibc::opts(); Target { llvm_target: "armv7-unknown-linux-gnueabihf".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/armv7_unknown_netbsd_eabihf.rs b/compiler/rustc_target/src/spec/targets/armv7_unknown_netbsd_eabihf.rs index 7afdb87b62eee..08efed615aa3a 100644 --- a/compiler/rustc_target/src/spec/targets/armv7_unknown_netbsd_eabihf.rs +++ b/compiler/rustc_target/src/spec/targets/armv7_unknown_netbsd_eabihf.rs @@ -3,6 +3,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "armv7-unknown-netbsdelf-eabihf".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/armv7_wrs_vxworks_eabihf.rs b/compiler/rustc_target/src/spec/targets/armv7_wrs_vxworks_eabihf.rs index 0b4e64307d283..48721437c5183 100644 --- a/compiler/rustc_target/src/spec/targets/armv7_wrs_vxworks_eabihf.rs +++ b/compiler/rustc_target/src/spec/targets/armv7_wrs_vxworks_eabihf.rs @@ -3,6 +3,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "armv7-unknown-linux-gnueabihf".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/armv7a_kmc_solid_asp3_eabi.rs b/compiler/rustc_target/src/spec/targets/armv7a_kmc_solid_asp3_eabi.rs index 57d40d54c449d..0c466f5a6c11f 100644 --- a/compiler/rustc_target/src/spec/targets/armv7a_kmc_solid_asp3_eabi.rs +++ b/compiler/rustc_target/src/spec/targets/armv7a_kmc_solid_asp3_eabi.rs @@ -4,6 +4,7 @@ pub fn target() -> Target { let base = base::solid::opts("asp3"); Target { llvm_target: "armv7a-none-eabi".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/armv7a_kmc_solid_asp3_eabihf.rs b/compiler/rustc_target/src/spec/targets/armv7a_kmc_solid_asp3_eabihf.rs index 3d21213c5ff8f..a109423f6d560 100644 --- a/compiler/rustc_target/src/spec/targets/armv7a_kmc_solid_asp3_eabihf.rs +++ b/compiler/rustc_target/src/spec/targets/armv7a_kmc_solid_asp3_eabihf.rs @@ -4,6 +4,7 @@ pub fn target() -> Target { let base = base::solid::opts("asp3"); Target { llvm_target: "armv7a-none-eabihf".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/armv7a_none_eabi.rs b/compiler/rustc_target/src/spec/targets/armv7a_none_eabi.rs index c5b61427e6982..2680dda030535 100644 --- a/compiler/rustc_target/src/spec/targets/armv7a_none_eabi.rs +++ b/compiler/rustc_target/src/spec/targets/armv7a_none_eabi.rs @@ -32,6 +32,7 @@ pub fn target() -> Target { }; Target { llvm_target: "armv7a-none-eabi".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/armv7a_none_eabihf.rs b/compiler/rustc_target/src/spec/targets/armv7a_none_eabihf.rs index ba3caad6a9729..b26b560a5ee74 100644 --- a/compiler/rustc_target/src/spec/targets/armv7a_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/targets/armv7a_none_eabihf.rs @@ -24,6 +24,7 @@ pub fn target() -> Target { }; Target { llvm_target: "armv7a-none-eabihf".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/armv7k_apple_watchos.rs b/compiler/rustc_target/src/spec/targets/armv7k_apple_watchos.rs index 7ed71c1ba6e83..030f0ce459438 100644 --- a/compiler/rustc_target/src/spec/targets/armv7k_apple_watchos.rs +++ b/compiler/rustc_target/src/spec/targets/armv7k_apple_watchos.rs @@ -5,6 +5,7 @@ pub fn target() -> Target { let arch = Arch::Armv7k; Target { llvm_target: "armv7k-apple-watchos".into(), + description: None, pointer_width: 32, data_layout: "e-m:o-p:32:32-Fi8-i64:64-a:0:32-n32-S128".into(), arch: arch.target_arch(), diff --git a/compiler/rustc_target/src/spec/targets/armv7r_none_eabi.rs b/compiler/rustc_target/src/spec/targets/armv7r_none_eabi.rs index 68b2527985a6f..b71de060ca6b8 100644 --- a/compiler/rustc_target/src/spec/targets/armv7r_none_eabi.rs +++ b/compiler/rustc_target/src/spec/targets/armv7r_none_eabi.rs @@ -5,6 +5,7 @@ use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, Targ pub fn target() -> Target { Target { llvm_target: "armv7r-none-eabi".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/armv7r_none_eabihf.rs b/compiler/rustc_target/src/spec/targets/armv7r_none_eabihf.rs index 909765a310fed..a03179a770f16 100644 --- a/compiler/rustc_target/src/spec/targets/armv7r_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/targets/armv7r_none_eabihf.rs @@ -5,6 +5,7 @@ use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, Targ pub fn target() -> Target { Target { llvm_target: "armv7r-none-eabihf".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/armv7s_apple_ios.rs b/compiler/rustc_target/src/spec/targets/armv7s_apple_ios.rs index 44c624c4ebde0..c8ce77b58beb3 100644 --- a/compiler/rustc_target/src/spec/targets/armv7s_apple_ios.rs +++ b/compiler/rustc_target/src/spec/targets/armv7s_apple_ios.rs @@ -5,6 +5,7 @@ pub fn target() -> Target { let arch = Arch::Armv7s; Target { llvm_target: ios_llvm_target(arch).into(), + description: None, pointer_width: 32, data_layout: "e-m:o-p:32:32-Fi8-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32".into(), arch: arch.target_arch(), diff --git a/compiler/rustc_target/src/spec/targets/armv8r_none_eabihf.rs b/compiler/rustc_target/src/spec/targets/armv8r_none_eabihf.rs index 28dba4f7f5d83..f88b7e56c67ac 100644 --- a/compiler/rustc_target/src/spec/targets/armv8r_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/targets/armv8r_none_eabihf.rs @@ -5,6 +5,7 @@ use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, Targ pub fn target() -> Target { Target { llvm_target: "armv8r-none-eabihf".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/bpfeb_unknown_none.rs b/compiler/rustc_target/src/spec/targets/bpfeb_unknown_none.rs index 91e091e237afc..a6ac0f93c44ff 100644 --- a/compiler/rustc_target/src/spec/targets/bpfeb_unknown_none.rs +++ b/compiler/rustc_target/src/spec/targets/bpfeb_unknown_none.rs @@ -4,6 +4,7 @@ use crate::{abi::Endian, spec::base}; pub fn target() -> Target { Target { llvm_target: "bpfeb".into(), + description: None, data_layout: "E-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(), pointer_width: 64, arch: "bpf".into(), diff --git a/compiler/rustc_target/src/spec/targets/bpfel_unknown_none.rs b/compiler/rustc_target/src/spec/targets/bpfel_unknown_none.rs index 45ab750ead6f1..cee4d687daf8b 100644 --- a/compiler/rustc_target/src/spec/targets/bpfel_unknown_none.rs +++ b/compiler/rustc_target/src/spec/targets/bpfel_unknown_none.rs @@ -4,6 +4,7 @@ use crate::{abi::Endian, spec::base}; pub fn target() -> Target { Target { llvm_target: "bpfel".into(), + description: None, data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(), pointer_width: 64, arch: "bpf".into(), diff --git a/compiler/rustc_target/src/spec/targets/csky_unknown_linux_gnuabiv2.rs b/compiler/rustc_target/src/spec/targets/csky_unknown_linux_gnuabiv2.rs index 14cd33a260a7a..4f0bd6c9ed44a 100644 --- a/compiler/rustc_target/src/spec/targets/csky_unknown_linux_gnuabiv2.rs +++ b/compiler/rustc_target/src/spec/targets/csky_unknown_linux_gnuabiv2.rs @@ -6,6 +6,7 @@ pub fn target() -> Target { Target { //https://github.com/llvm/llvm-project/blob/8b76aea8d8b1b71f6220bc2845abc749f18a19b7/clang/lib/Basic/Targets/CSKY.h llvm_target: "csky-unknown-linux-gnuabiv2".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-S32-p:32:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:32-v128:32:32-a:0:32-Fi32-n32".into(), arch: "csky".into(), diff --git a/compiler/rustc_target/src/spec/targets/csky_unknown_linux_gnuabiv2hf.rs b/compiler/rustc_target/src/spec/targets/csky_unknown_linux_gnuabiv2hf.rs index 0ce271c601ce2..d57c1d0c17f0e 100644 --- a/compiler/rustc_target/src/spec/targets/csky_unknown_linux_gnuabiv2hf.rs +++ b/compiler/rustc_target/src/spec/targets/csky_unknown_linux_gnuabiv2hf.rs @@ -6,6 +6,7 @@ pub fn target() -> Target { Target { //https://github.com/llvm/llvm-project/blob/8b76aea8d8b1b71f6220bc2845abc749f18a19b7/clang/lib/Basic/Targets/CSKY.h llvm_target: "csky-unknown-linux-gnuabiv2".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-S32-p:32:32-i32:32:32-i64:32:32-f32:32:32-f64:32:32-v64:32:32-v128:32:32-a:0:32-Fi32-n32".into(), arch: "csky".into(), diff --git a/compiler/rustc_target/src/spec/targets/hexagon_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/hexagon_unknown_linux_musl.rs index 98a5e7abd09d0..bae88e8546da1 100644 --- a/compiler/rustc_target/src/spec/targets/hexagon_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/hexagon_unknown_linux_musl.rs @@ -15,6 +15,7 @@ pub fn target() -> Target { Target { llvm_target: "hexagon-unknown-linux-musl".into(), + description: None, pointer_width: 32, data_layout: concat!( "e-m:e-p:32:32:32-a:0-n16:32-i64:64:64-i32:32", diff --git a/compiler/rustc_target/src/spec/targets/hexagon_unknown_none_elf.rs b/compiler/rustc_target/src/spec/targets/hexagon_unknown_none_elf.rs index 205f195a701e0..907ff0782579e 100644 --- a/compiler/rustc_target/src/spec/targets/hexagon_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/targets/hexagon_unknown_none_elf.rs @@ -3,6 +3,7 @@ use crate::spec::{PanicStrategy, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "hexagon-unknown-none-elf".into(), + description: None, pointer_width: 32, data_layout: concat!( "e-m:e-p:32:32:32-a:0-n16:32-i64:64:64-i32:32", diff --git a/compiler/rustc_target/src/spec/targets/i386_apple_ios.rs b/compiler/rustc_target/src/spec/targets/i386_apple_ios.rs index d78acdbd1aad5..cdd436ce34afe 100644 --- a/compiler/rustc_target/src/spec/targets/i386_apple_ios.rs +++ b/compiler/rustc_target/src/spec/targets/i386_apple_ios.rs @@ -11,6 +11,7 @@ pub fn target() -> Target { // This is required for the target to pick the right // MACH-O commands, so we do too. llvm_target: ios_sim_llvm_target(arch).into(), + description: None, pointer_width: 32, data_layout: "e-m:o-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i128:128-f64:32:64-f80:128-n8:16:32-S128" diff --git a/compiler/rustc_target/src/spec/targets/i586_pc_nto_qnx700.rs b/compiler/rustc_target/src/spec/targets/i586_pc_nto_qnx700.rs index ea8b919e7480d..e37cf4e5214b8 100644 --- a/compiler/rustc_target/src/spec/targets/i586_pc_nto_qnx700.rs +++ b/compiler/rustc_target/src/spec/targets/i586_pc_nto_qnx700.rs @@ -3,6 +3,7 @@ use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOpt pub fn target() -> Target { Target { llvm_target: "i586-pc-unknown".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i128:128-f64:32:64-f80:32-n8:16:32-S128" diff --git a/compiler/rustc_target/src/spec/targets/i586_unknown_netbsd.rs b/compiler/rustc_target/src/spec/targets/i586_unknown_netbsd.rs index 69bba4775b4ab..f72a4276d76b7 100644 --- a/compiler/rustc_target/src/spec/targets/i586_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/targets/i586_unknown_netbsd.rs @@ -8,6 +8,7 @@ pub fn target() -> Target { Target { llvm_target: "i586-unknown-netbsdelf".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i128:128-f64:32:64-f80:32-n8:16:32-S128" diff --git a/compiler/rustc_target/src/spec/targets/i686_apple_darwin.rs b/compiler/rustc_target/src/spec/targets/i686_apple_darwin.rs index 25617b4436cb6..f4561d7ed582e 100644 --- a/compiler/rustc_target/src/spec/targets/i686_apple_darwin.rs +++ b/compiler/rustc_target/src/spec/targets/i686_apple_darwin.rs @@ -16,6 +16,7 @@ pub fn target() -> Target { // // While ld64 doesn't understand i686, LLVM does. llvm_target: macos_llvm_target(Arch::I686).into(), + description: None, pointer_width: 32, data_layout: "e-m:o-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i128:128-f64:32:64-f80:128-n8:16:32-S128" diff --git a/compiler/rustc_target/src/spec/targets/i686_linux_android.rs b/compiler/rustc_target/src/spec/targets/i686_linux_android.rs index 12ebf0c72f839..d16dfedd38fc5 100644 --- a/compiler/rustc_target/src/spec/targets/i686_linux_android.rs +++ b/compiler/rustc_target/src/spec/targets/i686_linux_android.rs @@ -15,6 +15,7 @@ pub fn target() -> Target { Target { llvm_target: "i686-linux-android".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i128:128-f64:32:64-f80:32-n8:16:32-S128" diff --git a/compiler/rustc_target/src/spec/targets/i686_pc_windows_gnu.rs b/compiler/rustc_target/src/spec/targets/i686_pc_windows_gnu.rs index 1181803441437..1b092045e4bde 100644 --- a/compiler/rustc_target/src/spec/targets/i686_pc_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/i686_pc_windows_gnu.rs @@ -17,6 +17,7 @@ pub fn target() -> Target { Target { llvm_target: "i686-pc-windows-gnu".into(), + description: None, pointer_width: 32, data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i64:64-i128:128-f80:32-n8:16:32-a:0:32-S32" diff --git a/compiler/rustc_target/src/spec/targets/i686_pc_windows_gnullvm.rs b/compiler/rustc_target/src/spec/targets/i686_pc_windows_gnullvm.rs index f4e33b8817887..1a69e109fca6f 100644 --- a/compiler/rustc_target/src/spec/targets/i686_pc_windows_gnullvm.rs +++ b/compiler/rustc_target/src/spec/targets/i686_pc_windows_gnullvm.rs @@ -16,6 +16,7 @@ pub fn target() -> Target { Target { llvm_target: "i686-pc-windows-gnu".into(), + description: None, pointer_width: 32, data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i64:64-i128:128-f80:32-n8:16:32-a:0:32-S32" diff --git a/compiler/rustc_target/src/spec/targets/i686_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/targets/i686_pc_windows_msvc.rs index 9f1c8f4676cb3..28b2345874a0e 100644 --- a/compiler/rustc_target/src/spec/targets/i686_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/targets/i686_pc_windows_msvc.rs @@ -23,6 +23,7 @@ pub fn target() -> Target { Target { llvm_target: "i686-pc-windows-msvc".into(), + description: None, pointer_width: 32, data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i64:64-i128:128-f80:128-n8:16:32-a:0:32-S32" diff --git a/compiler/rustc_target/src/spec/targets/i686_unknown_freebsd.rs b/compiler/rustc_target/src/spec/targets/i686_unknown_freebsd.rs index d90f481c68cf4..f84886807c381 100644 --- a/compiler/rustc_target/src/spec/targets/i686_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/targets/i686_unknown_freebsd.rs @@ -9,6 +9,7 @@ pub fn target() -> Target { Target { llvm_target: "i686-unknown-freebsd".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i128:128-f64:32:64-f80:32-n8:16:32-S128" diff --git a/compiler/rustc_target/src/spec/targets/i686_unknown_haiku.rs b/compiler/rustc_target/src/spec/targets/i686_unknown_haiku.rs index 330a390c9817d..af74539b4a15a 100644 --- a/compiler/rustc_target/src/spec/targets/i686_unknown_haiku.rs +++ b/compiler/rustc_target/src/spec/targets/i686_unknown_haiku.rs @@ -9,6 +9,7 @@ pub fn target() -> Target { Target { llvm_target: "i686-unknown-haiku".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i128:128-f64:32:64-f80:32-n8:16:32-S128" diff --git a/compiler/rustc_target/src/spec/targets/i686_unknown_hurd_gnu.rs b/compiler/rustc_target/src/spec/targets/i686_unknown_hurd_gnu.rs index c32f7177c1a09..096337d0906db 100644 --- a/compiler/rustc_target/src/spec/targets/i686_unknown_hurd_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/i686_unknown_hurd_gnu.rs @@ -9,6 +9,7 @@ pub fn target() -> Target { Target { llvm_target: "i686-unknown-hurd-gnu".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i128:128-f64:32:64-f80:32-n8:16:32-S128" diff --git a/compiler/rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs index 9bc38a72f4d39..709265bde6772 100644 --- a/compiler/rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/i686_unknown_linux_gnu.rs @@ -10,6 +10,7 @@ pub fn target() -> Target { Target { llvm_target: "i686-unknown-linux-gnu".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i128:128-f64:32:64-f80:32-n8:16:32-S128" diff --git a/compiler/rustc_target/src/spec/targets/i686_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/i686_unknown_linux_musl.rs index 4a82e0986c72b..d86d0259cd92f 100644 --- a/compiler/rustc_target/src/spec/targets/i686_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/i686_unknown_linux_musl.rs @@ -23,6 +23,7 @@ pub fn target() -> Target { Target { llvm_target: "i686-unknown-linux-musl".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i128:128-f64:32:64-f80:32-n8:16:32-S128" diff --git a/compiler/rustc_target/src/spec/targets/i686_unknown_netbsd.rs b/compiler/rustc_target/src/spec/targets/i686_unknown_netbsd.rs index ea72656607e4a..86d3404c21929 100644 --- a/compiler/rustc_target/src/spec/targets/i686_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/targets/i686_unknown_netbsd.rs @@ -9,6 +9,7 @@ pub fn target() -> Target { Target { llvm_target: "i686-unknown-netbsdelf".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i128:128-f64:32:64-f80:32-n8:16:32-S128" diff --git a/compiler/rustc_target/src/spec/targets/i686_unknown_openbsd.rs b/compiler/rustc_target/src/spec/targets/i686_unknown_openbsd.rs index 945dc0f896709..4e3829f05f5f3 100644 --- a/compiler/rustc_target/src/spec/targets/i686_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/targets/i686_unknown_openbsd.rs @@ -9,6 +9,7 @@ pub fn target() -> Target { Target { llvm_target: "i686-unknown-openbsd".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i128:128-f64:32:64-f80:32-n8:16:32-S128" diff --git a/compiler/rustc_target/src/spec/targets/i686_unknown_uefi.rs b/compiler/rustc_target/src/spec/targets/i686_unknown_uefi.rs index 37d57c1cdf304..296acf35fdb1a 100644 --- a/compiler/rustc_target/src/spec/targets/i686_unknown_uefi.rs +++ b/compiler/rustc_target/src/spec/targets/i686_unknown_uefi.rs @@ -78,6 +78,7 @@ pub fn target() -> Target { // remove -gnu and use the default one. Target { llvm_target: "i686-unknown-windows-gnu".into(), + description: None, pointer_width: 32, data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i64:64-i128:128-f80:32-n8:16:32-a:0:32-S32" diff --git a/compiler/rustc_target/src/spec/targets/i686_uwp_windows_gnu.rs b/compiler/rustc_target/src/spec/targets/i686_uwp_windows_gnu.rs index 0830033dc23d1..12c7c4c5a2de0 100644 --- a/compiler/rustc_target/src/spec/targets/i686_uwp_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/i686_uwp_windows_gnu.rs @@ -16,6 +16,7 @@ pub fn target() -> Target { Target { llvm_target: "i686-pc-windows-gnu".into(), + description: None, pointer_width: 32, data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i64:64-i128:128-f80:32-n8:16:32-a:0:32-S32" diff --git a/compiler/rustc_target/src/spec/targets/i686_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/targets/i686_uwp_windows_msvc.rs index 534dd6ee54fbb..d04ec0012f286 100644 --- a/compiler/rustc_target/src/spec/targets/i686_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/targets/i686_uwp_windows_msvc.rs @@ -7,6 +7,7 @@ pub fn target() -> Target { Target { llvm_target: "i686-pc-windows-msvc".into(), + description: None, pointer_width: 32, data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i64:64-i128:128-f80:128-n8:16:32-a:0:32-S32" diff --git a/compiler/rustc_target/src/spec/targets/i686_win7_windows_msvc.rs b/compiler/rustc_target/src/spec/targets/i686_win7_windows_msvc.rs index 35ad81dc052bb..1990c91bdcc33 100644 --- a/compiler/rustc_target/src/spec/targets/i686_win7_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/targets/i686_win7_windows_msvc.rs @@ -23,6 +23,7 @@ pub fn target() -> Target { Target { llvm_target: "i686-pc-windows-msvc".into(), + description: None, pointer_width: 32, data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i64:64-i128:128-f80:128-n8:16:32-a:0:32-S32" diff --git a/compiler/rustc_target/src/spec/targets/i686_wrs_vxworks.rs b/compiler/rustc_target/src/spec/targets/i686_wrs_vxworks.rs index 30c2295e40210..d554f717f253f 100644 --- a/compiler/rustc_target/src/spec/targets/i686_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/targets/i686_wrs_vxworks.rs @@ -9,6 +9,7 @@ pub fn target() -> Target { Target { llvm_target: "i686-unknown-linux-gnu".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i128:128-f64:32:64-f80:32-n8:16:32-S128" diff --git a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs index 234270c999b2a..f69412bd50913 100644 --- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_linux_gnu.rs @@ -3,6 +3,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "loongarch64-unknown-linux-gnu".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".into(), arch: "loongarch64".into(), diff --git a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs index 3b1ea8e206f1c..370c7b3995039 100644 --- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs +++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none.rs @@ -4,6 +4,7 @@ use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "loongarch64-unknown-none".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".into(), arch: "loongarch64".into(), diff --git a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs index ab9300ef9c723..8e50a1c3009cd 100644 --- a/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs +++ b/compiler/rustc_target/src/spec/targets/loongarch64_unknown_none_softfloat.rs @@ -4,6 +4,7 @@ use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "loongarch64-unknown-none".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".into(), arch: "loongarch64".into(), diff --git a/compiler/rustc_target/src/spec/targets/m68k_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/m68k_unknown_linux_gnu.rs index b54f5d753cc34..9fe6760d9f334 100644 --- a/compiler/rustc_target/src/spec/targets/m68k_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/m68k_unknown_linux_gnu.rs @@ -8,6 +8,7 @@ pub fn target() -> Target { Target { llvm_target: "m68k-unknown-linux-gnu".into(), + description: None, pointer_width: 32, data_layout: "E-m:e-p:32:16:32-i8:8:8-i16:16:16-i32:16:32-n8:16:32-a:0:16-S16".into(), arch: "m68k".into(), diff --git a/compiler/rustc_target/src/spec/targets/mips64_openwrt_linux_musl.rs b/compiler/rustc_target/src/spec/targets/mips64_openwrt_linux_musl.rs index 6191a6dfd4156..96472c41da6c8 100644 --- a/compiler/rustc_target/src/spec/targets/mips64_openwrt_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/mips64_openwrt_linux_musl.rs @@ -13,6 +13,7 @@ pub fn target() -> Target { Target { // LLVM doesn't recognize "muslabi64" yet. llvm_target: "mips64-unknown-linux-musl".into(), + description: None, pointer_width: 64, data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".into(), arch: "mips64".into(), diff --git a/compiler/rustc_target/src/spec/targets/mips64_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/targets/mips64_unknown_linux_gnuabi64.rs index e1131f07f2645..6c767c57ffa78 100644 --- a/compiler/rustc_target/src/spec/targets/mips64_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/targets/mips64_unknown_linux_gnuabi64.rs @@ -4,6 +4,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "mips64-unknown-linux-gnuabi64".into(), + description: None, pointer_width: 64, data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".into(), arch: "mips64".into(), diff --git a/compiler/rustc_target/src/spec/targets/mips64_unknown_linux_muslabi64.rs b/compiler/rustc_target/src/spec/targets/mips64_unknown_linux_muslabi64.rs index 147c1c2247613..d2b6b4e4898b1 100644 --- a/compiler/rustc_target/src/spec/targets/mips64_unknown_linux_muslabi64.rs +++ b/compiler/rustc_target/src/spec/targets/mips64_unknown_linux_muslabi64.rs @@ -9,6 +9,7 @@ pub fn target() -> Target { Target { // LLVM doesn't recognize "muslabi64" yet. llvm_target: "mips64-unknown-linux-musl".into(), + description: None, pointer_width: 64, data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".into(), arch: "mips64".into(), diff --git a/compiler/rustc_target/src/spec/targets/mips64el_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/targets/mips64el_unknown_linux_gnuabi64.rs index 4c612554d204d..ef2458a563a2c 100644 --- a/compiler/rustc_target/src/spec/targets/mips64el_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/targets/mips64el_unknown_linux_gnuabi64.rs @@ -3,6 +3,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "mips64el-unknown-linux-gnuabi64".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".into(), arch: "mips64".into(), diff --git a/compiler/rustc_target/src/spec/targets/mips64el_unknown_linux_muslabi64.rs b/compiler/rustc_target/src/spec/targets/mips64el_unknown_linux_muslabi64.rs index d60404f0ce53f..2983e957d4dcd 100644 --- a/compiler/rustc_target/src/spec/targets/mips64el_unknown_linux_muslabi64.rs +++ b/compiler/rustc_target/src/spec/targets/mips64el_unknown_linux_muslabi64.rs @@ -8,6 +8,7 @@ pub fn target() -> Target { Target { // LLVM doesn't recognize "muslabi64" yet. llvm_target: "mips64el-unknown-linux-musl".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".into(), arch: "mips64".into(), diff --git a/compiler/rustc_target/src/spec/targets/mips_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/mips_unknown_linux_gnu.rs index c49b89bbd4650..d5a5540b3262d 100644 --- a/compiler/rustc_target/src/spec/targets/mips_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/mips_unknown_linux_gnu.rs @@ -4,6 +4,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "mips-unknown-linux-gnu".into(), + description: None, pointer_width: 32, data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".into(), arch: "mips".into(), diff --git a/compiler/rustc_target/src/spec/targets/mips_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/mips_unknown_linux_musl.rs index 92d2d9d84c1d1..6a13fb7b6bc95 100644 --- a/compiler/rustc_target/src/spec/targets/mips_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/mips_unknown_linux_musl.rs @@ -9,6 +9,7 @@ pub fn target() -> Target { base.crt_static_default = false; Target { llvm_target: "mips-unknown-linux-musl".into(), + description: None, pointer_width: 32, data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".into(), arch: "mips".into(), diff --git a/compiler/rustc_target/src/spec/targets/mips_unknown_linux_uclibc.rs b/compiler/rustc_target/src/spec/targets/mips_unknown_linux_uclibc.rs index 51df0a974cb1c..1137a65c36635 100644 --- a/compiler/rustc_target/src/spec/targets/mips_unknown_linux_uclibc.rs +++ b/compiler/rustc_target/src/spec/targets/mips_unknown_linux_uclibc.rs @@ -4,6 +4,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "mips-unknown-linux-uclibc".into(), + description: None, pointer_width: 32, data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".into(), arch: "mips".into(), diff --git a/compiler/rustc_target/src/spec/targets/mipsel_sony_psp.rs b/compiler/rustc_target/src/spec/targets/mipsel_sony_psp.rs index 75beb91b13a5e..88a6d08286e8e 100644 --- a/compiler/rustc_target/src/spec/targets/mipsel_sony_psp.rs +++ b/compiler/rustc_target/src/spec/targets/mipsel_sony_psp.rs @@ -11,6 +11,7 @@ pub fn target() -> Target { Target { llvm_target: "mipsel-sony-psp".into(), + description: None, pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".into(), arch: "mips".into(), diff --git a/compiler/rustc_target/src/spec/targets/mipsel_sony_psx.rs b/compiler/rustc_target/src/spec/targets/mipsel_sony_psx.rs index 12a66efdd46f9..3c97c279f1aaa 100644 --- a/compiler/rustc_target/src/spec/targets/mipsel_sony_psx.rs +++ b/compiler/rustc_target/src/spec/targets/mipsel_sony_psx.rs @@ -3,6 +3,7 @@ use crate::spec::{cvs, Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, pub fn target() -> Target { Target { llvm_target: "mipsel-sony-psx".into(), + description: None, pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".into(), arch: "mips".into(), diff --git a/compiler/rustc_target/src/spec/targets/mipsel_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/mipsel_unknown_linux_gnu.rs index c2e482148cd72..cceeea43e17c5 100644 --- a/compiler/rustc_target/src/spec/targets/mipsel_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/mipsel_unknown_linux_gnu.rs @@ -3,6 +3,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "mipsel-unknown-linux-gnu".into(), + description: None, pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".into(), arch: "mips".into(), diff --git a/compiler/rustc_target/src/spec/targets/mipsel_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/mipsel_unknown_linux_musl.rs index 5eed050453d16..3da9b70ba7fad 100644 --- a/compiler/rustc_target/src/spec/targets/mipsel_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/mipsel_unknown_linux_musl.rs @@ -8,6 +8,7 @@ pub fn target() -> Target { base.crt_static_default = false; Target { llvm_target: "mipsel-unknown-linux-musl".into(), + description: None, pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".into(), arch: "mips".into(), diff --git a/compiler/rustc_target/src/spec/targets/mipsel_unknown_linux_uclibc.rs b/compiler/rustc_target/src/spec/targets/mipsel_unknown_linux_uclibc.rs index 77e69119d167c..14a8900c1711b 100644 --- a/compiler/rustc_target/src/spec/targets/mipsel_unknown_linux_uclibc.rs +++ b/compiler/rustc_target/src/spec/targets/mipsel_unknown_linux_uclibc.rs @@ -3,6 +3,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "mipsel-unknown-linux-uclibc".into(), + description: None, pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".into(), arch: "mips".into(), diff --git a/compiler/rustc_target/src/spec/targets/mipsel_unknown_netbsd.rs b/compiler/rustc_target/src/spec/targets/mipsel_unknown_netbsd.rs index 706a1af3e1546..f89ac1f08e11d 100644 --- a/compiler/rustc_target/src/spec/targets/mipsel_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/targets/mipsel_unknown_netbsd.rs @@ -8,6 +8,7 @@ pub fn target() -> Target { Target { llvm_target: "mipsel-unknown-netbsd".into(), + description: None, pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".into(), arch: "mips".into(), diff --git a/compiler/rustc_target/src/spec/targets/mipsel_unknown_none.rs b/compiler/rustc_target/src/spec/targets/mipsel_unknown_none.rs index 43b01e7a062dc..9c6bef4d77167 100644 --- a/compiler/rustc_target/src/spec/targets/mipsel_unknown_none.rs +++ b/compiler/rustc_target/src/spec/targets/mipsel_unknown_none.rs @@ -7,6 +7,7 @@ use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, Targ pub fn target() -> Target { Target { llvm_target: "mipsel-unknown-none".into(), + description: None, pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".into(), arch: "mips".into(), diff --git a/compiler/rustc_target/src/spec/targets/mipsisa32r6_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/mipsisa32r6_unknown_linux_gnu.rs index 59783882e186d..0bda8634d8ace 100644 --- a/compiler/rustc_target/src/spec/targets/mipsisa32r6_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/mipsisa32r6_unknown_linux_gnu.rs @@ -4,6 +4,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "mipsisa32r6-unknown-linux-gnu".into(), + description: None, pointer_width: 32, data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".into(), arch: "mips32r6".into(), diff --git a/compiler/rustc_target/src/spec/targets/mipsisa32r6el_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/mipsisa32r6el_unknown_linux_gnu.rs index c3d79412e1c8e..10b7b93d4efce 100644 --- a/compiler/rustc_target/src/spec/targets/mipsisa32r6el_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/mipsisa32r6el_unknown_linux_gnu.rs @@ -3,6 +3,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "mipsisa32r6el-unknown-linux-gnu".into(), + description: None, pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".into(), arch: "mips32r6".into(), diff --git a/compiler/rustc_target/src/spec/targets/mipsisa64r6_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/targets/mipsisa64r6_unknown_linux_gnuabi64.rs index 2ae6e7521f94c..945c237ef3899 100644 --- a/compiler/rustc_target/src/spec/targets/mipsisa64r6_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/targets/mipsisa64r6_unknown_linux_gnuabi64.rs @@ -4,6 +4,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "mipsisa64r6-unknown-linux-gnuabi64".into(), + description: None, pointer_width: 64, data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".into(), arch: "mips64r6".into(), diff --git a/compiler/rustc_target/src/spec/targets/mipsisa64r6el_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/targets/mipsisa64r6el_unknown_linux_gnuabi64.rs index 31637e9f6d02c..407431f685c89 100644 --- a/compiler/rustc_target/src/spec/targets/mipsisa64r6el_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/targets/mipsisa64r6el_unknown_linux_gnuabi64.rs @@ -3,6 +3,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "mipsisa64r6el-unknown-linux-gnuabi64".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".into(), arch: "mips64r6".into(), diff --git a/compiler/rustc_target/src/spec/targets/msp430_none_elf.rs b/compiler/rustc_target/src/spec/targets/msp430_none_elf.rs index 251fd2a0a7ab7..6f6503ea1116e 100644 --- a/compiler/rustc_target/src/spec/targets/msp430_none_elf.rs +++ b/compiler/rustc_target/src/spec/targets/msp430_none_elf.rs @@ -3,6 +3,7 @@ use crate::spec::{cvs, Cc, LinkerFlavor, PanicStrategy, RelocModel, Target, Targ pub fn target() -> Target { Target { llvm_target: "msp430-none-elf".into(), + description: None, pointer_width: 16, data_layout: "e-m:e-p:16:16-i32:16-i64:16-f32:16-f64:16-a:8-n8:16-S16".into(), arch: "msp430".into(), diff --git a/compiler/rustc_target/src/spec/targets/nvptx64_nvidia_cuda.rs b/compiler/rustc_target/src/spec/targets/nvptx64_nvidia_cuda.rs index b0582b235b9a4..33b79a1335948 100644 --- a/compiler/rustc_target/src/spec/targets/nvptx64_nvidia_cuda.rs +++ b/compiler/rustc_target/src/spec/targets/nvptx64_nvidia_cuda.rs @@ -5,6 +5,7 @@ pub fn target() -> Target { arch: "nvptx64".into(), data_layout: "e-i64:64-i128:128-v16:16-v32:32-n16:32:64".into(), llvm_target: "nvptx64-nvidia-cuda".into(), + description: None, pointer_width: 64, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/targets/powerpc64_ibm_aix.rs b/compiler/rustc_target/src/spec/targets/powerpc64_ibm_aix.rs index c512e4c7c4899..6e156115f7407 100644 --- a/compiler/rustc_target/src/spec/targets/powerpc64_ibm_aix.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc64_ibm_aix.rs @@ -10,6 +10,7 @@ pub fn target() -> Target { Target { llvm_target: "powerpc64-ibm-aix".into(), + description: None, pointer_width: 64, data_layout: "E-m:a-Fi64-i64:64-n32:64-S128-v256:256:256-v512:512:512".into(), arch: "powerpc64".into(), diff --git a/compiler/rustc_target/src/spec/targets/powerpc64_unknown_freebsd.rs b/compiler/rustc_target/src/spec/targets/powerpc64_unknown_freebsd.rs index e470ec05eff50..27fbb6e3d8184 100644 --- a/compiler/rustc_target/src/spec/targets/powerpc64_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc64_unknown_freebsd.rs @@ -10,6 +10,7 @@ pub fn target() -> Target { Target { llvm_target: "powerpc64-unknown-freebsd".into(), + description: None, pointer_width: 64, data_layout: "E-m:e-Fn32-i64:64-n32:64".into(), arch: "powerpc64".into(), diff --git a/compiler/rustc_target/src/spec/targets/powerpc64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/powerpc64_unknown_linux_gnu.rs index 34e3184d348e3..11bbfe4baa203 100644 --- a/compiler/rustc_target/src/spec/targets/powerpc64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc64_unknown_linux_gnu.rs @@ -10,6 +10,7 @@ pub fn target() -> Target { Target { llvm_target: "powerpc64-unknown-linux-gnu".into(), + description: None, pointer_width: 64, data_layout: "E-m:e-Fi64-i64:64-n32:64-S128-v256:256:256-v512:512:512".into(), arch: "powerpc64".into(), diff --git a/compiler/rustc_target/src/spec/targets/powerpc64_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/powerpc64_unknown_linux_musl.rs index 90df3c696846b..5036df1369461 100644 --- a/compiler/rustc_target/src/spec/targets/powerpc64_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc64_unknown_linux_musl.rs @@ -10,6 +10,7 @@ pub fn target() -> Target { Target { llvm_target: "powerpc64-unknown-linux-musl".into(), + description: None, pointer_width: 64, data_layout: "E-m:e-Fn32-i64:64-n32:64-S128-v256:256:256-v512:512:512".into(), arch: "powerpc64".into(), diff --git a/compiler/rustc_target/src/spec/targets/powerpc64_unknown_openbsd.rs b/compiler/rustc_target/src/spec/targets/powerpc64_unknown_openbsd.rs index ebaeb04be3151..f0813e50e03af 100644 --- a/compiler/rustc_target/src/spec/targets/powerpc64_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc64_unknown_openbsd.rs @@ -10,6 +10,7 @@ pub fn target() -> Target { Target { llvm_target: "powerpc64-unknown-openbsd".into(), + description: None, pointer_width: 64, data_layout: "E-m:e-Fn32-i64:64-n32:64".into(), arch: "powerpc64".into(), diff --git a/compiler/rustc_target/src/spec/targets/powerpc64_wrs_vxworks.rs b/compiler/rustc_target/src/spec/targets/powerpc64_wrs_vxworks.rs index e2085ba7ce3e8..2365b687f6dc0 100644 --- a/compiler/rustc_target/src/spec/targets/powerpc64_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc64_wrs_vxworks.rs @@ -10,6 +10,7 @@ pub fn target() -> Target { Target { llvm_target: "powerpc64-unknown-linux-gnu".into(), + description: None, pointer_width: 64, data_layout: "E-m:e-Fi64-i64:64-n32:64-S128-v256:256:256-v512:512:512".into(), arch: "powerpc64".into(), diff --git a/compiler/rustc_target/src/spec/targets/powerpc64le_unknown_freebsd.rs b/compiler/rustc_target/src/spec/targets/powerpc64le_unknown_freebsd.rs index b399d36d8b248..83c0a9a7f69d6 100644 --- a/compiler/rustc_target/src/spec/targets/powerpc64le_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc64le_unknown_freebsd.rs @@ -9,6 +9,7 @@ pub fn target() -> Target { Target { llvm_target: "powerpc64le-unknown-freebsd".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-Fn32-i64:64-n32:64".into(), arch: "powerpc64".into(), diff --git a/compiler/rustc_target/src/spec/targets/powerpc64le_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/powerpc64le_unknown_linux_gnu.rs index 194c3170e683e..6041836f8fa91 100644 --- a/compiler/rustc_target/src/spec/targets/powerpc64le_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc64le_unknown_linux_gnu.rs @@ -9,6 +9,7 @@ pub fn target() -> Target { Target { llvm_target: "powerpc64le-unknown-linux-gnu".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-Fn32-i64:64-n32:64-S128-v256:256:256-v512:512:512".into(), arch: "powerpc64".into(), diff --git a/compiler/rustc_target/src/spec/targets/powerpc64le_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/powerpc64le_unknown_linux_musl.rs index 1f53e6895983f..a27a184aa88de 100644 --- a/compiler/rustc_target/src/spec/targets/powerpc64le_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc64le_unknown_linux_musl.rs @@ -9,6 +9,7 @@ pub fn target() -> Target { Target { llvm_target: "powerpc64le-unknown-linux-musl".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-Fn32-i64:64-n32:64-S128-v256:256:256-v512:512:512".into(), arch: "powerpc64".into(), diff --git a/compiler/rustc_target/src/spec/targets/powerpc_unknown_freebsd.rs b/compiler/rustc_target/src/spec/targets/powerpc_unknown_freebsd.rs index 6d094f9a36767..31220adc0db0e 100644 --- a/compiler/rustc_target/src/spec/targets/powerpc_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc_unknown_freebsd.rs @@ -13,6 +13,7 @@ pub fn target() -> Target { Target { llvm_target: "powerpc-unknown-freebsd13.0".into(), + description: None, pointer_width: 32, data_layout: "E-m:e-p:32:32-Fn32-i64:64-n32".into(), arch: "powerpc".into(), diff --git a/compiler/rustc_target/src/spec/targets/powerpc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/powerpc_unknown_linux_gnu.rs index 1600698da44a8..780824bed2a7c 100644 --- a/compiler/rustc_target/src/spec/targets/powerpc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc_unknown_linux_gnu.rs @@ -9,6 +9,7 @@ pub fn target() -> Target { Target { llvm_target: "powerpc-unknown-linux-gnu".into(), + description: None, pointer_width: 32, data_layout: "E-m:e-p:32:32-Fn32-i64:64-n32".into(), arch: "powerpc".into(), diff --git a/compiler/rustc_target/src/spec/targets/powerpc_unknown_linux_gnuspe.rs b/compiler/rustc_target/src/spec/targets/powerpc_unknown_linux_gnuspe.rs index af0fbfebef228..302b06b3e93b5 100644 --- a/compiler/rustc_target/src/spec/targets/powerpc_unknown_linux_gnuspe.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc_unknown_linux_gnuspe.rs @@ -9,6 +9,7 @@ pub fn target() -> Target { Target { llvm_target: "powerpc-unknown-linux-gnuspe".into(), + description: None, pointer_width: 32, data_layout: "E-m:e-p:32:32-Fn32-i64:64-n32".into(), arch: "powerpc".into(), diff --git a/compiler/rustc_target/src/spec/targets/powerpc_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/powerpc_unknown_linux_musl.rs index 9b0ac4a0fc9b9..7f5128249804b 100644 --- a/compiler/rustc_target/src/spec/targets/powerpc_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc_unknown_linux_musl.rs @@ -9,6 +9,7 @@ pub fn target() -> Target { Target { llvm_target: "powerpc-unknown-linux-musl".into(), + description: None, pointer_width: 32, data_layout: "E-m:e-p:32:32-Fn32-i64:64-n32".into(), arch: "powerpc".into(), diff --git a/compiler/rustc_target/src/spec/targets/powerpc_unknown_netbsd.rs b/compiler/rustc_target/src/spec/targets/powerpc_unknown_netbsd.rs index bc2e239d9a523..41ea47fbb633b 100644 --- a/compiler/rustc_target/src/spec/targets/powerpc_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc_unknown_netbsd.rs @@ -9,6 +9,7 @@ pub fn target() -> Target { Target { llvm_target: "powerpc-unknown-netbsd".into(), + description: None, pointer_width: 32, data_layout: "E-m:e-p:32:32-Fn32-i64:64-n32".into(), arch: "powerpc".into(), diff --git a/compiler/rustc_target/src/spec/targets/powerpc_unknown_openbsd.rs b/compiler/rustc_target/src/spec/targets/powerpc_unknown_openbsd.rs index 081aaaea2499e..b57c980096a55 100644 --- a/compiler/rustc_target/src/spec/targets/powerpc_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc_unknown_openbsd.rs @@ -9,6 +9,7 @@ pub fn target() -> Target { Target { llvm_target: "powerpc-unknown-openbsd".into(), + description: None, pointer_width: 32, data_layout: "E-m:e-p:32:32-Fn32-i64:64-n32".into(), arch: "powerpc".into(), diff --git a/compiler/rustc_target/src/spec/targets/powerpc_wrs_vxworks.rs b/compiler/rustc_target/src/spec/targets/powerpc_wrs_vxworks.rs index e8bccc153850e..7226d61846588 100644 --- a/compiler/rustc_target/src/spec/targets/powerpc_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc_wrs_vxworks.rs @@ -9,6 +9,7 @@ pub fn target() -> Target { Target { llvm_target: "powerpc-unknown-linux-gnu".into(), + description: None, pointer_width: 32, data_layout: "E-m:e-p:32:32-Fn32-i64:64-n32".into(), arch: "powerpc".into(), diff --git a/compiler/rustc_target/src/spec/targets/powerpc_wrs_vxworks_spe.rs b/compiler/rustc_target/src/spec/targets/powerpc_wrs_vxworks_spe.rs index fa4ef098e038e..847ff3799b0c8 100644 --- a/compiler/rustc_target/src/spec/targets/powerpc_wrs_vxworks_spe.rs +++ b/compiler/rustc_target/src/spec/targets/powerpc_wrs_vxworks_spe.rs @@ -9,6 +9,7 @@ pub fn target() -> Target { Target { llvm_target: "powerpc-unknown-linux-gnuspe".into(), + description: None, pointer_width: 32, data_layout: "E-m:e-p:32:32-Fn32-i64:64-n32".into(), arch: "powerpc".into(), diff --git a/compiler/rustc_target/src/spec/targets/riscv32gc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/riscv32gc_unknown_linux_gnu.rs index 0be32cbd77165..95d3aa29facd1 100644 --- a/compiler/rustc_target/src/spec/targets/riscv32gc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32gc_unknown_linux_gnu.rs @@ -5,6 +5,7 @@ use crate::spec::{base, CodeModel, SplitDebuginfo, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "riscv32-unknown-linux-gnu".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-i64:64-n32-S128".into(), arch: "riscv32".into(), diff --git a/compiler/rustc_target/src/spec/targets/riscv32gc_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/riscv32gc_unknown_linux_musl.rs index cfa9990dac9bd..1c81da11de17d 100644 --- a/compiler/rustc_target/src/spec/targets/riscv32gc_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32gc_unknown_linux_musl.rs @@ -5,6 +5,7 @@ use crate::spec::{base, CodeModel, SplitDebuginfo, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "riscv32-unknown-linux-musl".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-i64:64-n32-S128".into(), arch: "riscv32".into(), diff --git a/compiler/rustc_target/src/spec/targets/riscv32i_unknown_none_elf.rs b/compiler/rustc_target/src/spec/targets/riscv32i_unknown_none_elf.rs index b80a5fbeacf9c..ad85186d216d7 100644 --- a/compiler/rustc_target/src/spec/targets/riscv32i_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32i_unknown_none_elf.rs @@ -4,6 +4,7 @@ pub fn target() -> Target { Target { data_layout: "e-m:e-p:32:32-i64:64-n32-S128".into(), llvm_target: "riscv32".into(), + description: None, pointer_width: 32, arch: "riscv32".into(), diff --git a/compiler/rustc_target/src/spec/targets/riscv32im_risc0_zkvm_elf.rs b/compiler/rustc_target/src/spec/targets/riscv32im_risc0_zkvm_elf.rs index bf819de413311..43958df7cebb7 100644 --- a/compiler/rustc_target/src/spec/targets/riscv32im_risc0_zkvm_elf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32im_risc0_zkvm_elf.rs @@ -5,6 +5,7 @@ pub fn target() -> Target { Target { data_layout: "e-m:e-p:32:32-i64:64-n32-S128".into(), llvm_target: "riscv32".into(), + description: None, pointer_width: 32, arch: "riscv32".into(), diff --git a/compiler/rustc_target/src/spec/targets/riscv32im_unknown_none_elf.rs b/compiler/rustc_target/src/spec/targets/riscv32im_unknown_none_elf.rs index 6480facb1370e..60433837cf146 100644 --- a/compiler/rustc_target/src/spec/targets/riscv32im_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32im_unknown_none_elf.rs @@ -4,6 +4,7 @@ pub fn target() -> Target { Target { data_layout: "e-m:e-p:32:32-i64:64-n32-S128".into(), llvm_target: "riscv32".into(), + description: None, pointer_width: 32, arch: "riscv32".into(), diff --git a/compiler/rustc_target/src/spec/targets/riscv32imac_esp_espidf.rs b/compiler/rustc_target/src/spec/targets/riscv32imac_esp_espidf.rs index 25f5c3bc2a648..6741d5224c9b3 100644 --- a/compiler/rustc_target/src/spec/targets/riscv32imac_esp_espidf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32imac_esp_espidf.rs @@ -4,6 +4,7 @@ pub fn target() -> Target { Target { data_layout: "e-m:e-p:32:32-i64:64-n32-S128".into(), llvm_target: "riscv32".into(), + description: None, pointer_width: 32, arch: "riscv32".into(), diff --git a/compiler/rustc_target/src/spec/targets/riscv32imac_unknown_none_elf.rs b/compiler/rustc_target/src/spec/targets/riscv32imac_unknown_none_elf.rs index 55c6e4d16e5a4..4b49df632a1a9 100644 --- a/compiler/rustc_target/src/spec/targets/riscv32imac_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32imac_unknown_none_elf.rs @@ -4,6 +4,7 @@ pub fn target() -> Target { Target { data_layout: "e-m:e-p:32:32-i64:64-n32-S128".into(), llvm_target: "riscv32".into(), + description: None, pointer_width: 32, arch: "riscv32".into(), diff --git a/compiler/rustc_target/src/spec/targets/riscv32imac_unknown_xous_elf.rs b/compiler/rustc_target/src/spec/targets/riscv32imac_unknown_xous_elf.rs index ed0591ad918bc..a295e060909d4 100644 --- a/compiler/rustc_target/src/spec/targets/riscv32imac_unknown_xous_elf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32imac_unknown_xous_elf.rs @@ -4,6 +4,7 @@ pub fn target() -> Target { Target { data_layout: "e-m:e-p:32:32-i64:64-n32-S128".into(), llvm_target: "riscv32".into(), + description: None, pointer_width: 32, arch: "riscv32".into(), diff --git a/compiler/rustc_target/src/spec/targets/riscv32imafc_esp_espidf.rs b/compiler/rustc_target/src/spec/targets/riscv32imafc_esp_espidf.rs index 6c7c920bd1803..15aa60f95a2f2 100644 --- a/compiler/rustc_target/src/spec/targets/riscv32imafc_esp_espidf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32imafc_esp_espidf.rs @@ -4,6 +4,7 @@ pub fn target() -> Target { Target { data_layout: "e-m:e-p:32:32-i64:64-n32-S128".into(), llvm_target: "riscv32".into(), + description: None, pointer_width: 32, arch: "riscv32".into(), diff --git a/compiler/rustc_target/src/spec/targets/riscv32imafc_unknown_none_elf.rs b/compiler/rustc_target/src/spec/targets/riscv32imafc_unknown_none_elf.rs index 9fb68874ac8ea..896ad1c04f84d 100644 --- a/compiler/rustc_target/src/spec/targets/riscv32imafc_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32imafc_unknown_none_elf.rs @@ -4,6 +4,7 @@ pub fn target() -> Target { Target { data_layout: "e-m:e-p:32:32-i64:64-n32-S128".into(), llvm_target: "riscv32".into(), + description: None, pointer_width: 32, arch: "riscv32".into(), diff --git a/compiler/rustc_target/src/spec/targets/riscv32imc_esp_espidf.rs b/compiler/rustc_target/src/spec/targets/riscv32imc_esp_espidf.rs index 3aa9923ee4dd1..1707e067a488c 100644 --- a/compiler/rustc_target/src/spec/targets/riscv32imc_esp_espidf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32imc_esp_espidf.rs @@ -4,6 +4,7 @@ pub fn target() -> Target { Target { data_layout: "e-m:e-p:32:32-i64:64-n32-S128".into(), llvm_target: "riscv32".into(), + description: None, pointer_width: 32, arch: "riscv32".into(), diff --git a/compiler/rustc_target/src/spec/targets/riscv32imc_unknown_none_elf.rs b/compiler/rustc_target/src/spec/targets/riscv32imc_unknown_none_elf.rs index 13a621a6643b8..e23273f8c9fcb 100644 --- a/compiler/rustc_target/src/spec/targets/riscv32imc_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv32imc_unknown_none_elf.rs @@ -4,6 +4,7 @@ pub fn target() -> Target { Target { data_layout: "e-m:e-p:32:32-i64:64-n32-S128".into(), llvm_target: "riscv32".into(), + description: None, pointer_width: 32, arch: "riscv32".into(), diff --git a/compiler/rustc_target/src/spec/targets/riscv64_linux_android.rs b/compiler/rustc_target/src/spec/targets/riscv64_linux_android.rs index 762197d7217c7..879deff256394 100644 --- a/compiler/rustc_target/src/spec/targets/riscv64_linux_android.rs +++ b/compiler/rustc_target/src/spec/targets/riscv64_linux_android.rs @@ -5,6 +5,7 @@ use crate::spec::{base, CodeModel, SanitizerSet, SplitDebuginfo, Target, TargetO pub fn target() -> Target { Target { llvm_target: "riscv64-linux-android".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(), arch: "riscv64".into(), diff --git a/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_freebsd.rs b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_freebsd.rs index 2c7878de81206..ed0290d63a7f5 100644 --- a/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_freebsd.rs @@ -3,6 +3,7 @@ use crate::spec::{base, CodeModel, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "riscv64-unknown-freebsd".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(), arch: "riscv64".into(), diff --git a/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_fuchsia.rs b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_fuchsia.rs index a29470c24fbd4..97873e93f6825 100644 --- a/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_fuchsia.rs +++ b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_fuchsia.rs @@ -3,6 +3,7 @@ use crate::spec::{base, CodeModel, SanitizerSet, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "riscv64-unknown-fuchsia".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(), arch: "riscv64".into(), diff --git a/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_hermit.rs b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_hermit.rs index b7e29d2da3dca..40b3f19619899 100644 --- a/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_hermit.rs +++ b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_hermit.rs @@ -3,6 +3,7 @@ use crate::spec::{base, CodeModel, RelocModel, Target, TargetOptions, TlsModel}; pub fn target() -> Target { Target { llvm_target: "riscv64-unknown-hermit".into(), + description: None, pointer_width: 64, arch: "riscv64".into(), data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_linux_gnu.rs index e71929a190479..fc7c8024ffbf9 100644 --- a/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_linux_gnu.rs @@ -5,6 +5,7 @@ use crate::spec::{base, CodeModel, SplitDebuginfo, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "riscv64-unknown-linux-gnu".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(), arch: "riscv64".into(), diff --git a/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_linux_musl.rs index 8ea28d6b162cc..aa32149986ff5 100644 --- a/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_linux_musl.rs @@ -5,6 +5,7 @@ use crate::spec::{base, CodeModel, SplitDebuginfo, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "riscv64-unknown-linux-musl".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(), arch: "riscv64".into(), diff --git a/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_netbsd.rs b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_netbsd.rs index 43a313a940802..42d5853573514 100644 --- a/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_netbsd.rs @@ -3,6 +3,7 @@ use crate::spec::{base, CodeModel, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "riscv64-unknown-netbsd".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(), arch: "riscv64".into(), diff --git a/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_none_elf.rs b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_none_elf.rs index f29e224244ef5..89b0793375d46 100644 --- a/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_none_elf.rs @@ -5,6 +5,7 @@ use crate::spec::{RelocModel, Target, TargetOptions}; pub fn target() -> Target { Target { data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(), + description: None, llvm_target: "riscv64".into(), pointer_width: 64, arch: "riscv64".into(), diff --git a/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_openbsd.rs b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_openbsd.rs index 1f1da7d5a29ed..8f42bb5c1d2b6 100644 --- a/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/targets/riscv64gc_unknown_openbsd.rs @@ -3,6 +3,7 @@ use crate::spec::{base, CodeModel, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "riscv64-unknown-openbsd".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(), arch: "riscv64".into(), diff --git a/compiler/rustc_target/src/spec/targets/riscv64imac_unknown_none_elf.rs b/compiler/rustc_target/src/spec/targets/riscv64imac_unknown_none_elf.rs index 0f1821c9985b0..78bfbe6856545 100644 --- a/compiler/rustc_target/src/spec/targets/riscv64imac_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/targets/riscv64imac_unknown_none_elf.rs @@ -5,6 +5,7 @@ pub fn target() -> Target { Target { data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(), llvm_target: "riscv64".into(), + description: None, pointer_width: 64, arch: "riscv64".into(), diff --git a/compiler/rustc_target/src/spec/targets/s390x_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/s390x_unknown_linux_gnu.rs index 6fc410eb2235d..a982e145a8e40 100644 --- a/compiler/rustc_target/src/spec/targets/s390x_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/s390x_unknown_linux_gnu.rs @@ -18,6 +18,7 @@ pub fn target() -> Target { Target { llvm_target: "s390x-unknown-linux-gnu".into(), + description: None, pointer_width: 64, data_layout: "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64".into(), arch: "s390x".into(), diff --git a/compiler/rustc_target/src/spec/targets/s390x_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/s390x_unknown_linux_musl.rs index 03772aab372a8..015abf2521baf 100644 --- a/compiler/rustc_target/src/spec/targets/s390x_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/s390x_unknown_linux_musl.rs @@ -19,6 +19,7 @@ pub fn target() -> Target { Target { llvm_target: "s390x-unknown-linux-musl".into(), + description: None, pointer_width: 64, data_layout: "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-v128:64-a:8:16-n32:64".into(), arch: "s390x".into(), diff --git a/compiler/rustc_target/src/spec/targets/sparc64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/sparc64_unknown_linux_gnu.rs index 20ec9a84e8b81..9df3c2167d715 100644 --- a/compiler/rustc_target/src/spec/targets/sparc64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/sparc64_unknown_linux_gnu.rs @@ -9,6 +9,7 @@ pub fn target() -> Target { Target { llvm_target: "sparc64-unknown-linux-gnu".into(), + description: None, pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64-S128".into(), arch: "sparc64".into(), diff --git a/compiler/rustc_target/src/spec/targets/sparc64_unknown_netbsd.rs b/compiler/rustc_target/src/spec/targets/sparc64_unknown_netbsd.rs index c8c0fd2e134cf..305783883e274 100644 --- a/compiler/rustc_target/src/spec/targets/sparc64_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/targets/sparc64_unknown_netbsd.rs @@ -9,6 +9,7 @@ pub fn target() -> Target { Target { llvm_target: "sparc64-unknown-netbsd".into(), + description: None, pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64-S128".into(), arch: "sparc64".into(), diff --git a/compiler/rustc_target/src/spec/targets/sparc64_unknown_openbsd.rs b/compiler/rustc_target/src/spec/targets/sparc64_unknown_openbsd.rs index 82ce610066a2f..2878d27f5d4e5 100644 --- a/compiler/rustc_target/src/spec/targets/sparc64_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/targets/sparc64_unknown_openbsd.rs @@ -10,6 +10,7 @@ pub fn target() -> Target { Target { llvm_target: "sparc64-unknown-openbsd".into(), + description: None, pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64-S128".into(), arch: "sparc64".into(), diff --git a/compiler/rustc_target/src/spec/targets/sparc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/sparc_unknown_linux_gnu.rs index 548fbb9ed52d6..a2760ae93f2f3 100644 --- a/compiler/rustc_target/src/spec/targets/sparc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/sparc_unknown_linux_gnu.rs @@ -10,6 +10,7 @@ pub fn target() -> Target { Target { llvm_target: "sparc-unknown-linux-gnu".into(), + description: None, pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-f128:64-n32-S64".into(), arch: "sparc".into(), diff --git a/compiler/rustc_target/src/spec/targets/sparc_unknown_none_elf.rs b/compiler/rustc_target/src/spec/targets/sparc_unknown_none_elf.rs index 7e908a0f36552..c32e637a4a4c9 100644 --- a/compiler/rustc_target/src/spec/targets/sparc_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/targets/sparc_unknown_none_elf.rs @@ -20,6 +20,7 @@ pub fn target() -> Target { Target { data_layout: "E-m:e-p:32:32-i64:64-f128:64-n32-S64".into(), llvm_target: "sparc-unknown-none-elf".into(), + description: None, pointer_width: 32, arch: "sparc".into(), options, diff --git a/compiler/rustc_target/src/spec/targets/sparcv9_sun_solaris.rs b/compiler/rustc_target/src/spec/targets/sparcv9_sun_solaris.rs index 16cd991dd2863..2b6d2a4e49aed 100644 --- a/compiler/rustc_target/src/spec/targets/sparcv9_sun_solaris.rs +++ b/compiler/rustc_target/src/spec/targets/sparcv9_sun_solaris.rs @@ -12,6 +12,7 @@ pub fn target() -> Target { Target { llvm_target: "sparcv9-sun-solaris".into(), + description: None, pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64-S128".into(), // Use "sparc64" instead of "sparcv9" here, since the former is already diff --git a/compiler/rustc_target/src/spec/targets/thumbv4t_none_eabi.rs b/compiler/rustc_target/src/spec/targets/thumbv4t_none_eabi.rs index 7b5c019b1bb53..321b46d1d7303 100644 --- a/compiler/rustc_target/src/spec/targets/thumbv4t_none_eabi.rs +++ b/compiler/rustc_target/src/spec/targets/thumbv4t_none_eabi.rs @@ -15,6 +15,7 @@ use crate::spec::{cvs, FramePointer}; pub fn target() -> Target { Target { llvm_target: "thumbv4t-none-eabi".into(), + description: None, pointer_width: 32, arch: "arm".into(), /* Data layout args are '-' separated: diff --git a/compiler/rustc_target/src/spec/targets/thumbv5te_none_eabi.rs b/compiler/rustc_target/src/spec/targets/thumbv5te_none_eabi.rs index d9212afb084c5..d9901c647ab85 100644 --- a/compiler/rustc_target/src/spec/targets/thumbv5te_none_eabi.rs +++ b/compiler/rustc_target/src/spec/targets/thumbv5te_none_eabi.rs @@ -5,6 +5,7 @@ use crate::spec::{base, cvs, FramePointer, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "thumbv5te-none-eabi".into(), + description: None, pointer_width: 32, arch: "arm".into(), /* Data layout args are '-' separated: diff --git a/compiler/rustc_target/src/spec/targets/thumbv6m_none_eabi.rs b/compiler/rustc_target/src/spec/targets/thumbv6m_none_eabi.rs index ac076fb8864e1..c9878f172ae83 100644 --- a/compiler/rustc_target/src/spec/targets/thumbv6m_none_eabi.rs +++ b/compiler/rustc_target/src/spec/targets/thumbv6m_none_eabi.rs @@ -5,6 +5,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "thumbv6m-none-eabi".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/thumbv7a_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/targets/thumbv7a_pc_windows_msvc.rs index 128ac1dd17923..31a01f5cbffc0 100644 --- a/compiler/rustc_target/src/spec/targets/thumbv7a_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/targets/thumbv7a_pc_windows_msvc.rs @@ -13,6 +13,7 @@ pub fn target() -> Target { Target { llvm_target: "thumbv7a-pc-windows-msvc".into(), + description: None, pointer_width: 32, data_layout: "e-m:w-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/thumbv7a_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/targets/thumbv7a_uwp_windows_msvc.rs index 810ed6a24044a..ce07626be3b7c 100644 --- a/compiler/rustc_target/src/spec/targets/thumbv7a_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/targets/thumbv7a_uwp_windows_msvc.rs @@ -3,6 +3,7 @@ use crate::spec::{base, PanicStrategy, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "thumbv7a-pc-windows-msvc".into(), + description: None, pointer_width: 32, data_layout: "e-m:w-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/thumbv7em_none_eabi.rs b/compiler/rustc_target/src/spec/targets/thumbv7em_none_eabi.rs index 1752f1d9aacff..f09ba2461a30f 100644 --- a/compiler/rustc_target/src/spec/targets/thumbv7em_none_eabi.rs +++ b/compiler/rustc_target/src/spec/targets/thumbv7em_none_eabi.rs @@ -14,6 +14,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "thumbv7em-none-eabi".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/thumbv7em_none_eabihf.rs b/compiler/rustc_target/src/spec/targets/thumbv7em_none_eabihf.rs index c113c62fc1d85..5aebfea45f036 100644 --- a/compiler/rustc_target/src/spec/targets/thumbv7em_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/targets/thumbv7em_none_eabihf.rs @@ -13,6 +13,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "thumbv7em-none-eabihf".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/thumbv7m_none_eabi.rs b/compiler/rustc_target/src/spec/targets/thumbv7m_none_eabi.rs index f9ab3ce1ad08e..4e91765654c65 100644 --- a/compiler/rustc_target/src/spec/targets/thumbv7m_none_eabi.rs +++ b/compiler/rustc_target/src/spec/targets/thumbv7m_none_eabi.rs @@ -5,6 +5,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "thumbv7m-none-eabi".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/thumbv7neon_linux_androideabi.rs b/compiler/rustc_target/src/spec/targets/thumbv7neon_linux_androideabi.rs index c07aa944d7e3b..8638f36a0fc69 100644 --- a/compiler/rustc_target/src/spec/targets/thumbv7neon_linux_androideabi.rs +++ b/compiler/rustc_target/src/spec/targets/thumbv7neon_linux_androideabi.rs @@ -13,6 +13,7 @@ pub fn target() -> Target { base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-march=armv7-a"]); Target { llvm_target: "armv7-none-linux-android".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/thumbv7neon_unknown_linux_gnueabihf.rs b/compiler/rustc_target/src/spec/targets/thumbv7neon_unknown_linux_gnueabihf.rs index b4045037c6ab4..20e1967c4494a 100644 --- a/compiler/rustc_target/src/spec/targets/thumbv7neon_unknown_linux_gnueabihf.rs +++ b/compiler/rustc_target/src/spec/targets/thumbv7neon_unknown_linux_gnueabihf.rs @@ -9,6 +9,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "armv7-unknown-linux-gnueabihf".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/thumbv7neon_unknown_linux_musleabihf.rs b/compiler/rustc_target/src/spec/targets/thumbv7neon_unknown_linux_musleabihf.rs index 6ef30f10fe444..6be7c9f6a64a3 100644 --- a/compiler/rustc_target/src/spec/targets/thumbv7neon_unknown_linux_musleabihf.rs +++ b/compiler/rustc_target/src/spec/targets/thumbv7neon_unknown_linux_musleabihf.rs @@ -12,6 +12,7 @@ pub fn target() -> Target { // uses it to determine the calling convention and float ABI, and LLVM // doesn't support the "musleabihf" value. llvm_target: "armv7-unknown-linux-gnueabihf".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/thumbv8m_base_none_eabi.rs b/compiler/rustc_target/src/spec/targets/thumbv8m_base_none_eabi.rs index bf62574867a6a..3a3cccd65a608 100644 --- a/compiler/rustc_target/src/spec/targets/thumbv8m_base_none_eabi.rs +++ b/compiler/rustc_target/src/spec/targets/thumbv8m_base_none_eabi.rs @@ -5,6 +5,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "thumbv8m.base-none-eabi".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/thumbv8m_main_none_eabi.rs b/compiler/rustc_target/src/spec/targets/thumbv8m_main_none_eabi.rs index 07fc7feade590..21c74af74d501 100644 --- a/compiler/rustc_target/src/spec/targets/thumbv8m_main_none_eabi.rs +++ b/compiler/rustc_target/src/spec/targets/thumbv8m_main_none_eabi.rs @@ -6,6 +6,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "thumbv8m.main-none-eabi".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/thumbv8m_main_none_eabihf.rs b/compiler/rustc_target/src/spec/targets/thumbv8m_main_none_eabihf.rs index 61d4e8fc802e2..1baab520fd449 100644 --- a/compiler/rustc_target/src/spec/targets/thumbv8m_main_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/targets/thumbv8m_main_none_eabihf.rs @@ -6,6 +6,7 @@ use crate::spec::{base, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "thumbv8m.main-none-eabihf".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(), arch: "arm".into(), diff --git a/compiler/rustc_target/src/spec/targets/wasm32_unknown_emscripten.rs b/compiler/rustc_target/src/spec/targets/wasm32_unknown_emscripten.rs index e9e874297d39b..b6d5dae4f640c 100644 --- a/compiler/rustc_target/src/spec/targets/wasm32_unknown_emscripten.rs +++ b/compiler/rustc_target/src/spec/targets/wasm32_unknown_emscripten.rs @@ -24,6 +24,7 @@ pub fn target() -> Target { }; Target { llvm_target: "wasm32-unknown-emscripten".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-f128:64-n32:64-S128-ni:1:10:20".into(), arch: "wasm32".into(), diff --git a/compiler/rustc_target/src/spec/targets/wasm32_unknown_unknown.rs b/compiler/rustc_target/src/spec/targets/wasm32_unknown_unknown.rs index 2a40d9c663702..94ded57d2f0cd 100644 --- a/compiler/rustc_target/src/spec/targets/wasm32_unknown_unknown.rs +++ b/compiler/rustc_target/src/spec/targets/wasm32_unknown_unknown.rs @@ -47,6 +47,7 @@ pub fn target() -> Target { Target { llvm_target: "wasm32-unknown-unknown".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20".into(), arch: "wasm32".into(), diff --git a/compiler/rustc_target/src/spec/targets/wasm32_wasi_preview1_threads.rs b/compiler/rustc_target/src/spec/targets/wasm32_wasi_preview1_threads.rs index 28ea4cc9ece30..c04df5e644880 100644 --- a/compiler/rustc_target/src/spec/targets/wasm32_wasi_preview1_threads.rs +++ b/compiler/rustc_target/src/spec/targets/wasm32_wasi_preview1_threads.rs @@ -125,6 +125,7 @@ pub fn target() -> Target { Target { llvm_target: "wasm32-wasi".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20".into(), arch: "wasm32".into(), diff --git a/compiler/rustc_target/src/spec/targets/wasm32_wasip1.rs b/compiler/rustc_target/src/spec/targets/wasm32_wasip1.rs index 3d42fb8a640e4..85c99c77e23fe 100644 --- a/compiler/rustc_target/src/spec/targets/wasm32_wasip1.rs +++ b/compiler/rustc_target/src/spec/targets/wasm32_wasip1.rs @@ -49,6 +49,7 @@ pub fn target() -> Target { Target { llvm_target: "wasm32-wasi".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20".into(), arch: "wasm32".into(), diff --git a/compiler/rustc_target/src/spec/targets/wasm32_wasip2.rs b/compiler/rustc_target/src/spec/targets/wasm32_wasip2.rs index 30f7636f0bbe5..cd1b1c33ae415 100644 --- a/compiler/rustc_target/src/spec/targets/wasm32_wasip2.rs +++ b/compiler/rustc_target/src/spec/targets/wasm32_wasip2.rs @@ -56,6 +56,7 @@ pub fn target() -> Target { Target { llvm_target: "wasm32-unknown-unknown".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20".into(), arch: "wasm32".into(), diff --git a/compiler/rustc_target/src/spec/targets/wasm64_unknown_unknown.rs b/compiler/rustc_target/src/spec/targets/wasm64_unknown_unknown.rs index 54c5ae8e2030c..866e80782e27d 100644 --- a/compiler/rustc_target/src/spec/targets/wasm64_unknown_unknown.rs +++ b/compiler/rustc_target/src/spec/targets/wasm64_unknown_unknown.rs @@ -39,6 +39,7 @@ pub fn target() -> Target { Target { llvm_target: "wasm64-unknown-unknown".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-p:64:64-p10:8:8-p20:8:8-i64:64-n32:64-S128-ni:1:10:20".into(), arch: "wasm64".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_apple_darwin.rs b/compiler/rustc_target/src/spec/targets/x86_64_apple_darwin.rs index 356c67218681e..78907a12550fc 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_apple_darwin.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_apple_darwin.rs @@ -16,6 +16,7 @@ pub fn target() -> Target { // MACOSX_DEPLOYMENT_TARGET. To enable cross-language LTO to work // correctly, we do too. llvm_target: macos_llvm_target(arch).into(), + description: None, pointer_width: 64, data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_apple_ios.rs b/compiler/rustc_target/src/spec/targets/x86_64_apple_ios.rs index 5b34390141e0e..e40c7cf8ac1f8 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_apple_ios.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_apple_ios.rs @@ -10,6 +10,7 @@ pub fn target() -> Target { Target { llvm_target: ios_sim_llvm_target(arch).into(), + description: None, pointer_width: 64, data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_apple_ios_macabi.rs b/compiler/rustc_target/src/spec/targets/x86_64_apple_ios_macabi.rs index e59f41185deea..af375c589792d 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_apple_ios_macabi.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_apple_ios_macabi.rs @@ -8,6 +8,7 @@ pub fn target() -> Target { Target { llvm_target: mac_catalyst_llvm_target(arch).into(), + description: None, pointer_width: 64, data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_apple_tvos.rs b/compiler/rustc_target/src/spec/targets/x86_64_apple_tvos.rs index 95033699f1af3..fe603d667b26c 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_apple_tvos.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_apple_tvos.rs @@ -7,6 +7,7 @@ pub fn target() -> Target { let arch = Arch::X86_64_sim; Target { llvm_target: tvos_sim_llvm_target(arch).into(), + description: None, pointer_width: 64, data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_apple_watchos_sim.rs b/compiler/rustc_target/src/spec/targets/x86_64_apple_watchos_sim.rs index 806a58e980be6..8032764f93de0 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_apple_watchos_sim.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_apple_watchos_sim.rs @@ -5,6 +5,7 @@ pub fn target() -> Target { let arch = Arch::X86_64_sim; Target { llvm_target: watchos_sim_llvm_target(arch).into(), + description: None, pointer_width: 64, data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_fortanix_unknown_sgx.rs b/compiler/rustc_target/src/spec/targets/x86_64_fortanix_unknown_sgx.rs index c38a1a08536b9..be40a7995bdca 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_fortanix_unknown_sgx.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_fortanix_unknown_sgx.rs @@ -74,6 +74,7 @@ pub fn target() -> Target { }; Target { llvm_target: "x86_64-elf".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_linux_android.rs b/compiler/rustc_target/src/spec/targets/x86_64_linux_android.rs index 30b1ee73630e8..eb30838693eef 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_linux_android.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_linux_android.rs @@ -15,6 +15,7 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-linux-android".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_pc_nto_qnx710.rs b/compiler/rustc_target/src/spec/targets/x86_64_pc_nto_qnx710.rs index 0ef015973998a..2253506df2062 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_pc_nto_qnx710.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_pc_nto_qnx710.rs @@ -3,6 +3,7 @@ use crate::spec::{base, Cc, LinkerFlavor, Lld, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "x86_64-pc-unknown".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_pc_solaris.rs b/compiler/rustc_target/src/spec/targets/x86_64_pc_solaris.rs index ade4dd6d43190..df2fe6c2ace62 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_pc_solaris.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_pc_solaris.rs @@ -12,6 +12,7 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-pc-solaris".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_pc_windows_gnu.rs b/compiler/rustc_target/src/spec/targets/x86_64_pc_windows_gnu.rs index d6b44e7cfd4cb..ca65d3acb0fe0 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_pc_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_pc_windows_gnu.rs @@ -16,6 +16,7 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-pc-windows-gnu".into(), + description: None, pointer_width: 64, data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_pc_windows_gnullvm.rs b/compiler/rustc_target/src/spec/targets/x86_64_pc_windows_gnullvm.rs index b84a9a5a8a120..57519ccf0c171 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_pc_windows_gnullvm.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_pc_windows_gnullvm.rs @@ -11,6 +11,7 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-pc-windows-gnu".into(), + description: None, pointer_width: 64, data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/targets/x86_64_pc_windows_msvc.rs index 51807bdba5d7a..c8d01a912cb8e 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_pc_windows_msvc.rs @@ -10,6 +10,7 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-pc-windows-msvc".into(), + description: None, pointer_width: 64, data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unikraft_linux_musl.rs b/compiler/rustc_target/src/spec/targets/x86_64_unikraft_linux_musl.rs index 6c9d114754873..bb4744f2c5784 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_unikraft_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unikraft_linux_musl.rs @@ -3,6 +3,7 @@ use crate::spec::{base, Cc, LinkerFlavor, Lld, StackProbeType, Target, TargetOpt pub fn target() -> Target { Target { llvm_target: "x86_64-unknown-linux-musl".into(), + description: None, pointer_width: 64, arch: "x86_64".into(), data_layout: diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_dragonfly.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_dragonfly.rs index ce682bb800560..d5b148a8e743f 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_unknown_dragonfly.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_dragonfly.rs @@ -10,6 +10,7 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-unknown-dragonfly".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_freebsd.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_freebsd.rs index 6d6940e7891cd..a99b908454bf4 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_freebsd.rs @@ -13,6 +13,7 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-unknown-freebsd".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_fuchsia.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_fuchsia.rs index 50139e5c1d833..8ced5051418cf 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_unknown_fuchsia.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_fuchsia.rs @@ -11,6 +11,7 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-unknown-fuchsia".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_haiku.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_haiku.rs index c00c689f7ef79..dc7c56d866e2d 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_unknown_haiku.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_haiku.rs @@ -12,6 +12,7 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-unknown-haiku".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_hermit.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_hermit.rs index fb46848ba8c0b..37ee1f7af1d57 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_unknown_hermit.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_hermit.rs @@ -3,6 +3,7 @@ use crate::spec::{base, StackProbeType, Target, TargetOptions}; pub fn target() -> Target { Target { llvm_target: "x86_64-unknown-hermit".into(), + description: None, pointer_width: 64, arch: "x86_64".into(), data_layout: diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_illumos.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_illumos.rs index 3e3f4921322c4..664312e0713c4 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_unknown_illumos.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_illumos.rs @@ -12,6 +12,7 @@ pub fn target() -> Target { // LLVM does not currently have a separate illumos target, // so we still pass Solaris to it llvm_target: "x86_64-pc-solaris".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_l4re_uclibc.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_l4re_uclibc.rs index 646623668c6cb..c4b0b18ab23c6 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_unknown_l4re_uclibc.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_l4re_uclibc.rs @@ -9,6 +9,7 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-unknown-l4re-uclibc".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnu.rs index 1510f3b390cd2..644c324050d10 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnu.rs @@ -19,6 +19,7 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-unknown-linux-gnu".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnux32.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnux32.rs index d4b6519262e98..4de9e9d315835 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnux32.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_gnux32.rs @@ -14,6 +14,7 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-unknown-linux-gnux32".into(), + description: None, pointer_width: 32, data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i64:64-i128:128-f80:128-n8:16:32:64-S128" diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_musl.rs index c71dc65670c28..4cb50e837f62c 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_musl.rs @@ -17,6 +17,7 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-unknown-linux-musl".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_ohos.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_ohos.rs index c25105f6e35cf..fed9cbcffd026 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_ohos.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_linux_ohos.rs @@ -17,6 +17,7 @@ pub fn target() -> Target { Target { // LLVM 15 doesn't support OpenHarmony yet, use a linux target instead. llvm_target: "x86_64-unknown-linux-musl".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_netbsd.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_netbsd.rs index 466498acb0b7b..175543b02a6bb 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_netbsd.rs @@ -18,6 +18,7 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-unknown-netbsd".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_none.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_none.rs index ceded7790a643..0bb5ea1594caf 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_unknown_none.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_none.rs @@ -29,6 +29,7 @@ pub fn target() -> Target { }; Target { llvm_target: "x86_64-unknown-none-elf".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_openbsd.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_openbsd.rs index b542a569bbd23..d0d16b8c8eeca 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_openbsd.rs @@ -11,6 +11,7 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-unknown-openbsd".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_redox.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_redox.rs index 550b7a3d28231..b1feb8c2b3799 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_unknown_redox.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_redox.rs @@ -10,6 +10,7 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-unknown-redox".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_unknown_uefi.rs b/compiler/rustc_target/src/spec/targets/x86_64_unknown_uefi.rs index 95847e57a0fb0..9bdadd73bc07c 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_unknown_uefi.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_unknown_uefi.rs @@ -31,6 +31,7 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-unknown-windows".into(), + description: None, pointer_width: 64, data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_uwp_windows_gnu.rs b/compiler/rustc_target/src/spec/targets/x86_64_uwp_windows_gnu.rs index b37d33601e66b..7d3884e521d7b 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_uwp_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_uwp_windows_gnu.rs @@ -15,6 +15,7 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-pc-windows-gnu".into(), + description: None, pointer_width: 64, data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/targets/x86_64_uwp_windows_msvc.rs index fe2b4c8e92dcd..a685530332a45 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_uwp_windows_msvc.rs @@ -9,6 +9,7 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-pc-windows-msvc".into(), + description: None, pointer_width: 64, data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_win7_windows_msvc.rs b/compiler/rustc_target/src/spec/targets/x86_64_win7_windows_msvc.rs index fd26b6e8caead..f0c1afcdce86f 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_win7_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_win7_windows_msvc.rs @@ -9,6 +9,7 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-win7-windows-msvc".into(), + description: None, pointer_width: 64, data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64_wrs_vxworks.rs b/compiler/rustc_target/src/spec/targets/x86_64_wrs_vxworks.rs index f7a78b48f95d6..e293d0eb3ce18 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64_wrs_vxworks.rs @@ -11,6 +11,7 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-unknown-linux-gnu".into(), + description: None, pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), diff --git a/compiler/rustc_target/src/spec/targets/x86_64h_apple_darwin.rs b/compiler/rustc_target/src/spec/targets/x86_64h_apple_darwin.rs index e0e4cb93e31e1..9aaaa894a93f5 100644 --- a/compiler/rustc_target/src/spec/targets/x86_64h_apple_darwin.rs +++ b/compiler/rustc_target/src/spec/targets/x86_64h_apple_darwin.rs @@ -34,6 +34,7 @@ pub fn target() -> Target { // MACOSX_DEPLOYMENT_TARGET. To enable cross-language LTO to work // correctly, we do too. llvm_target: macos_llvm_target(arch).into(), + description: None, pointer_width: 64, data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-i128:128-f80:128-n8:16:32:64-S128".into(), From 82556189ae83ce0a137ed6aa0be56a6b8473203f Mon Sep 17 00:00:00 2001 From: Wesley Wiser Date: Tue, 5 Mar 2024 09:59:32 -0600 Subject: [PATCH 14/15] Update src/doc/rustc/src/platform-support.md --- src/doc/rustc/src/platform-support.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/doc/rustc/src/platform-support.md b/src/doc/rustc/src/platform-support.md index d15bea04d3066..5e41bc31acec5 100644 --- a/src/doc/rustc/src/platform-support.md +++ b/src/doc/rustc/src/platform-support.md @@ -167,7 +167,7 @@ target | std | notes `i686-unknown-freebsd` | ✓ | 32-bit FreeBSD [^x86_32-floats-return-ABI] `i686-unknown-linux-musl` | ✓ | 32-bit Linux with MUSL [^x86_32-floats-return-ABI] [`i686-unknown-uefi`](platform-support/unknown-uefi.md) | * | 32-bit UEFI -[`loongarch64-unknown-linux-musl`](platform-support/loongarch-linux.md) | ? | | LoongArch64 Linux (LP64D ABI) +[`loongarch64-unknown-linux-musl`](platform-support/loongarch-linux.md) | ? | | LoongArch64 Linux (LP64D ABI) with musl 1.2.3 [`loongarch64-unknown-none`](platform-support/loongarch-none.md) | * | | LoongArch64 Bare-metal (LP64D ABI) [`loongarch64-unknown-none-softfloat`](platform-support/loongarch-none.md) | * | | LoongArch64 Bare-metal (LP64S ABI) [`nvptx64-nvidia-cuda`](platform-support/nvptx64-nvidia-cuda.md) | * | --emit=asm generates PTX code that [runs on NVIDIA GPUs] From 5a16aebe9d83b5e7938ebd4ca7a17a0f44d7010c Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Tue, 5 Mar 2024 09:15:20 +0000 Subject: [PATCH 15/15] Remove some dead code drop_in_place has been a lang item, not an intrinsic, for forever --- compiler/rustc_codegen_ssa/src/mir/block.rs | 2 +- compiler/rustc_hir_analysis/src/check/intrinsic.rs | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/compiler/rustc_codegen_ssa/src/mir/block.rs b/compiler/rustc_codegen_ssa/src/mir/block.rs index 95a587b8181f6..b0efb646ef332 100644 --- a/compiler/rustc_codegen_ssa/src/mir/block.rs +++ b/compiler/rustc_codegen_ssa/src/mir/block.rs @@ -852,7 +852,7 @@ impl<'a, 'tcx, Bx: BuilderMethods<'a, 'tcx>> FunctionCx<'a, 'tcx, Bx> { } let instance = match intrinsic { - None | Some(ty::IntrinsicDef { name: sym::drop_in_place, .. }) => instance, + None => instance, Some(intrinsic) => { let mut llargs = Vec::with_capacity(1); let ret_dest = self.make_return_dest( diff --git a/compiler/rustc_hir_analysis/src/check/intrinsic.rs b/compiler/rustc_hir_analysis/src/check/intrinsic.rs index 64137f298d649..39145c2aeb7fa 100644 --- a/compiler/rustc_hir_analysis/src/check/intrinsic.rs +++ b/compiler/rustc_hir_analysis/src/check/intrinsic.rs @@ -247,7 +247,6 @@ pub fn check_intrinsic_type( ], Ty::new_unit(tcx), ), - sym::drop_in_place => (1, 0, vec![Ty::new_mut_ptr(tcx, param(0))], Ty::new_unit(tcx)), sym::needs_drop => (1, 0, vec![], tcx.types.bool), sym::type_name => (1, 0, vec![], Ty::new_static_str(tcx)),