From ffe65f825b81485c4babf45c85401d5b29eb5e92 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Thu, 8 Oct 2020 19:36:11 +0300 Subject: [PATCH 1/7] rustc_target: Move `target_c_int_width` from `Target` to `TargetOptions` --- .../src/spec/aarch64_apple_darwin.rs | 1 - .../src/spec/aarch64_apple_ios.rs | 1 - .../src/spec/aarch64_apple_tvos.rs | 1 - .../rustc_target/src/spec/aarch64_fuchsia.rs | 1 - .../src/spec/aarch64_linux_android.rs | 1 - .../src/spec/aarch64_pc_windows_msvc.rs | 1 - .../src/spec/aarch64_unknown_cloudabi.rs | 1 - .../src/spec/aarch64_unknown_freebsd.rs | 1 - .../src/spec/aarch64_unknown_hermit.rs | 1 - .../src/spec/aarch64_unknown_linux_gnu.rs | 1 - .../src/spec/aarch64_unknown_linux_musl.rs | 1 - .../src/spec/aarch64_unknown_netbsd.rs | 1 - .../src/spec/aarch64_unknown_none.rs | 1 - .../spec/aarch64_unknown_none_softfloat.rs | 1 - .../src/spec/aarch64_unknown_openbsd.rs | 1 - .../src/spec/aarch64_unknown_redox.rs | 1 - .../src/spec/aarch64_uwp_windows_msvc.rs | 1 - .../src/spec/aarch64_wrs_vxworks.rs | 1 - .../src/spec/arm_linux_androideabi.rs | 1 - .../src/spec/arm_unknown_linux_gnueabi.rs | 1 - .../src/spec/arm_unknown_linux_gnueabihf.rs | 1 - .../src/spec/arm_unknown_linux_musleabi.rs | 1 - .../src/spec/arm_unknown_linux_musleabihf.rs | 1 - .../src/spec/armebv7r_none_eabi.rs | 1 - .../src/spec/armebv7r_none_eabihf.rs | 1 - .../src/spec/armv4t_unknown_linux_gnueabi.rs | 1 - .../src/spec/armv5te_unknown_linux_gnueabi.rs | 1 - .../spec/armv5te_unknown_linux_musleabi.rs | 1 - .../src/spec/armv6_unknown_freebsd.rs | 1 - .../src/spec/armv6_unknown_netbsd_eabihf.rs | 1 - .../rustc_target/src/spec/armv7_apple_ios.rs | 1 - .../src/spec/armv7_linux_androideabi.rs | 1 - .../src/spec/armv7_unknown_cloudabi_eabihf.rs | 1 - .../src/spec/armv7_unknown_freebsd.rs | 1 - .../src/spec/armv7_unknown_linux_gnueabi.rs | 1 - .../src/spec/armv7_unknown_linux_gnueabihf.rs | 1 - .../src/spec/armv7_unknown_linux_musleabi.rs | 1 - .../spec/armv7_unknown_linux_musleabihf.rs | 1 - .../src/spec/armv7_unknown_netbsd_eabihf.rs | 1 - .../src/spec/armv7_wrs_vxworks_eabihf.rs | 1 - .../rustc_target/src/spec/armv7a_none_eabi.rs | 1 - .../src/spec/armv7a_none_eabihf.rs | 1 - .../rustc_target/src/spec/armv7r_none_eabi.rs | 1 - .../src/spec/armv7r_none_eabihf.rs | 1 - .../rustc_target/src/spec/armv7s_apple_ios.rs | 1 - .../rustc_target/src/spec/avr_gnu_base.rs | 2 +- .../src/spec/hexagon_unknown_linux_musl.rs | 1 - .../rustc_target/src/spec/i386_apple_ios.rs | 1 - .../src/spec/i686_apple_darwin.rs | 1 - .../src/spec/i686_linux_android.rs | 1 - .../src/spec/i686_pc_windows_gnu.rs | 1 - .../src/spec/i686_pc_windows_msvc.rs | 1 - .../src/spec/i686_unknown_cloudabi.rs | 1 - .../src/spec/i686_unknown_freebsd.rs | 1 - .../src/spec/i686_unknown_haiku.rs | 1 - .../src/spec/i686_unknown_linux_gnu.rs | 1 - .../src/spec/i686_unknown_linux_musl.rs | 1 - .../src/spec/i686_unknown_netbsd.rs | 1 - .../src/spec/i686_unknown_openbsd.rs | 1 - .../src/spec/i686_unknown_uefi.rs | 1 - .../src/spec/i686_uwp_windows_gnu.rs | 1 - .../src/spec/i686_uwp_windows_msvc.rs | 1 - .../rustc_target/src/spec/i686_wrs_vxworks.rs | 1 - .../src/spec/mips64_unknown_linux_gnuabi64.rs | 1 - .../spec/mips64_unknown_linux_muslabi64.rs | 1 - .../spec/mips64el_unknown_linux_gnuabi64.rs | 1 - .../spec/mips64el_unknown_linux_muslabi64.rs | 1 - .../src/spec/mips_unknown_linux_gnu.rs | 1 - .../src/spec/mips_unknown_linux_musl.rs | 1 - .../src/spec/mips_unknown_linux_uclibc.rs | 1 - .../rustc_target/src/spec/mipsel_sony_psp.rs | 1 - .../src/spec/mipsel_unknown_linux_gnu.rs | 1 - .../src/spec/mipsel_unknown_linux_musl.rs | 1 - .../src/spec/mipsel_unknown_linux_uclibc.rs | 1 - .../src/spec/mipsisa32r6_unknown_linux_gnu.rs | 1 - .../spec/mipsisa32r6el_unknown_linux_gnu.rs | 1 - .../mipsisa64r6_unknown_linux_gnuabi64.rs | 1 - .../mipsisa64r6el_unknown_linux_gnuabi64.rs | 1 - compiler/rustc_target/src/spec/mod.rs | 22 +++++++++++++++---- .../rustc_target/src/spec/msp430_none_elf.rs | 2 +- .../src/spec/nvptx64_nvidia_cuda.rs | 1 - .../src/spec/powerpc64_unknown_freebsd.rs | 1 - .../src/spec/powerpc64_unknown_linux_gnu.rs | 1 - .../src/spec/powerpc64_unknown_linux_musl.rs | 1 - .../src/spec/powerpc64_wrs_vxworks.rs | 1 - .../src/spec/powerpc64le_unknown_linux_gnu.rs | 1 - .../spec/powerpc64le_unknown_linux_musl.rs | 1 - .../src/spec/powerpc_unknown_linux_gnu.rs | 1 - .../src/spec/powerpc_unknown_linux_gnuspe.rs | 1 - .../src/spec/powerpc_unknown_linux_musl.rs | 1 - .../src/spec/powerpc_unknown_netbsd.rs | 1 - .../src/spec/powerpc_wrs_vxworks.rs | 1 - .../src/spec/powerpc_wrs_vxworks_spe.rs | 1 - .../src/spec/riscv32gc_unknown_linux_gnu.rs | 1 - .../src/spec/riscv32i_unknown_none_elf.rs | 1 - .../src/spec/riscv32imac_unknown_none_elf.rs | 1 - .../src/spec/riscv32imc_unknown_none_elf.rs | 1 - .../src/spec/riscv64gc_unknown_linux_gnu.rs | 1 - .../src/spec/riscv64gc_unknown_none_elf.rs | 1 - .../src/spec/riscv64imac_unknown_none_elf.rs | 1 - .../src/spec/s390x_unknown_linux_gnu.rs | 1 - .../src/spec/sparc64_unknown_linux_gnu.rs | 1 - .../src/spec/sparc64_unknown_netbsd.rs | 1 - .../src/spec/sparc64_unknown_openbsd.rs | 1 - .../src/spec/sparc_unknown_linux_gnu.rs | 1 - .../src/spec/sparcv9_sun_solaris.rs | 1 - .../src/spec/thumbv4t_none_eabi.rs | 1 - .../src/spec/thumbv6m_none_eabi.rs | 1 - .../src/spec/thumbv7a_pc_windows_msvc.rs | 1 - .../src/spec/thumbv7a_uwp_windows_msvc.rs | 1 - .../src/spec/thumbv7em_none_eabi.rs | 1 - .../src/spec/thumbv7em_none_eabihf.rs | 1 - .../src/spec/thumbv7m_none_eabi.rs | 1 - .../src/spec/thumbv7neon_linux_androideabi.rs | 1 - .../thumbv7neon_unknown_linux_gnueabihf.rs | 1 - .../thumbv7neon_unknown_linux_musleabihf.rs | 1 - .../src/spec/thumbv8m_base_none_eabi.rs | 1 - .../src/spec/thumbv8m_main_none_eabi.rs | 1 - .../src/spec/thumbv8m_main_none_eabihf.rs | 1 - .../src/spec/wasm32_unknown_emscripten.rs | 1 - .../src/spec/wasm32_unknown_unknown.rs | 1 - compiler/rustc_target/src/spec/wasm32_wasi.rs | 1 - .../src/spec/x86_64_apple_darwin.rs | 1 - .../rustc_target/src/spec/x86_64_apple_ios.rs | 1 - .../src/spec/x86_64_apple_ios_macabi.rs | 1 - .../src/spec/x86_64_apple_tvos.rs | 1 - .../src/spec/x86_64_fortanix_unknown_sgx.rs | 1 - .../rustc_target/src/spec/x86_64_fuchsia.rs | 1 - .../src/spec/x86_64_linux_android.rs | 1 - .../src/spec/x86_64_linux_kernel.rs | 1 - .../src/spec/x86_64_pc_windows_gnu.rs | 1 - .../src/spec/x86_64_pc_windows_msvc.rs | 1 - .../src/spec/x86_64_rumprun_netbsd.rs | 1 - .../src/spec/x86_64_sun_solaris.rs | 1 - .../src/spec/x86_64_unknown_cloudabi.rs | 1 - .../src/spec/x86_64_unknown_dragonfly.rs | 1 - .../src/spec/x86_64_unknown_freebsd.rs | 1 - .../src/spec/x86_64_unknown_haiku.rs | 1 - .../src/spec/x86_64_unknown_hermit.rs | 1 - .../src/spec/x86_64_unknown_hermit_kernel.rs | 1 - .../src/spec/x86_64_unknown_illumos.rs | 1 - .../src/spec/x86_64_unknown_l4re_uclibc.rs | 1 - .../src/spec/x86_64_unknown_linux_gnu.rs | 1 - .../src/spec/x86_64_unknown_linux_gnux32.rs | 1 - .../src/spec/x86_64_unknown_linux_musl.rs | 1 - .../src/spec/x86_64_unknown_netbsd.rs | 1 - .../src/spec/x86_64_unknown_openbsd.rs | 1 - .../src/spec/x86_64_unknown_redox.rs | 1 - .../src/spec/x86_64_unknown_uefi.rs | 1 - .../src/spec/x86_64_uwp_windows_gnu.rs | 1 - .../src/spec/x86_64_uwp_windows_msvc.rs | 1 - .../src/spec/x86_64_wrs_vxworks.rs | 1 - 152 files changed, 20 insertions(+), 155 deletions(-) diff --git a/compiler/rustc_target/src/spec/aarch64_apple_darwin.rs b/compiler/rustc_target/src/spec/aarch64_apple_darwin.rs index c15bd9a08fc6..13352fa772c0 100644 --- a/compiler/rustc_target/src/spec/aarch64_apple_darwin.rs +++ b/compiler/rustc_target/src/spec/aarch64_apple_darwin.rs @@ -18,7 +18,6 @@ pub fn target() -> Target { llvm_target, target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".to_string(), arch: arch.to_string(), target_os: "macos".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_apple_ios.rs b/compiler/rustc_target/src/spec/aarch64_apple_ios.rs index 0019fc4492df..84a133315e77 100644 --- a/compiler/rustc_target/src/spec/aarch64_apple_ios.rs +++ b/compiler/rustc_target/src/spec/aarch64_apple_ios.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { llvm_target: "arm64-apple-ios".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), target_os: "ios".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_apple_tvos.rs b/compiler/rustc_target/src/spec/aarch64_apple_tvos.rs index 276682c591d5..2a0db66c3e9f 100644 --- a/compiler/rustc_target/src/spec/aarch64_apple_tvos.rs +++ b/compiler/rustc_target/src/spec/aarch64_apple_tvos.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { llvm_target: "arm64-apple-tvos".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), target_os: "tvos".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_fuchsia.rs b/compiler/rustc_target/src/spec/aarch64_fuchsia.rs index 1f81a03c4a52..6850eb6f2df6 100644 --- a/compiler/rustc_target/src/spec/aarch64_fuchsia.rs +++ b/compiler/rustc_target/src/spec/aarch64_fuchsia.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { llvm_target: "aarch64-fuchsia".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), target_os: "fuchsia".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_linux_android.rs b/compiler/rustc_target/src/spec/aarch64_linux_android.rs index 1ed4f0da79c5..425d1ef1cb93 100644 --- a/compiler/rustc_target/src/spec/aarch64_linux_android.rs +++ b/compiler/rustc_target/src/spec/aarch64_linux_android.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { llvm_target: "aarch64-linux-android".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), target_os: "android".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/aarch64_pc_windows_msvc.rs index 32fa2d695406..ad63284a2a10 100644 --- a/compiler/rustc_target/src/spec/aarch64_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/aarch64_pc_windows_msvc.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { llvm_target: "aarch64-pc-windows-msvc".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), target_os: "windows".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_cloudabi.rs b/compiler/rustc_target/src/spec/aarch64_unknown_cloudabi.rs index f9d62519bd97..bd800a2d730c 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_cloudabi.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_cloudabi.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { llvm_target: "aarch64-unknown-cloudabi".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), target_os: "cloudabi".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_freebsd.rs b/compiler/rustc_target/src/spec/aarch64_unknown_freebsd.rs index 3d0082902408..e36b6e3fc6e3 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_freebsd.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { llvm_target: "aarch64-unknown-freebsd".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), target_os: "freebsd".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs b/compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs index a7050cbee9e3..8098267e6eff 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { llvm_target: "aarch64-unknown-hermit".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), target_os: "hermit".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs index 10255012e411..48284654906f 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { llvm_target: "aarch64-unknown-linux-gnu".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), target_env: "gnu".to_string(), data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/aarch64_unknown_linux_musl.rs index f530163faf7e..23555b46ca70 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_linux_musl.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { llvm_target: "aarch64-unknown-linux-musl".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), target_env: "musl".to_string(), data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_netbsd.rs b/compiler/rustc_target/src/spec/aarch64_unknown_netbsd.rs index dcb157d7aab8..6e3eed928664 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_netbsd.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { llvm_target: "aarch64-unknown-netbsd".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), target_os: "netbsd".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_none.rs b/compiler/rustc_target/src/spec/aarch64_unknown_none.rs index 6d3e72906d57..c8c4224ac8c1 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_none.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_none.rs @@ -25,7 +25,6 @@ pub fn target() -> Target { llvm_target: "aarch64-unknown-none".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), target_os: "none".to_string(), target_env: String::new(), target_vendor: String::new(), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_none_softfloat.rs b/compiler/rustc_target/src/spec/aarch64_unknown_none_softfloat.rs index 784cd7eb3c9d..22dd397145be 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_none_softfloat.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_none_softfloat.rs @@ -25,7 +25,6 @@ pub fn target() -> Target { llvm_target: "aarch64-unknown-none".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), target_os: "none".to_string(), target_env: String::new(), target_vendor: String::new(), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_openbsd.rs b/compiler/rustc_target/src/spec/aarch64_unknown_openbsd.rs index e03690e86b8c..56e3d893d203 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_openbsd.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { llvm_target: "aarch64-unknown-openbsd".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), target_os: "openbsd".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_redox.rs b/compiler/rustc_target/src/spec/aarch64_unknown_redox.rs index 13adec9d4c4d..9d169043cc32 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_redox.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_redox.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { llvm_target: "aarch64-unknown-redox".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), target_os: "redox".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/aarch64_uwp_windows_msvc.rs index d6af5dd3628b..a60186cebd85 100644 --- a/compiler/rustc_target/src/spec/aarch64_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/aarch64_uwp_windows_msvc.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { llvm_target: "aarch64-pc-windows-msvc".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), target_os: "windows".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_wrs_vxworks.rs b/compiler/rustc_target/src/spec/aarch64_wrs_vxworks.rs index 6fce200a96e7..96597bc0bca0 100644 --- a/compiler/rustc_target/src/spec/aarch64_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/aarch64_wrs_vxworks.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { llvm_target: "aarch64-unknown-linux-gnu".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), target_os: "vxworks".to_string(), diff --git a/compiler/rustc_target/src/spec/arm_linux_androideabi.rs b/compiler/rustc_target/src/spec/arm_linux_androideabi.rs index f9c69217460b..87233ebf5739 100644 --- a/compiler/rustc_target/src/spec/arm_linux_androideabi.rs +++ b/compiler/rustc_target/src/spec/arm_linux_androideabi.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { llvm_target: "arm-linux-androideabi".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "android".to_string(), diff --git a/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabi.rs index 96a444fc465f..7914204c79fd 100644 --- a/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabi.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { llvm_target: "arm-unknown-linux-gnueabi".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabihf.rs b/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabihf.rs index 534b98cc6070..47f9a4fbdab6 100644 --- a/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabihf.rs +++ b/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabihf.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { llvm_target: "arm-unknown-linux-gnueabihf".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/arm_unknown_linux_musleabi.rs b/compiler/rustc_target/src/spec/arm_unknown_linux_musleabi.rs index e5fa3e3a1cb5..31e137d4b424 100644 --- a/compiler/rustc_target/src/spec/arm_unknown_linux_musleabi.rs +++ b/compiler/rustc_target/src/spec/arm_unknown_linux_musleabi.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { llvm_target: "arm-unknown-linux-gnueabi".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/arm_unknown_linux_musleabihf.rs b/compiler/rustc_target/src/spec/arm_unknown_linux_musleabihf.rs index b631a0010a0e..35de9e3fbd0a 100644 --- a/compiler/rustc_target/src/spec/arm_unknown_linux_musleabihf.rs +++ b/compiler/rustc_target/src/spec/arm_unknown_linux_musleabihf.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { llvm_target: "arm-unknown-linux-gnueabihf".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/armebv7r_none_eabi.rs b/compiler/rustc_target/src/spec/armebv7r_none_eabi.rs index 86d0cd57af39..8b59a7c4ad71 100644 --- a/compiler/rustc_target/src/spec/armebv7r_none_eabi.rs +++ b/compiler/rustc_target/src/spec/armebv7r_none_eabi.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { llvm_target: "armebv7r-unknown-none-eabi".to_string(), target_endian: "big".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "none".to_string(), diff --git a/compiler/rustc_target/src/spec/armebv7r_none_eabihf.rs b/compiler/rustc_target/src/spec/armebv7r_none_eabihf.rs index 9ea44b3b25e3..2da6422ba8f4 100644 --- a/compiler/rustc_target/src/spec/armebv7r_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/armebv7r_none_eabihf.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { llvm_target: "armebv7r-unknown-none-eabihf".to_string(), target_endian: "big".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "none".to_string(), diff --git a/compiler/rustc_target/src/spec/armv4t_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/armv4t_unknown_linux_gnueabi.rs index be32731a869b..59e22cc34138 100644 --- a/compiler/rustc_target/src/spec/armv4t_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/armv4t_unknown_linux_gnueabi.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { llvm_target: "armv4t-unknown-linux-gnueabi".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/armv5te_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/armv5te_unknown_linux_gnueabi.rs index 4ea4b650623d..8a6c1a2b3fb6 100644 --- a/compiler/rustc_target/src/spec/armv5te_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/armv5te_unknown_linux_gnueabi.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { llvm_target: "armv5te-unknown-linux-gnueabi".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/armv5te_unknown_linux_musleabi.rs b/compiler/rustc_target/src/spec/armv5te_unknown_linux_musleabi.rs index a41a5409ac92..7c637acdc135 100644 --- a/compiler/rustc_target/src/spec/armv5te_unknown_linux_musleabi.rs +++ b/compiler/rustc_target/src/spec/armv5te_unknown_linux_musleabi.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { llvm_target: "armv5te-unknown-linux-gnueabi".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/armv6_unknown_freebsd.rs b/compiler/rustc_target/src/spec/armv6_unknown_freebsd.rs index 68f6502133a3..f81108753b88 100644 --- a/compiler/rustc_target/src/spec/armv6_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/armv6_unknown_freebsd.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { llvm_target: "armv6-unknown-freebsd-gnueabihf".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "freebsd".to_string(), diff --git a/compiler/rustc_target/src/spec/armv6_unknown_netbsd_eabihf.rs b/compiler/rustc_target/src/spec/armv6_unknown_netbsd_eabihf.rs index 23a20ca1c9fd..9aafd3a2837d 100644 --- a/compiler/rustc_target/src/spec/armv6_unknown_netbsd_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv6_unknown_netbsd_eabihf.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { llvm_target: "armv6-unknown-netbsdelf-eabihf".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "netbsd".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7_apple_ios.rs b/compiler/rustc_target/src/spec/armv7_apple_ios.rs index 24a47dd56a9a..03465ac439e3 100644 --- a/compiler/rustc_target/src/spec/armv7_apple_ios.rs +++ b/compiler/rustc_target/src/spec/armv7_apple_ios.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { llvm_target: "armv7-apple-ios".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:o-p:32:32-Fi8-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32".to_string(), arch: "arm".to_string(), target_os: "ios".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7_linux_androideabi.rs b/compiler/rustc_target/src/spec/armv7_linux_androideabi.rs index 342959883cb7..e210e36d1e1d 100644 --- a/compiler/rustc_target/src/spec/armv7_linux_androideabi.rs +++ b/compiler/rustc_target/src/spec/armv7_linux_androideabi.rs @@ -18,7 +18,6 @@ pub fn target() -> Target { llvm_target: "armv7-none-linux-android".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "android".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7_unknown_cloudabi_eabihf.rs b/compiler/rustc_target/src/spec/armv7_unknown_cloudabi_eabihf.rs index d4bb4e963fbd..726040086159 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_cloudabi_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_cloudabi_eabihf.rs @@ -12,7 +12,6 @@ pub fn target() -> Target { llvm_target: "armv7-unknown-cloudabi-eabihf".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "cloudabi".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7_unknown_freebsd.rs b/compiler/rustc_target/src/spec/armv7_unknown_freebsd.rs index c32e2d4376eb..7ce45670f6b7 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_freebsd.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { llvm_target: "armv7-unknown-freebsd-gnueabihf".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "freebsd".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabi.rs index 66d3b3e5d07b..630c9b3ba6a0 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabi.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { llvm_target: "armv7-unknown-linux-gnueabi".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabihf.rs b/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabihf.rs index c1ef540a01d5..f3d21d2f009a 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabihf.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabihf.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { llvm_target: "armv7-unknown-linux-gnueabihf".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabi.rs b/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabi.rs index d4d26b145562..3d2d62284be5 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabi.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabi.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { llvm_target: "armv7-unknown-linux-gnueabi".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabihf.rs b/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabihf.rs index 88db04a74e2b..1ebb73476f43 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabihf.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabihf.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { llvm_target: "armv7-unknown-linux-gnueabihf".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7_unknown_netbsd_eabihf.rs b/compiler/rustc_target/src/spec/armv7_unknown_netbsd_eabihf.rs index fe2471ab0d0a..f2ec067a6715 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_netbsd_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_netbsd_eabihf.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { llvm_target: "armv7-unknown-netbsdelf-eabihf".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "netbsd".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7_wrs_vxworks_eabihf.rs b/compiler/rustc_target/src/spec/armv7_wrs_vxworks_eabihf.rs index 9b8cefdfa9e8..29f15687638f 100644 --- a/compiler/rustc_target/src/spec/armv7_wrs_vxworks_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv7_wrs_vxworks_eabihf.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { llvm_target: "armv7-unknown-linux-gnueabihf".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "vxworks".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7a_none_eabi.rs b/compiler/rustc_target/src/spec/armv7a_none_eabi.rs index 4199ac4569a7..0391dd7e86fb 100644 --- a/compiler/rustc_target/src/spec/armv7a_none_eabi.rs +++ b/compiler/rustc_target/src/spec/armv7a_none_eabi.rs @@ -36,7 +36,6 @@ pub fn target() -> Target { llvm_target: "armv7a-none-eabi".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), target_os: "none".to_string(), target_env: String::new(), target_vendor: String::new(), diff --git a/compiler/rustc_target/src/spec/armv7a_none_eabihf.rs b/compiler/rustc_target/src/spec/armv7a_none_eabihf.rs index 99a065900973..dcaae8e41bd6 100644 --- a/compiler/rustc_target/src/spec/armv7a_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv7a_none_eabihf.rs @@ -24,7 +24,6 @@ pub fn target() -> Target { llvm_target: "armv7a-none-eabihf".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), target_os: "none".to_string(), target_env: String::new(), target_vendor: String::new(), diff --git a/compiler/rustc_target/src/spec/armv7r_none_eabi.rs b/compiler/rustc_target/src/spec/armv7r_none_eabi.rs index f0e79072bc18..9ed81d400a09 100644 --- a/compiler/rustc_target/src/spec/armv7r_none_eabi.rs +++ b/compiler/rustc_target/src/spec/armv7r_none_eabi.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { llvm_target: "armv7r-unknown-none-eabi".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "none".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7r_none_eabihf.rs b/compiler/rustc_target/src/spec/armv7r_none_eabihf.rs index 4c464d2b256a..572bc033c007 100644 --- a/compiler/rustc_target/src/spec/armv7r_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv7r_none_eabihf.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { llvm_target: "armv7r-unknown-none-eabihf".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "none".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7s_apple_ios.rs b/compiler/rustc_target/src/spec/armv7s_apple_ios.rs index 4c2d70ae34be..62bc45e91203 100644 --- a/compiler/rustc_target/src/spec/armv7s_apple_ios.rs +++ b/compiler/rustc_target/src/spec/armv7s_apple_ios.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { llvm_target: "armv7s-apple-ios".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:o-p:32:32-Fi8-f64:32:64-v64:32:64-v128:32:128-a:0:32-n32-S32".to_string(), arch: "arm".to_string(), target_os: "ios".to_string(), diff --git a/compiler/rustc_target/src/spec/avr_gnu_base.rs b/compiler/rustc_target/src/spec/avr_gnu_base.rs index 01445dc3898a..fd597ca89b12 100644 --- a/compiler/rustc_target/src/spec/avr_gnu_base.rs +++ b/compiler/rustc_target/src/spec/avr_gnu_base.rs @@ -14,8 +14,8 @@ pub fn target(target_cpu: String) -> Target { target_os: "unknown".to_string(), target_env: "".to_string(), target_vendor: "unknown".to_string(), - target_c_int_width: 16.to_string(), options: TargetOptions { + target_c_int_width: "16".to_string(), cpu: target_cpu.clone(), exe_suffix: ".elf".to_string(), diff --git a/compiler/rustc_target/src/spec/hexagon_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/hexagon_unknown_linux_musl.rs index 143b93dfeef5..13a67ef550eb 100644 --- a/compiler/rustc_target/src/spec/hexagon_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/hexagon_unknown_linux_musl.rs @@ -21,7 +21,6 @@ pub fn target() -> Target { llvm_target: "hexagon-unknown-linux-musl".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: concat!( "e-m:e-p:32:32:32-a:0-n16:32-i64:64:64-i32:32", ":32-i16:16:16-i1:8:8-f32:32:32-f64:64:64-v32", diff --git a/compiler/rustc_target/src/spec/i386_apple_ios.rs b/compiler/rustc_target/src/spec/i386_apple_ios.rs index 214214979655..911ee27495e1 100644 --- a/compiler/rustc_target/src/spec/i386_apple_ios.rs +++ b/compiler/rustc_target/src/spec/i386_apple_ios.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { llvm_target: "i386-apple-ios".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:o-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ f64:32:64-f80:128-n8:16:32-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/i686_apple_darwin.rs b/compiler/rustc_target/src/spec/i686_apple_darwin.rs index 9c7e7241b57d..c7db4f8bf7ea 100644 --- a/compiler/rustc_target/src/spec/i686_apple_darwin.rs +++ b/compiler/rustc_target/src/spec/i686_apple_darwin.rs @@ -19,7 +19,6 @@ pub fn target() -> Target { llvm_target, target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:o-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ f64:32:64-f80:128-n8:16:32-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/i686_linux_android.rs b/compiler/rustc_target/src/spec/i686_linux_android.rs index d116ae62e0fc..44f743820334 100644 --- a/compiler/rustc_target/src/spec/i686_linux_android.rs +++ b/compiler/rustc_target/src/spec/i686_linux_android.rs @@ -17,7 +17,6 @@ pub fn target() -> Target { llvm_target: "i686-linux-android".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ f64:32:64-f80:32-n8:16:32-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs b/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs index 84585bd515a2..b4b6f3af1f7e 100644 --- a/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs @@ -20,7 +20,6 @@ pub fn target() -> Target { llvm_target: "i686-pc-windows-gnu".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i64:64-f80:32-n8:16:32-a:0:32-S32" .to_string(), diff --git a/compiler/rustc_target/src/spec/i686_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/i686_pc_windows_msvc.rs index db20b6094b70..9ff53d8f890b 100644 --- a/compiler/rustc_target/src/spec/i686_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/i686_pc_windows_msvc.rs @@ -24,7 +24,6 @@ pub fn target() -> Target { llvm_target: "i686-pc-windows-msvc".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i64:64-f80:32-n8:16:32-a:0:32-S32" .to_string(), diff --git a/compiler/rustc_target/src/spec/i686_unknown_cloudabi.rs b/compiler/rustc_target/src/spec/i686_unknown_cloudabi.rs index d9365d59e0e4..2b66a178d0cd 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_cloudabi.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_cloudabi.rs @@ -12,7 +12,6 @@ pub fn target() -> Target { llvm_target: "i686-unknown-cloudabi".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ f64:32:64-f80:32-n8:16:32-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/i686_unknown_freebsd.rs b/compiler/rustc_target/src/spec/i686_unknown_freebsd.rs index ba379a40f504..1e3f767acc96 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_freebsd.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { llvm_target: "i686-unknown-freebsd".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ f64:32:64-f80:32-n8:16:32-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/i686_unknown_haiku.rs b/compiler/rustc_target/src/spec/i686_unknown_haiku.rs index 02754b39fa7a..21afe751f80c 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_haiku.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_haiku.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { llvm_target: "i686-unknown-haiku".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ f64:32:64-f80:32-n8:16:32-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs index b7ceaefef939..7f068b6e888e 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { llvm_target: "i686-unknown-linux-gnu".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ f64:32:64-f80:32-n8:16:32-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/i686_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/i686_unknown_linux_musl.rs index 9240b56aeaf5..04f308edcfee 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_linux_musl.rs @@ -26,7 +26,6 @@ pub fn target() -> Target { llvm_target: "i686-unknown-linux-musl".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ f64:32:64-f80:32-n8:16:32-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/i686_unknown_netbsd.rs b/compiler/rustc_target/src/spec/i686_unknown_netbsd.rs index a4421924a7bb..e73d9c0bd88a 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_netbsd.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { llvm_target: "i686-unknown-netbsdelf".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ f64:32:64-f80:32-n8:16:32-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/i686_unknown_openbsd.rs b/compiler/rustc_target/src/spec/i686_unknown_openbsd.rs index fe5030f661bb..a673f0e29116 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_openbsd.rs @@ -12,7 +12,6 @@ pub fn target() -> Target { llvm_target: "i686-unknown-openbsd".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ f64:32:64-f80:32-n8:16:32-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/i686_unknown_uefi.rs b/compiler/rustc_target/src/spec/i686_unknown_uefi.rs index 676a8ca0acc4..7ede79549014 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_uefi.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_uefi.rs @@ -80,7 +80,6 @@ pub fn target() -> Target { llvm_target: "i686-unknown-windows-gnu".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i64:64-f80:32-n8:16:32-a:0:32-S32" .to_string(), diff --git a/compiler/rustc_target/src/spec/i686_uwp_windows_gnu.rs b/compiler/rustc_target/src/spec/i686_uwp_windows_gnu.rs index ec5a9cc68cea..687ead315268 100644 --- a/compiler/rustc_target/src/spec/i686_uwp_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/i686_uwp_windows_gnu.rs @@ -19,7 +19,6 @@ pub fn target() -> Target { llvm_target: "i686-pc-windows-gnu".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i64:64-f80:32-n8:16:32-a:0:32-S32" .to_string(), diff --git a/compiler/rustc_target/src/spec/i686_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/i686_uwp_windows_msvc.rs index d960a1303518..fade8655e92a 100644 --- a/compiler/rustc_target/src/spec/i686_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/i686_uwp_windows_msvc.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { llvm_target: "i686-pc-windows-msvc".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i64:64-f80:32-n8:16:32-a:0:32-S32" .to_string(), diff --git a/compiler/rustc_target/src/spec/i686_wrs_vxworks.rs b/compiler/rustc_target/src/spec/i686_wrs_vxworks.rs index 0e5c7b6143e9..5226bab1e6ba 100644 --- a/compiler/rustc_target/src/spec/i686_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/i686_wrs_vxworks.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { llvm_target: "i686-unknown-linux-gnu".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ f64:32:64-f80:32-n8:16:32-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs index 5cbd6bcd3d8b..64d86acd69a5 100644 --- a/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { llvm_target: "mips64-unknown-linux-gnuabi64".to_string(), target_endian: "big".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/mips64_unknown_linux_muslabi64.rs b/compiler/rustc_target/src/spec/mips64_unknown_linux_muslabi64.rs index 3ca92dd1d04b..31047ce220c1 100644 --- a/compiler/rustc_target/src/spec/mips64_unknown_linux_muslabi64.rs +++ b/compiler/rustc_target/src/spec/mips64_unknown_linux_muslabi64.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { llvm_target: "mips64-unknown-linux-musl".to_string(), target_endian: "big".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs index 4761be5b7ef8..11141cd8fdc6 100644 --- a/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { llvm_target: "mips64el-unknown-linux-gnuabi64".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/mips64el_unknown_linux_muslabi64.rs b/compiler/rustc_target/src/spec/mips64el_unknown_linux_muslabi64.rs index d87170b6868e..f08c2a5dc0e7 100644 --- a/compiler/rustc_target/src/spec/mips64el_unknown_linux_muslabi64.rs +++ b/compiler/rustc_target/src/spec/mips64el_unknown_linux_muslabi64.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { llvm_target: "mips64el-unknown-linux-musl".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/mips_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/mips_unknown_linux_gnu.rs index e51cf3c59f6e..5cfa34567ea7 100644 --- a/compiler/rustc_target/src/spec/mips_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/mips_unknown_linux_gnu.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { llvm_target: "mips-unknown-linux-gnu".to_string(), target_endian: "big".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/mips_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/mips_unknown_linux_musl.rs index 44d136ee7e90..91344ce47edb 100644 --- a/compiler/rustc_target/src/spec/mips_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/mips_unknown_linux_musl.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { llvm_target: "mips-unknown-linux-musl".to_string(), target_endian: "big".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/mips_unknown_linux_uclibc.rs b/compiler/rustc_target/src/spec/mips_unknown_linux_uclibc.rs index 7e168836dc7f..bb3b07bb941c 100644 --- a/compiler/rustc_target/src/spec/mips_unknown_linux_uclibc.rs +++ b/compiler/rustc_target/src/spec/mips_unknown_linux_uclibc.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { llvm_target: "mips-unknown-linux-uclibc".to_string(), target_endian: "big".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/mipsel_sony_psp.rs b/compiler/rustc_target/src/spec/mipsel_sony_psp.rs index 9897b0093fc6..c3d7c0d43fc8 100644 --- a/compiler/rustc_target/src/spec/mipsel_sony_psp.rs +++ b/compiler/rustc_target/src/spec/mipsel_sony_psp.rs @@ -12,7 +12,6 @@ pub fn target() -> Target { llvm_target: "mipsel-sony-psp".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), target_os: "psp".to_string(), diff --git a/compiler/rustc_target/src/spec/mipsel_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/mipsel_unknown_linux_gnu.rs index 509f3e04ba7c..7005a7edc6b4 100644 --- a/compiler/rustc_target/src/spec/mipsel_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/mipsel_unknown_linux_gnu.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { llvm_target: "mipsel-unknown-linux-gnu".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/mipsel_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/mipsel_unknown_linux_musl.rs index 0d3691dd5b99..7ac2485e1282 100644 --- a/compiler/rustc_target/src/spec/mipsel_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/mipsel_unknown_linux_musl.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { llvm_target: "mipsel-unknown-linux-musl".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/mipsel_unknown_linux_uclibc.rs b/compiler/rustc_target/src/spec/mipsel_unknown_linux_uclibc.rs index 6d50d9ba81e5..89693af7ba9b 100644 --- a/compiler/rustc_target/src/spec/mipsel_unknown_linux_uclibc.rs +++ b/compiler/rustc_target/src/spec/mipsel_unknown_linux_uclibc.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { llvm_target: "mipsel-unknown-linux-uclibc".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/mipsisa32r6_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/mipsisa32r6_unknown_linux_gnu.rs index d6e71d2922f2..55e91318f703 100644 --- a/compiler/rustc_target/src/spec/mipsisa32r6_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/mipsisa32r6_unknown_linux_gnu.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { llvm_target: "mipsisa32r6-unknown-linux-gnu".to_string(), target_endian: "big".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/mipsisa32r6el_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/mipsisa32r6el_unknown_linux_gnu.rs index 67e97fd2f0fe..f0c85cbb7757 100644 --- a/compiler/rustc_target/src/spec/mipsisa32r6el_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/mipsisa32r6el_unknown_linux_gnu.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { llvm_target: "mipsisa32r6el-unknown-linux-gnu".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/mipsisa64r6_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/mipsisa64r6_unknown_linux_gnuabi64.rs index c3a7ae8b11ff..4bf442d5ab8a 100644 --- a/compiler/rustc_target/src/spec/mipsisa64r6_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/mipsisa64r6_unknown_linux_gnuabi64.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { llvm_target: "mipsisa64r6-unknown-linux-gnuabi64".to_string(), target_endian: "big".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs index 467e05a00d47..8a44545813f5 100644 --- a/compiler/rustc_target/src/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { llvm_target: "mipsisa64r6el-unknown-linux-gnuabi64".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index d3c5a9433d08..3de6b17a152e 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -38,6 +38,7 @@ use crate::spec::crt_objects::{CrtObjects, CrtObjectsFallback}; use rustc_serialize::json::{Json, ToJson}; use std::collections::BTreeMap; +use std::ops::Deref; use std::path::{Path, PathBuf}; use std::str::FromStr; use std::{fmt, io}; @@ -668,8 +669,6 @@ pub struct Target { pub target_endian: String, /// Number of bits in a pointer. Influences the `target_pointer_width` `cfg` variable. pub pointer_width: u32, - /// Width of c_int type - pub target_c_int_width: String, /// OS name to use for conditional compilation. pub target_os: String, /// Environment name to use for conditional compilation. @@ -707,6 +706,9 @@ pub struct TargetOptions { /// Whether the target is built-in or loaded from a custom target specification. pub is_builtin: bool, + /// Width of c_int type + pub target_c_int_width: String, + /// Linker to invoke pub linker: Option, @@ -985,6 +987,7 @@ impl Default for TargetOptions { fn default() -> TargetOptions { TargetOptions { is_builtin: false, + target_c_int_width: "32".to_string(), linker: option_env!("CFG_DEFAULT_LINKER").map(|s| s.to_string()), lld_flavor: LldFlavor::Ld, pre_link_args: LinkArgs::new(), @@ -1075,6 +1078,17 @@ fn default() -> TargetOptions { } } +/// `TargetOptions` being a separate type is basically an implementation detail of `Target` that is +/// used for providing defaults. Perhaps there's a way to merge `TargetOptions` into `Target` so +/// this `Deref` implementation is no longer necessary. +impl Deref for Target { + type Target = TargetOptions; + + fn deref(&self) -> &Self::Target { + &self.options + } +} + impl Target { /// Given a function ABI, turn it into the correct ABI for this target. pub fn adjust_abi(&self, abi: Abi) -> Abi { @@ -1148,7 +1162,6 @@ pub fn from_json(obj: Json) -> Result { pointer_width: get_req_field("target-pointer-width")? .parse::() .map_err(|_| "target-pointer-width must be an integer".to_string())?, - target_c_int_width: get_req_field("target-c-int-width")?, data_layout: get_req_field("data-layout")?, arch: get_req_field("arch")?, target_os: get_req_field("os")?, @@ -1392,6 +1405,7 @@ macro_rules! key { } key!(is_builtin, bool); + key!(target_c_int_width); key!(linker, optional); key!(lld_flavor, LldFlavor)?; key!(pre_link_objects, link_objects); @@ -1621,7 +1635,6 @@ macro_rules! target_option_val { target_val!(llvm_target); target_val!(target_endian); d.insert("target-pointer-width".to_string(), self.pointer_width.to_string().to_json()); - target_val!(target_c_int_width); target_val!(arch); target_val!(target_os, "os"); target_val!(target_env, "env"); @@ -1629,6 +1642,7 @@ macro_rules! target_option_val { target_val!(data_layout); target_val!(linker_flavor); + target_option_val!(target_c_int_width); target_option_val!(is_builtin); target_option_val!(linker); target_option_val!(lld_flavor); diff --git a/compiler/rustc_target/src/spec/msp430_none_elf.rs b/compiler/rustc_target/src/spec/msp430_none_elf.rs index 5bb8109ce265..5b2749f73dcf 100644 --- a/compiler/rustc_target/src/spec/msp430_none_elf.rs +++ b/compiler/rustc_target/src/spec/msp430_none_elf.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { llvm_target: "msp430-none-elf".to_string(), target_endian: "little".to_string(), pointer_width: 16, - target_c_int_width: "16".to_string(), data_layout: "e-m:e-p:16:16-i32:16-i64:16-f32:16-f64:16-a:8-n8:16-S16".to_string(), arch: "msp430".to_string(), target_os: "none".to_string(), @@ -14,6 +13,7 @@ pub fn target() -> Target { linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { + target_c_int_width: "16".to_string(), executables: true, // The LLVM backend currently can't generate object files. To diff --git a/compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs b/compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs index 86360c181d1f..8387411bd87e 100644 --- a/compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs +++ b/compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), options: TargetOptions { // The linker can be installed from `crates.io`. diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_freebsd.rs b/compiler/rustc_target/src/spec/powerpc64_unknown_freebsd.rs index 563ff96a4031..6cda45828faf 100644 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/powerpc64_unknown_freebsd.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { llvm_target: "powerpc64-unknown-freebsd".to_string(), target_endian: "big".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "E-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), target_os: "freebsd".to_string(), diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs index 7d37670e5b05..892efc5fbaac 100644 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { llvm_target: "powerpc64-unknown-linux-gnu".to_string(), target_endian: "big".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "E-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_musl.rs index e108d75f3376..b23c131e761a 100644 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_musl.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { llvm_target: "powerpc64-unknown-linux-musl".to_string(), target_endian: "big".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "E-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/powerpc64_wrs_vxworks.rs b/compiler/rustc_target/src/spec/powerpc64_wrs_vxworks.rs index 9784c637c7e4..c29ff00daa05 100644 --- a/compiler/rustc_target/src/spec/powerpc64_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/powerpc64_wrs_vxworks.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { llvm_target: "powerpc64-unknown-linux-gnu".to_string(), target_endian: "big".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "E-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), target_os: "vxworks".to_string(), diff --git a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs index 46d847f6e5fe..0e854d552183 100644 --- a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { llvm_target: "powerpc64le-unknown-linux-gnu".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_musl.rs index e04ee0137015..242041c76571 100644 --- a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_musl.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { llvm_target: "powerpc64le-unknown-linux-musl".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnu.rs index 80fc63e78e44..797216cc8c79 100644 --- a/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnu.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { llvm_target: "powerpc-unknown-linux-gnu".to_string(), target_endian: "big".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnuspe.rs b/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnuspe.rs index 612d2967ee0b..6b479c80f26a 100644 --- a/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnuspe.rs +++ b/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnuspe.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { llvm_target: "powerpc-unknown-linux-gnuspe".to_string(), target_endian: "big".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/powerpc_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc_unknown_linux_musl.rs index fd89262e464a..cf3c0bf58e7a 100644 --- a/compiler/rustc_target/src/spec/powerpc_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/powerpc_unknown_linux_musl.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { llvm_target: "powerpc-unknown-linux-musl".to_string(), target_endian: "big".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/powerpc_unknown_netbsd.rs b/compiler/rustc_target/src/spec/powerpc_unknown_netbsd.rs index d33258d18591..b31154500d7f 100644 --- a/compiler/rustc_target/src/spec/powerpc_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/powerpc_unknown_netbsd.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { llvm_target: "powerpc-unknown-netbsd".to_string(), target_endian: "big".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), target_os: "netbsd".to_string(), diff --git a/compiler/rustc_target/src/spec/powerpc_wrs_vxworks.rs b/compiler/rustc_target/src/spec/powerpc_wrs_vxworks.rs index 6a12f4c59f61..a442ab31c603 100644 --- a/compiler/rustc_target/src/spec/powerpc_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/powerpc_wrs_vxworks.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { llvm_target: "powerpc-unknown-linux-gnu".to_string(), target_endian: "big".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), target_os: "vxworks".to_string(), diff --git a/compiler/rustc_target/src/spec/powerpc_wrs_vxworks_spe.rs b/compiler/rustc_target/src/spec/powerpc_wrs_vxworks_spe.rs index 5fee61fa0bdf..188a80dfd82d 100644 --- a/compiler/rustc_target/src/spec/powerpc_wrs_vxworks_spe.rs +++ b/compiler/rustc_target/src/spec/powerpc_wrs_vxworks_spe.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { llvm_target: "powerpc-unknown-linux-gnuspe".to_string(), target_endian: "big".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), target_os: "vxworks".to_string(), diff --git a/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs index 415d7c5607d3..ac6fa16b500a 100644 --- a/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { llvm_target: "riscv32-unknown-linux-gnu".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), target_env: "gnu".to_string(), data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(), arch: "riscv32".to_string(), diff --git a/compiler/rustc_target/src/spec/riscv32i_unknown_none_elf.rs b/compiler/rustc_target/src/spec/riscv32i_unknown_none_elf.rs index 022768f6ab88..89471b68abaf 100644 --- a/compiler/rustc_target/src/spec/riscv32i_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/riscv32i_unknown_none_elf.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { llvm_target: "riscv32".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), target_os: "none".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), diff --git a/compiler/rustc_target/src/spec/riscv32imac_unknown_none_elf.rs b/compiler/rustc_target/src/spec/riscv32imac_unknown_none_elf.rs index 13f0d42d6fd2..d2302e958da5 100644 --- a/compiler/rustc_target/src/spec/riscv32imac_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/riscv32imac_unknown_none_elf.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { llvm_target: "riscv32".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), target_os: "none".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), diff --git a/compiler/rustc_target/src/spec/riscv32imc_unknown_none_elf.rs b/compiler/rustc_target/src/spec/riscv32imc_unknown_none_elf.rs index 86189c27bbde..4f9631705f3e 100644 --- a/compiler/rustc_target/src/spec/riscv32imc_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/riscv32imc_unknown_none_elf.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { llvm_target: "riscv32".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), target_os: "none".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), diff --git a/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_gnu.rs index 808d7159f829..c1357201d00a 100644 --- a/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_gnu.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { llvm_target: "riscv64-unknown-linux-gnu".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), target_env: "gnu".to_string(), data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".to_string(), arch: "riscv64".to_string(), diff --git a/compiler/rustc_target/src/spec/riscv64gc_unknown_none_elf.rs b/compiler/rustc_target/src/spec/riscv64gc_unknown_none_elf.rs index 0211bc02d2d2..f2dbda027a4d 100644 --- a/compiler/rustc_target/src/spec/riscv64gc_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/riscv64gc_unknown_none_elf.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { llvm_target: "riscv64".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), target_os: "none".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), diff --git a/compiler/rustc_target/src/spec/riscv64imac_unknown_none_elf.rs b/compiler/rustc_target/src/spec/riscv64imac_unknown_none_elf.rs index 1050ce5ba74f..31f8eed5b8cb 100644 --- a/compiler/rustc_target/src/spec/riscv64imac_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/riscv64imac_unknown_none_elf.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { llvm_target: "riscv64".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), target_os: "none".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), diff --git a/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs index 653b83646ce0..002d498f7030 100644 --- a/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { llvm_target: "s390x-unknown-linux-gnu".to_string(), target_endian: "big".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-a:8:16-n32:64".to_string(), arch: "s390x".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/sparc64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/sparc64_unknown_linux_gnu.rs index e50c114fcfad..f8052dcc955b 100644 --- a/compiler/rustc_target/src/spec/sparc64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/sparc64_unknown_linux_gnu.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { llvm_target: "sparc64-unknown-linux-gnu".to_string(), target_endian: "big".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "E-m:e-i64:64-n32:64-S128".to_string(), arch: "sparc64".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/sparc64_unknown_netbsd.rs b/compiler/rustc_target/src/spec/sparc64_unknown_netbsd.rs index 6d8e433949b9..07035bf15d5f 100644 --- a/compiler/rustc_target/src/spec/sparc64_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/sparc64_unknown_netbsd.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { llvm_target: "sparc64-unknown-netbsd".to_string(), target_endian: "big".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "E-m:e-i64:64-n32:64-S128".to_string(), arch: "sparc64".to_string(), target_os: "netbsd".to_string(), diff --git a/compiler/rustc_target/src/spec/sparc64_unknown_openbsd.rs b/compiler/rustc_target/src/spec/sparc64_unknown_openbsd.rs index 45700e14c53c..5fa4b93dfd66 100644 --- a/compiler/rustc_target/src/spec/sparc64_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/sparc64_unknown_openbsd.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { llvm_target: "sparc64-unknown-openbsd".to_string(), target_endian: "big".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "E-m:e-i64:64-n32:64-S128".to_string(), arch: "sparc64".to_string(), target_os: "openbsd".to_string(), diff --git a/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs index fc400dd3446e..868f618f2e23 100644 --- a/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { llvm_target: "sparc-unknown-linux-gnu".to_string(), target_endian: "big".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "E-m:e-p:32:32-i64:64-f128:64-n32-S64".to_string(), arch: "sparc".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs b/compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs index 0878e7fd21ea..a6e8b7814c41 100644 --- a/compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs +++ b/compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { llvm_target: "sparcv9-sun-solaris".to_string(), target_endian: "big".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "E-m:e-i64:64-n32:64-S128".to_string(), // Use "sparc64" instead of "sparcv9" here, since the former is already // used widely in the source base. If we ever needed ABI diff --git a/compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs index d5ce62d8c1ca..9741ebf4bd24 100644 --- a/compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { llvm_target: "thumbv4t-none-eabi".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), target_os: "none".to_string(), target_env: "".to_string(), target_vendor: "".to_string(), diff --git a/compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs index 407fa6116c5f..080d5e4f2838 100644 --- a/compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { llvm_target: "thumbv6m-none-eabi".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "none".to_string(), diff --git a/compiler/rustc_target/src/spec/thumbv7a_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/thumbv7a_pc_windows_msvc.rs index d34f42cdc61d..60d10b0a47c7 100644 --- a/compiler/rustc_target/src/spec/thumbv7a_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/thumbv7a_pc_windows_msvc.rs @@ -25,7 +25,6 @@ pub fn target() -> Target { llvm_target: "thumbv7a-pc-windows-msvc".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:w-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "windows".to_string(), diff --git a/compiler/rustc_target/src/spec/thumbv7a_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/thumbv7a_uwp_windows_msvc.rs index 143a9a48a4a8..b1d467b966dc 100644 --- a/compiler/rustc_target/src/spec/thumbv7a_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/thumbv7a_uwp_windows_msvc.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { llvm_target: "thumbv7a-pc-windows-msvc".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:w-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "windows".to_string(), diff --git a/compiler/rustc_target/src/spec/thumbv7em_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv7em_none_eabi.rs index e0b00460e089..9858123b7753 100644 --- a/compiler/rustc_target/src/spec/thumbv7em_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv7em_none_eabi.rs @@ -16,7 +16,6 @@ pub fn target() -> Target { llvm_target: "thumbv7em-none-eabi".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "none".to_string(), diff --git a/compiler/rustc_target/src/spec/thumbv7em_none_eabihf.rs b/compiler/rustc_target/src/spec/thumbv7em_none_eabihf.rs index eecd75e46142..da4ad58f46a7 100644 --- a/compiler/rustc_target/src/spec/thumbv7em_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/thumbv7em_none_eabihf.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { llvm_target: "thumbv7em-none-eabihf".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "none".to_string(), diff --git a/compiler/rustc_target/src/spec/thumbv7m_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv7m_none_eabi.rs index a02100ee1994..fe051b69ae11 100644 --- a/compiler/rustc_target/src/spec/thumbv7m_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv7m_none_eabi.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { llvm_target: "thumbv7m-none-eabi".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "none".to_string(), diff --git a/compiler/rustc_target/src/spec/thumbv7neon_linux_androideabi.rs b/compiler/rustc_target/src/spec/thumbv7neon_linux_androideabi.rs index 35e7d480f3f4..ebee5a21c3aa 100644 --- a/compiler/rustc_target/src/spec/thumbv7neon_linux_androideabi.rs +++ b/compiler/rustc_target/src/spec/thumbv7neon_linux_androideabi.rs @@ -18,7 +18,6 @@ pub fn target() -> Target { llvm_target: "armv7-none-linux-android".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "android".to_string(), diff --git a/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_gnueabihf.rs b/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_gnueabihf.rs index 946b0db4c22f..3d6c69d3eece 100644 --- a/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_gnueabihf.rs +++ b/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_gnueabihf.rs @@ -12,7 +12,6 @@ pub fn target() -> Target { llvm_target: "armv7-unknown-linux-gnueabihf".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_musleabihf.rs b/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_musleabihf.rs index 91945f9dcdcb..b6bcaff99f42 100644 --- a/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_musleabihf.rs +++ b/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_musleabihf.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { llvm_target: "armv7-unknown-linux-gnueabihf".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "linux".to_string(), diff --git a/compiler/rustc_target/src/spec/thumbv8m_base_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv8m_base_none_eabi.rs index 383346400b53..7f73697f64d1 100644 --- a/compiler/rustc_target/src/spec/thumbv8m_base_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv8m_base_none_eabi.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { llvm_target: "thumbv8m.base-none-eabi".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "none".to_string(), diff --git a/compiler/rustc_target/src/spec/thumbv8m_main_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv8m_main_none_eabi.rs index 3d0fb664cf6b..2c63ee7e4acf 100644 --- a/compiler/rustc_target/src/spec/thumbv8m_main_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv8m_main_none_eabi.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { llvm_target: "thumbv8m.main-none-eabi".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "none".to_string(), diff --git a/compiler/rustc_target/src/spec/thumbv8m_main_none_eabihf.rs b/compiler/rustc_target/src/spec/thumbv8m_main_none_eabihf.rs index 82368cb59b28..a40e4f53c4d3 100644 --- a/compiler/rustc_target/src/spec/thumbv8m_main_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/thumbv8m_main_none_eabihf.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { llvm_target: "thumbv8m.main-none-eabihf".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), target_os: "none".to_string(), diff --git a/compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs b/compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs index aea06412aa29..3712bf26c2c2 100644 --- a/compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs +++ b/compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs @@ -32,7 +32,6 @@ pub fn target() -> Target { llvm_target: "wasm32-unknown-emscripten".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), target_os: "emscripten".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), diff --git a/compiler/rustc_target/src/spec/wasm32_unknown_unknown.rs b/compiler/rustc_target/src/spec/wasm32_unknown_unknown.rs index 1ef0a8193784..69854dbc48bd 100644 --- a/compiler/rustc_target/src/spec/wasm32_unknown_unknown.rs +++ b/compiler/rustc_target/src/spec/wasm32_unknown_unknown.rs @@ -34,7 +34,6 @@ pub fn target() -> Target { llvm_target: "wasm32-unknown-unknown".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), target_os: "unknown".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), diff --git a/compiler/rustc_target/src/spec/wasm32_wasi.rs b/compiler/rustc_target/src/spec/wasm32_wasi.rs index 8c2bb9208291..83ed37c30a21 100644 --- a/compiler/rustc_target/src/spec/wasm32_wasi.rs +++ b/compiler/rustc_target/src/spec/wasm32_wasi.rs @@ -108,7 +108,6 @@ pub fn target() -> Target { llvm_target: "wasm32-wasi".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), target_os: "wasi".to_string(), target_env: String::new(), target_vendor: String::new(), diff --git a/compiler/rustc_target/src/spec/x86_64_apple_darwin.rs b/compiler/rustc_target/src/spec/x86_64_apple_darwin.rs index 2b39fec594a5..a474cc94ac10 100644 --- a/compiler/rustc_target/src/spec/x86_64_apple_darwin.rs +++ b/compiler/rustc_target/src/spec/x86_64_apple_darwin.rs @@ -22,7 +22,6 @@ pub fn target() -> Target { llvm_target, target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: arch.to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_apple_ios.rs b/compiler/rustc_target/src/spec/x86_64_apple_ios.rs index 685e046b64b6..8e2dd51c9020 100644 --- a/compiler/rustc_target/src/spec/x86_64_apple_ios.rs +++ b/compiler/rustc_target/src/spec/x86_64_apple_ios.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { llvm_target: "x86_64-apple-ios".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_apple_ios_macabi.rs b/compiler/rustc_target/src/spec/x86_64_apple_ios_macabi.rs index ff7331560ed3..a45d5c2fcc46 100644 --- a/compiler/rustc_target/src/spec/x86_64_apple_ios_macabi.rs +++ b/compiler/rustc_target/src/spec/x86_64_apple_ios_macabi.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { llvm_target: "x86_64-apple-ios13.0-macabi".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_apple_tvos.rs b/compiler/rustc_target/src/spec/x86_64_apple_tvos.rs index 7c0a819f5ddb..de52ef332b53 100644 --- a/compiler/rustc_target/src/spec/x86_64_apple_tvos.rs +++ b/compiler/rustc_target/src/spec/x86_64_apple_tvos.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { llvm_target: "x86_64-apple-tvos".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:o-i64:64-f80:128-n8:16:32:64-S128".to_string(), arch: "x86_64".to_string(), target_os: "tvos".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_fortanix_unknown_sgx.rs b/compiler/rustc_target/src/spec/x86_64_fortanix_unknown_sgx.rs index 8f1627d4a29a..dfbc400f5c7f 100644 --- a/compiler/rustc_target/src/spec/x86_64_fortanix_unknown_sgx.rs +++ b/compiler/rustc_target/src/spec/x86_64_fortanix_unknown_sgx.rs @@ -78,7 +78,6 @@ pub fn target() -> Target { llvm_target: "x86_64-elf".into(), target_endian: "little".into(), pointer_width: 64, - target_c_int_width: "32".into(), target_os: "unknown".into(), target_env: "sgx".into(), target_vendor: "fortanix".into(), diff --git a/compiler/rustc_target/src/spec/x86_64_fuchsia.rs b/compiler/rustc_target/src/spec/x86_64_fuchsia.rs index 71add0a6c0aa..39f010773df4 100644 --- a/compiler/rustc_target/src/spec/x86_64_fuchsia.rs +++ b/compiler/rustc_target/src/spec/x86_64_fuchsia.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { llvm_target: "x86_64-fuchsia".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_linux_android.rs b/compiler/rustc_target/src/spec/x86_64_linux_android.rs index aa5e48cee070..a70c6b670915 100644 --- a/compiler/rustc_target/src/spec/x86_64_linux_android.rs +++ b/compiler/rustc_target/src/spec/x86_64_linux_android.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { llvm_target: "x86_64-linux-android".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_linux_kernel.rs b/compiler/rustc_target/src/spec/x86_64_linux_kernel.rs index 243167558be4..7dde4a87be1c 100644 --- a/compiler/rustc_target/src/spec/x86_64_linux_kernel.rs +++ b/compiler/rustc_target/src/spec/x86_64_linux_kernel.rs @@ -18,7 +18,6 @@ pub fn target() -> Target { llvm_target: "x86_64-elf".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), target_os: "none".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs b/compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs index 3b2edc91bc28..a8278dbc6a44 100644 --- a/compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs @@ -16,7 +16,6 @@ pub fn target() -> Target { llvm_target: "x86_64-pc-windows-gnu".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/x86_64_pc_windows_msvc.rs index f21b059551de..741ca81c9536 100644 --- a/compiler/rustc_target/src/spec/x86_64_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/x86_64_pc_windows_msvc.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { llvm_target: "x86_64-pc-windows-msvc".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_rumprun_netbsd.rs b/compiler/rustc_target/src/spec/x86_64_rumprun_netbsd.rs index 2e009d7abbff..95c53d11afbf 100644 --- a/compiler/rustc_target/src/spec/x86_64_rumprun_netbsd.rs +++ b/compiler/rustc_target/src/spec/x86_64_rumprun_netbsd.rs @@ -17,7 +17,6 @@ pub fn target() -> Target { llvm_target: "x86_64-rumprun-netbsd".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_sun_solaris.rs b/compiler/rustc_target/src/spec/x86_64_sun_solaris.rs index aef06157cdd4..d427e5a297ed 100644 --- a/compiler/rustc_target/src/spec/x86_64_sun_solaris.rs +++ b/compiler/rustc_target/src/spec/x86_64_sun_solaris.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { llvm_target: "x86_64-pc-solaris".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_cloudabi.rs b/compiler/rustc_target/src/spec/x86_64_unknown_cloudabi.rs index bdaab883d907..1f463994ca67 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_cloudabi.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_cloudabi.rs @@ -12,7 +12,6 @@ pub fn target() -> Target { llvm_target: "x86_64-unknown-cloudabi".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_dragonfly.rs b/compiler/rustc_target/src/spec/x86_64_unknown_dragonfly.rs index 13a62d5081c0..5c9359da1a14 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_dragonfly.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_dragonfly.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { llvm_target: "x86_64-unknown-dragonfly".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_freebsd.rs b/compiler/rustc_target/src/spec/x86_64_unknown_freebsd.rs index 145983022e88..9172c0203b9c 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_freebsd.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { llvm_target: "x86_64-unknown-freebsd".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_haiku.rs b/compiler/rustc_target/src/spec/x86_64_unknown_haiku.rs index d88812e4248c..ee5074d8c725 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_haiku.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_haiku.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { llvm_target: "x86_64-unknown-haiku".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_hermit.rs b/compiler/rustc_target/src/spec/x86_64_unknown_hermit.rs index a5002091d072..3faa0bb14699 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_hermit.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_hermit.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { llvm_target: "x86_64-unknown-hermit".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_hermit_kernel.rs b/compiler/rustc_target/src/spec/x86_64_unknown_hermit_kernel.rs index 91d7b0eaefc8..f8e2025eb005 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_hermit_kernel.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_hermit_kernel.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { llvm_target: "x86_64-unknown-hermit".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_illumos.rs b/compiler/rustc_target/src/spec/x86_64_unknown_illumos.rs index e49f009be0f9..e350efc79434 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_illumos.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_illumos.rs @@ -12,7 +12,6 @@ pub fn target() -> Target { llvm_target: "x86_64-pc-solaris".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_l4re_uclibc.rs b/compiler/rustc_target/src/spec/x86_64_unknown_l4re_uclibc.rs index fc5b1ba60ec4..a1677fb65afd 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_l4re_uclibc.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_l4re_uclibc.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { llvm_target: "x86_64-unknown-l4re-uclibc".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs index 9d9f99c9b59d..a737b0fdd49a 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { llvm_target: "x86_64-unknown-linux-gnu".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnux32.rs b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnux32.rs index e4a0d913babf..8e3762ab190a 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnux32.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnux32.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { llvm_target: "x86_64-unknown-linux-gnux32".to_string(), target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i64:64-f80:128-n8:16:32:64-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/x86_64_unknown_linux_musl.rs index a7d3324b2c7d..c866101ec548 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_linux_musl.rs @@ -12,7 +12,6 @@ pub fn target() -> Target { llvm_target: "x86_64-unknown-linux-musl".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_netbsd.rs b/compiler/rustc_target/src/spec/x86_64_unknown_netbsd.rs index a8106c0c770f..7c8980a1d01c 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_netbsd.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { llvm_target: "x86_64-unknown-netbsd".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_openbsd.rs b/compiler/rustc_target/src/spec/x86_64_unknown_openbsd.rs index 5afe73ea7133..06f6e6479886 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_openbsd.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { llvm_target: "x86_64-unknown-openbsd".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_redox.rs b/compiler/rustc_target/src/spec/x86_64_unknown_redox.rs index e21148887d93..2701562e3ef1 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_redox.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_redox.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { llvm_target: "x86_64-unknown-redox".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs b/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs index 894bd3341694..cc3784928c53 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs @@ -32,7 +32,6 @@ pub fn target() -> Target { llvm_target: "x86_64-unknown-windows".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), target_os: "uefi".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_uwp_windows_gnu.rs b/compiler/rustc_target/src/spec/x86_64_uwp_windows_gnu.rs index a4fa0d035466..f23808e1680c 100644 --- a/compiler/rustc_target/src/spec/x86_64_uwp_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/x86_64_uwp_windows_gnu.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { llvm_target: "x86_64-pc-windows-gnu".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/x86_64_uwp_windows_msvc.rs index aaf85bbce810..126da3996bb7 100644 --- a/compiler/rustc_target/src/spec/x86_64_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/x86_64_uwp_windows_msvc.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { llvm_target: "x86_64-pc-windows-msvc".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_wrs_vxworks.rs b/compiler/rustc_target/src/spec/x86_64_wrs_vxworks.rs index 5edf7e7af51a..53ea4e04c41d 100644 --- a/compiler/rustc_target/src/spec/x86_64_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/x86_64_wrs_vxworks.rs @@ -12,7 +12,6 @@ pub fn target() -> Target { llvm_target: "x86_64-unknown-linux-gnu".to_string(), target_endian: "little".to_string(), pointer_width: 64, - target_c_int_width: "32".to_string(), data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), From 91533cf10e214f150dd813113e492565bb34f3e0 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Thu, 8 Oct 2020 19:57:41 +0300 Subject: [PATCH 2/7] rustc_target: Move `target_endian` from `Target` to `TargetOptions` --- .../rustc_target/src/spec/aarch64_apple_darwin.rs | 1 - compiler/rustc_target/src/spec/aarch64_apple_ios.rs | 1 - compiler/rustc_target/src/spec/aarch64_apple_tvos.rs | 1 - compiler/rustc_target/src/spec/aarch64_fuchsia.rs | 1 - .../rustc_target/src/spec/aarch64_linux_android.rs | 1 - .../rustc_target/src/spec/aarch64_pc_windows_msvc.rs | 1 - .../rustc_target/src/spec/aarch64_unknown_cloudabi.rs | 1 - .../rustc_target/src/spec/aarch64_unknown_freebsd.rs | 1 - .../rustc_target/src/spec/aarch64_unknown_hermit.rs | 1 - .../src/spec/aarch64_unknown_linux_gnu.rs | 1 - .../src/spec/aarch64_unknown_linux_musl.rs | 1 - .../rustc_target/src/spec/aarch64_unknown_netbsd.rs | 1 - .../rustc_target/src/spec/aarch64_unknown_none.rs | 1 - .../src/spec/aarch64_unknown_none_softfloat.rs | 1 - .../rustc_target/src/spec/aarch64_unknown_openbsd.rs | 1 - .../rustc_target/src/spec/aarch64_unknown_redox.rs | 1 - .../rustc_target/src/spec/aarch64_uwp_windows_msvc.rs | 1 - compiler/rustc_target/src/spec/aarch64_wrs_vxworks.rs | 1 - .../rustc_target/src/spec/arm_linux_androideabi.rs | 1 - .../src/spec/arm_unknown_linux_gnueabi.rs | 1 - .../src/spec/arm_unknown_linux_gnueabihf.rs | 1 - .../src/spec/arm_unknown_linux_musleabi.rs | 1 - .../src/spec/arm_unknown_linux_musleabihf.rs | 1 - compiler/rustc_target/src/spec/armebv7r_none_eabi.rs | 2 +- .../rustc_target/src/spec/armebv7r_none_eabihf.rs | 2 +- .../src/spec/armv4t_unknown_linux_gnueabi.rs | 1 - .../src/spec/armv5te_unknown_linux_gnueabi.rs | 1 - .../src/spec/armv5te_unknown_linux_musleabi.rs | 1 - .../rustc_target/src/spec/armv6_unknown_freebsd.rs | 1 - .../src/spec/armv6_unknown_netbsd_eabihf.rs | 1 - compiler/rustc_target/src/spec/armv7_apple_ios.rs | 1 - .../rustc_target/src/spec/armv7_linux_androideabi.rs | 1 - .../src/spec/armv7_unknown_cloudabi_eabihf.rs | 1 - .../rustc_target/src/spec/armv7_unknown_freebsd.rs | 1 - .../src/spec/armv7_unknown_linux_gnueabi.rs | 1 - .../src/spec/armv7_unknown_linux_gnueabihf.rs | 1 - .../src/spec/armv7_unknown_linux_musleabi.rs | 1 - .../src/spec/armv7_unknown_linux_musleabihf.rs | 1 - .../src/spec/armv7_unknown_netbsd_eabihf.rs | 1 - .../rustc_target/src/spec/armv7_wrs_vxworks_eabihf.rs | 1 - compiler/rustc_target/src/spec/armv7a_none_eabi.rs | 1 - compiler/rustc_target/src/spec/armv7a_none_eabihf.rs | 1 - compiler/rustc_target/src/spec/armv7r_none_eabi.rs | 1 - compiler/rustc_target/src/spec/armv7r_none_eabihf.rs | 1 - compiler/rustc_target/src/spec/armv7s_apple_ios.rs | 1 - compiler/rustc_target/src/spec/avr_gnu_base.rs | 1 - .../src/spec/hexagon_unknown_linux_musl.rs | 1 - compiler/rustc_target/src/spec/i386_apple_ios.rs | 1 - compiler/rustc_target/src/spec/i686_apple_darwin.rs | 1 - compiler/rustc_target/src/spec/i686_linux_android.rs | 1 - compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs | 1 - .../rustc_target/src/spec/i686_pc_windows_msvc.rs | 1 - .../rustc_target/src/spec/i686_unknown_cloudabi.rs | 1 - .../rustc_target/src/spec/i686_unknown_freebsd.rs | 1 - compiler/rustc_target/src/spec/i686_unknown_haiku.rs | 1 - .../rustc_target/src/spec/i686_unknown_linux_gnu.rs | 1 - .../rustc_target/src/spec/i686_unknown_linux_musl.rs | 1 - compiler/rustc_target/src/spec/i686_unknown_netbsd.rs | 1 - .../rustc_target/src/spec/i686_unknown_openbsd.rs | 1 - compiler/rustc_target/src/spec/i686_unknown_uefi.rs | 1 - .../rustc_target/src/spec/i686_uwp_windows_gnu.rs | 1 - .../rustc_target/src/spec/i686_uwp_windows_msvc.rs | 1 - compiler/rustc_target/src/spec/i686_wrs_vxworks.rs | 1 - .../src/spec/mips64_unknown_linux_gnuabi64.rs | 2 +- .../src/spec/mips64_unknown_linux_muslabi64.rs | 7 +++++-- .../src/spec/mips64el_unknown_linux_gnuabi64.rs | 1 - .../src/spec/mips64el_unknown_linux_muslabi64.rs | 1 - .../rustc_target/src/spec/mips_unknown_linux_gnu.rs | 2 +- .../rustc_target/src/spec/mips_unknown_linux_musl.rs | 7 +++++-- .../src/spec/mips_unknown_linux_uclibc.rs | 2 +- compiler/rustc_target/src/spec/mipsel_sony_psp.rs | 1 - .../rustc_target/src/spec/mipsel_unknown_linux_gnu.rs | 1 - .../src/spec/mipsel_unknown_linux_musl.rs | 1 - .../src/spec/mipsel_unknown_linux_uclibc.rs | 1 - .../src/spec/mipsisa32r6_unknown_linux_gnu.rs | 2 +- .../src/spec/mipsisa32r6el_unknown_linux_gnu.rs | 1 - .../src/spec/mipsisa64r6_unknown_linux_gnuabi64.rs | 2 +- .../src/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs | 1 - compiler/rustc_target/src/spec/mod.rs | 11 ++++++----- compiler/rustc_target/src/spec/msp430_none_elf.rs | 1 - compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs | 1 - .../src/spec/powerpc64_unknown_freebsd.rs | 7 +++++-- .../src/spec/powerpc64_unknown_linux_gnu.rs | 7 +++++-- .../src/spec/powerpc64_unknown_linux_musl.rs | 7 +++++-- .../rustc_target/src/spec/powerpc64_wrs_vxworks.rs | 3 +-- .../src/spec/powerpc64le_unknown_linux_gnu.rs | 1 - .../src/spec/powerpc64le_unknown_linux_musl.rs | 1 - .../src/spec/powerpc_unknown_linux_gnu.rs | 7 +++++-- .../src/spec/powerpc_unknown_linux_gnuspe.rs | 7 +++++-- .../src/spec/powerpc_unknown_linux_musl.rs | 7 +++++-- .../rustc_target/src/spec/powerpc_unknown_netbsd.rs | 7 +++++-- compiler/rustc_target/src/spec/powerpc_wrs_vxworks.rs | 7 +++++-- .../rustc_target/src/spec/powerpc_wrs_vxworks_spe.rs | 2 +- .../src/spec/riscv32gc_unknown_linux_gnu.rs | 1 - .../src/spec/riscv32i_unknown_none_elf.rs | 1 - .../src/spec/riscv32imac_unknown_none_elf.rs | 1 - .../src/spec/riscv32imc_unknown_none_elf.rs | 1 - .../src/spec/riscv64gc_unknown_linux_gnu.rs | 1 - .../src/spec/riscv64gc_unknown_none_elf.rs | 1 - .../src/spec/riscv64imac_unknown_none_elf.rs | 1 - .../rustc_target/src/spec/s390x_unknown_linux_gnu.rs | 2 +- .../src/spec/sparc64_unknown_linux_gnu.rs | 2 +- .../rustc_target/src/spec/sparc64_unknown_netbsd.rs | 7 +++++-- .../rustc_target/src/spec/sparc64_unknown_openbsd.rs | 2 +- .../rustc_target/src/spec/sparc_unknown_linux_gnu.rs | 2 +- compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs | 2 +- compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs | 1 - compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs | 1 - .../rustc_target/src/spec/thumbv7a_pc_windows_msvc.rs | 1 - .../src/spec/thumbv7a_uwp_windows_msvc.rs | 1 - compiler/rustc_target/src/spec/thumbv7em_none_eabi.rs | 1 - .../rustc_target/src/spec/thumbv7em_none_eabihf.rs | 1 - compiler/rustc_target/src/spec/thumbv7m_none_eabi.rs | 1 - .../src/spec/thumbv7neon_linux_androideabi.rs | 1 - .../src/spec/thumbv7neon_unknown_linux_gnueabihf.rs | 1 - .../src/spec/thumbv7neon_unknown_linux_musleabihf.rs | 1 - .../rustc_target/src/spec/thumbv8m_base_none_eabi.rs | 1 - .../rustc_target/src/spec/thumbv8m_main_none_eabi.rs | 1 - .../src/spec/thumbv8m_main_none_eabihf.rs | 1 - .../src/spec/wasm32_unknown_emscripten.rs | 1 - .../rustc_target/src/spec/wasm32_unknown_unknown.rs | 1 - compiler/rustc_target/src/spec/wasm32_wasi.rs | 1 - compiler/rustc_target/src/spec/x86_64_apple_darwin.rs | 1 - compiler/rustc_target/src/spec/x86_64_apple_ios.rs | 1 - .../rustc_target/src/spec/x86_64_apple_ios_macabi.rs | 1 - compiler/rustc_target/src/spec/x86_64_apple_tvos.rs | 1 - .../src/spec/x86_64_fortanix_unknown_sgx.rs | 1 - compiler/rustc_target/src/spec/x86_64_fuchsia.rs | 1 - .../rustc_target/src/spec/x86_64_linux_android.rs | 1 - compiler/rustc_target/src/spec/x86_64_linux_kernel.rs | 1 - .../rustc_target/src/spec/x86_64_pc_windows_gnu.rs | 1 - .../rustc_target/src/spec/x86_64_pc_windows_msvc.rs | 1 - .../rustc_target/src/spec/x86_64_rumprun_netbsd.rs | 1 - compiler/rustc_target/src/spec/x86_64_sun_solaris.rs | 1 - .../rustc_target/src/spec/x86_64_unknown_cloudabi.rs | 1 - .../rustc_target/src/spec/x86_64_unknown_dragonfly.rs | 1 - .../rustc_target/src/spec/x86_64_unknown_freebsd.rs | 1 - .../rustc_target/src/spec/x86_64_unknown_haiku.rs | 1 - .../rustc_target/src/spec/x86_64_unknown_hermit.rs | 1 - .../src/spec/x86_64_unknown_hermit_kernel.rs | 1 - .../rustc_target/src/spec/x86_64_unknown_illumos.rs | 1 - .../src/spec/x86_64_unknown_l4re_uclibc.rs | 1 - .../rustc_target/src/spec/x86_64_unknown_linux_gnu.rs | 1 - .../src/spec/x86_64_unknown_linux_gnux32.rs | 1 - .../src/spec/x86_64_unknown_linux_musl.rs | 1 - .../rustc_target/src/spec/x86_64_unknown_netbsd.rs | 1 - .../rustc_target/src/spec/x86_64_unknown_openbsd.rs | 1 - .../rustc_target/src/spec/x86_64_unknown_redox.rs | 1 - compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs | 1 - .../rustc_target/src/spec/x86_64_uwp_windows_gnu.rs | 1 - .../rustc_target/src/spec/x86_64_uwp_windows_msvc.rs | 1 - compiler/rustc_target/src/spec/x86_64_wrs_vxworks.rs | 1 - 152 files changed, 75 insertions(+), 168 deletions(-) diff --git a/compiler/rustc_target/src/spec/aarch64_apple_darwin.rs b/compiler/rustc_target/src/spec/aarch64_apple_darwin.rs index 13352fa772c0..ff15f32ca9d6 100644 --- a/compiler/rustc_target/src/spec/aarch64_apple_darwin.rs +++ b/compiler/rustc_target/src/spec/aarch64_apple_darwin.rs @@ -16,7 +16,6 @@ pub fn target() -> Target { Target { llvm_target, - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".to_string(), arch: arch.to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_apple_ios.rs b/compiler/rustc_target/src/spec/aarch64_apple_ios.rs index 84a133315e77..ce59163e0aad 100644 --- a/compiler/rustc_target/src/spec/aarch64_apple_ios.rs +++ b/compiler/rustc_target/src/spec/aarch64_apple_ios.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { let base = opts(Arch::Arm64); Target { llvm_target: "arm64-apple-ios".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_apple_tvos.rs b/compiler/rustc_target/src/spec/aarch64_apple_tvos.rs index 2a0db66c3e9f..a8126c81add9 100644 --- a/compiler/rustc_target/src/spec/aarch64_apple_tvos.rs +++ b/compiler/rustc_target/src/spec/aarch64_apple_tvos.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { let base = opts(Arch::Arm64); Target { llvm_target: "arm64-apple-tvos".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_fuchsia.rs b/compiler/rustc_target/src/spec/aarch64_fuchsia.rs index 6850eb6f2df6..65254d5d0194 100644 --- a/compiler/rustc_target/src/spec/aarch64_fuchsia.rs +++ b/compiler/rustc_target/src/spec/aarch64_fuchsia.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { Target { llvm_target: "aarch64-fuchsia".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_linux_android.rs b/compiler/rustc_target/src/spec/aarch64_linux_android.rs index 425d1ef1cb93..caf17fe4e0b5 100644 --- a/compiler/rustc_target/src/spec/aarch64_linux_android.rs +++ b/compiler/rustc_target/src/spec/aarch64_linux_android.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { base.features = "+neon,+fp-armv8".to_string(); Target { llvm_target: "aarch64-linux-android".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/aarch64_pc_windows_msvc.rs index ad63284a2a10..382e2b9272a6 100644 --- a/compiler/rustc_target/src/spec/aarch64_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/aarch64_pc_windows_msvc.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { Target { llvm_target: "aarch64-pc-windows-msvc".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_cloudabi.rs b/compiler/rustc_target/src/spec/aarch64_unknown_cloudabi.rs index bd800a2d730c..ab8e5ad07556 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_cloudabi.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_cloudabi.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-cloudabi".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_freebsd.rs b/compiler/rustc_target/src/spec/aarch64_unknown_freebsd.rs index e36b6e3fc6e3..c2dd63e6fc44 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_freebsd.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-freebsd".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs b/compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs index 8098267e6eff..541c485f7acd 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-hermit".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs index 48284654906f..58b461bf0d6d 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-linux-gnu".to_string(), - target_endian: "little".to_string(), pointer_width: 64, target_env: "gnu".to_string(), data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/aarch64_unknown_linux_musl.rs index 23555b46ca70..391672365f90 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_linux_musl.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-linux-musl".to_string(), - target_endian: "little".to_string(), pointer_width: 64, target_env: "musl".to_string(), data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_netbsd.rs b/compiler/rustc_target/src/spec/aarch64_unknown_netbsd.rs index 6e3eed928664..08b54edf4fdf 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_netbsd.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-netbsd".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_none.rs b/compiler/rustc_target/src/spec/aarch64_unknown_none.rs index c8c4224ac8c1..6f24787d8fab 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_none.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_none.rs @@ -23,7 +23,6 @@ pub fn target() -> Target { }; Target { llvm_target: "aarch64-unknown-none".to_string(), - target_endian: "little".to_string(), pointer_width: 64, target_os: "none".to_string(), target_env: String::new(), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_none_softfloat.rs b/compiler/rustc_target/src/spec/aarch64_unknown_none_softfloat.rs index 22dd397145be..b72c1600397c 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_none_softfloat.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_none_softfloat.rs @@ -23,7 +23,6 @@ pub fn target() -> Target { }; Target { llvm_target: "aarch64-unknown-none".to_string(), - target_endian: "little".to_string(), pointer_width: 64, target_os: "none".to_string(), target_env: String::new(), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_openbsd.rs b/compiler/rustc_target/src/spec/aarch64_unknown_openbsd.rs index 56e3d893d203..0f50da1e86c3 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_openbsd.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-openbsd".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_redox.rs b/compiler/rustc_target/src/spec/aarch64_unknown_redox.rs index 9d169043cc32..c2c00af03800 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_redox.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_redox.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-redox".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/aarch64_uwp_windows_msvc.rs index a60186cebd85..143e6651c6be 100644 --- a/compiler/rustc_target/src/spec/aarch64_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/aarch64_uwp_windows_msvc.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { Target { llvm_target: "aarch64-pc-windows-msvc".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_wrs_vxworks.rs b/compiler/rustc_target/src/spec/aarch64_wrs_vxworks.rs index 96597bc0bca0..a0ba61ca83e6 100644 --- a/compiler/rustc_target/src/spec/aarch64_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/aarch64_wrs_vxworks.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-linux-gnu".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), diff --git a/compiler/rustc_target/src/spec/arm_linux_androideabi.rs b/compiler/rustc_target/src/spec/arm_linux_androideabi.rs index 87233ebf5739..f94b6c7cbbab 100644 --- a/compiler/rustc_target/src/spec/arm_linux_androideabi.rs +++ b/compiler/rustc_target/src/spec/arm_linux_androideabi.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { Target { llvm_target: "arm-linux-androideabi".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabi.rs index 7914204c79fd..c0751eb4b030 100644 --- a/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabi.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { base.max_atomic_width = Some(64); Target { llvm_target: "arm-unknown-linux-gnueabi".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabihf.rs b/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabihf.rs index 47f9a4fbdab6..c218b8a033f6 100644 --- a/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabihf.rs +++ b/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabihf.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { base.max_atomic_width = Some(64); Target { llvm_target: "arm-unknown-linux-gnueabihf".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/arm_unknown_linux_musleabi.rs b/compiler/rustc_target/src/spec/arm_unknown_linux_musleabi.rs index 31e137d4b424..310a1c96e669 100644 --- a/compiler/rustc_target/src/spec/arm_unknown_linux_musleabi.rs +++ b/compiler/rustc_target/src/spec/arm_unknown_linux_musleabi.rs @@ -12,7 +12,6 @@ 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".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/arm_unknown_linux_musleabihf.rs b/compiler/rustc_target/src/spec/arm_unknown_linux_musleabihf.rs index 35de9e3fbd0a..b48886263fdb 100644 --- a/compiler/rustc_target/src/spec/arm_unknown_linux_musleabihf.rs +++ b/compiler/rustc_target/src/spec/arm_unknown_linux_musleabihf.rs @@ -12,7 +12,6 @@ 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".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/armebv7r_none_eabi.rs b/compiler/rustc_target/src/spec/armebv7r_none_eabi.rs index 8b59a7c4ad71..4f8371b5adda 100644 --- a/compiler/rustc_target/src/spec/armebv7r_none_eabi.rs +++ b/compiler/rustc_target/src/spec/armebv7r_none_eabi.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { Target { llvm_target: "armebv7r-unknown-none-eabi".to_string(), - target_endian: "big".to_string(), pointer_width: 32, data_layout: "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), @@ -16,6 +15,7 @@ pub fn target() -> Target { linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { + target_endian: "big".to_string(), executables: true, linker: Some("rust-lld".to_owned()), relocation_model: RelocModel::Static, diff --git a/compiler/rustc_target/src/spec/armebv7r_none_eabihf.rs b/compiler/rustc_target/src/spec/armebv7r_none_eabihf.rs index 2da6422ba8f4..6b75e70ce5a7 100644 --- a/compiler/rustc_target/src/spec/armebv7r_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/armebv7r_none_eabihf.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { Target { llvm_target: "armebv7r-unknown-none-eabihf".to_string(), - target_endian: "big".to_string(), pointer_width: 32, data_layout: "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), @@ -16,6 +15,7 @@ pub fn target() -> Target { linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { + target_endian: "big".to_string(), executables: true, linker: Some("rust-lld".to_owned()), relocation_model: RelocModel::Static, diff --git a/compiler/rustc_target/src/spec/armv4t_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/armv4t_unknown_linux_gnueabi.rs index 59e22cc34138..cc7f1bb28d13 100644 --- a/compiler/rustc_target/src/spec/armv4t_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/armv4t_unknown_linux_gnueabi.rs @@ -4,7 +4,6 @@ pub fn target() -> Target { let base = super::linux_base::opts(); Target { llvm_target: "armv4t-unknown-linux-gnueabi".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/armv5te_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/armv5te_unknown_linux_gnueabi.rs index 8a6c1a2b3fb6..75e0d4a3db7f 100644 --- a/compiler/rustc_target/src/spec/armv5te_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/armv5te_unknown_linux_gnueabi.rs @@ -4,7 +4,6 @@ pub fn target() -> Target { let base = super::linux_base::opts(); Target { llvm_target: "armv5te-unknown-linux-gnueabi".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/armv5te_unknown_linux_musleabi.rs b/compiler/rustc_target/src/spec/armv5te_unknown_linux_musleabi.rs index 7c637acdc135..834b4b389996 100644 --- a/compiler/rustc_target/src/spec/armv5te_unknown_linux_musleabi.rs +++ b/compiler/rustc_target/src/spec/armv5te_unknown_linux_musleabi.rs @@ -7,7 +7,6 @@ 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".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/armv6_unknown_freebsd.rs b/compiler/rustc_target/src/spec/armv6_unknown_freebsd.rs index f81108753b88..1cd6fae21524 100644 --- a/compiler/rustc_target/src/spec/armv6_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/armv6_unknown_freebsd.rs @@ -4,7 +4,6 @@ pub fn target() -> Target { let base = super::freebsd_base::opts(); Target { llvm_target: "armv6-unknown-freebsd-gnueabihf".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/armv6_unknown_netbsd_eabihf.rs b/compiler/rustc_target/src/spec/armv6_unknown_netbsd_eabihf.rs index 9aafd3a2837d..9cda99457262 100644 --- a/compiler/rustc_target/src/spec/armv6_unknown_netbsd_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv6_unknown_netbsd_eabihf.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { base.max_atomic_width = Some(64); Target { llvm_target: "armv6-unknown-netbsdelf-eabihf".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7_apple_ios.rs b/compiler/rustc_target/src/spec/armv7_apple_ios.rs index 03465ac439e3..3df6c2f7c562 100644 --- a/compiler/rustc_target/src/spec/armv7_apple_ios.rs +++ b/compiler/rustc_target/src/spec/armv7_apple_ios.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { let base = opts(Arch::Armv7); Target { llvm_target: "armv7-apple-ios".to_string(), - target_endian: "little".to_string(), 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".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7_linux_androideabi.rs b/compiler/rustc_target/src/spec/armv7_linux_androideabi.rs index e210e36d1e1d..34ffe21d0cf1 100644 --- a/compiler/rustc_target/src/spec/armv7_linux_androideabi.rs +++ b/compiler/rustc_target/src/spec/armv7_linux_androideabi.rs @@ -16,7 +16,6 @@ pub fn target() -> Target { Target { llvm_target: "armv7-none-linux-android".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7_unknown_cloudabi_eabihf.rs b/compiler/rustc_target/src/spec/armv7_unknown_cloudabi_eabihf.rs index 726040086159..e29b9bfee126 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_cloudabi_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_cloudabi_eabihf.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { Target { llvm_target: "armv7-unknown-cloudabi-eabihf".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7_unknown_freebsd.rs b/compiler/rustc_target/src/spec/armv7_unknown_freebsd.rs index 7ce45670f6b7..ca96dccc8470 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_freebsd.rs @@ -4,7 +4,6 @@ pub fn target() -> Target { let base = super::freebsd_base::opts(); Target { llvm_target: "armv7-unknown-freebsd-gnueabihf".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabi.rs index 630c9b3ba6a0..b0251a3d9cb0 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabi.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { let base = super::linux_base::opts(); Target { llvm_target: "armv7-unknown-linux-gnueabi".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabihf.rs b/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabihf.rs index f3d21d2f009a..97c2fe21d339 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabihf.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabihf.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { let base = super::linux_base::opts(); Target { llvm_target: "armv7-unknown-linux-gnueabihf".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabi.rs b/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabi.rs index 3d2d62284be5..095a7c80879c 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabi.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabi.rs @@ -12,7 +12,6 @@ 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".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabihf.rs b/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabihf.rs index 1ebb73476f43..414ab7fccf79 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabihf.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabihf.rs @@ -9,7 +9,6 @@ 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".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7_unknown_netbsd_eabihf.rs b/compiler/rustc_target/src/spec/armv7_unknown_netbsd_eabihf.rs index f2ec067a6715..c25a23d8231b 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_netbsd_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_netbsd_eabihf.rs @@ -4,7 +4,6 @@ pub fn target() -> Target { let base = super::netbsd_base::opts(); Target { llvm_target: "armv7-unknown-netbsdelf-eabihf".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7_wrs_vxworks_eabihf.rs b/compiler/rustc_target/src/spec/armv7_wrs_vxworks_eabihf.rs index 29f15687638f..e40086dfea48 100644 --- a/compiler/rustc_target/src/spec/armv7_wrs_vxworks_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv7_wrs_vxworks_eabihf.rs @@ -4,7 +4,6 @@ pub fn target() -> Target { let base = super::vxworks_base::opts(); Target { llvm_target: "armv7-unknown-linux-gnueabihf".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7a_none_eabi.rs b/compiler/rustc_target/src/spec/armv7a_none_eabi.rs index 0391dd7e86fb..c84dbcace720 100644 --- a/compiler/rustc_target/src/spec/armv7a_none_eabi.rs +++ b/compiler/rustc_target/src/spec/armv7a_none_eabi.rs @@ -34,7 +34,6 @@ pub fn target() -> Target { }; Target { llvm_target: "armv7a-none-eabi".to_string(), - target_endian: "little".to_string(), pointer_width: 32, target_os: "none".to_string(), target_env: String::new(), diff --git a/compiler/rustc_target/src/spec/armv7a_none_eabihf.rs b/compiler/rustc_target/src/spec/armv7a_none_eabihf.rs index dcaae8e41bd6..432b841ca7d3 100644 --- a/compiler/rustc_target/src/spec/armv7a_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv7a_none_eabihf.rs @@ -22,7 +22,6 @@ pub fn target() -> Target { }; Target { llvm_target: "armv7a-none-eabihf".to_string(), - target_endian: "little".to_string(), pointer_width: 32, target_os: "none".to_string(), target_env: String::new(), diff --git a/compiler/rustc_target/src/spec/armv7r_none_eabi.rs b/compiler/rustc_target/src/spec/armv7r_none_eabi.rs index 9ed81d400a09..54f105639ffc 100644 --- a/compiler/rustc_target/src/spec/armv7r_none_eabi.rs +++ b/compiler/rustc_target/src/spec/armv7r_none_eabi.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { Target { llvm_target: "armv7r-unknown-none-eabi".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7r_none_eabihf.rs b/compiler/rustc_target/src/spec/armv7r_none_eabihf.rs index 572bc033c007..7efc0e31da19 100644 --- a/compiler/rustc_target/src/spec/armv7r_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv7r_none_eabihf.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { Target { llvm_target: "armv7r-unknown-none-eabihf".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7s_apple_ios.rs b/compiler/rustc_target/src/spec/armv7s_apple_ios.rs index 62bc45e91203..85892eaf065b 100644 --- a/compiler/rustc_target/src/spec/armv7s_apple_ios.rs +++ b/compiler/rustc_target/src/spec/armv7s_apple_ios.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { let base = opts(Arch::Armv7s); Target { llvm_target: "armv7s-apple-ios".to_string(), - target_endian: "little".to_string(), 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".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/avr_gnu_base.rs b/compiler/rustc_target/src/spec/avr_gnu_base.rs index fd597ca89b12..e2340efadefd 100644 --- a/compiler/rustc_target/src/spec/avr_gnu_base.rs +++ b/compiler/rustc_target/src/spec/avr_gnu_base.rs @@ -8,7 +8,6 @@ pub fn target(target_cpu: String) -> Target { arch: "avr".to_string(), data_layout: "e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-a:8".to_string(), llvm_target: "avr-unknown-unknown".to_string(), - target_endian: "little".to_string(), pointer_width: 16, linker_flavor: LinkerFlavor::Gcc, target_os: "unknown".to_string(), diff --git a/compiler/rustc_target/src/spec/hexagon_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/hexagon_unknown_linux_musl.rs index 13a67ef550eb..f7df7fcff767 100644 --- a/compiler/rustc_target/src/spec/hexagon_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/hexagon_unknown_linux_musl.rs @@ -19,7 +19,6 @@ pub fn target() -> Target { Target { llvm_target: "hexagon-unknown-linux-musl".to_string(), - target_endian: "little".to_string(), 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/i386_apple_ios.rs b/compiler/rustc_target/src/spec/i386_apple_ios.rs index 911ee27495e1..e3e13585af34 100644 --- a/compiler/rustc_target/src/spec/i386_apple_ios.rs +++ b/compiler/rustc_target/src/spec/i386_apple_ios.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { let base = opts(Arch::I386); Target { llvm_target: "i386-apple-ios".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:o-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ f64:32:64-f80:128-n8:16:32-S128" diff --git a/compiler/rustc_target/src/spec/i686_apple_darwin.rs b/compiler/rustc_target/src/spec/i686_apple_darwin.rs index c7db4f8bf7ea..2f5a3da57ab2 100644 --- a/compiler/rustc_target/src/spec/i686_apple_darwin.rs +++ b/compiler/rustc_target/src/spec/i686_apple_darwin.rs @@ -17,7 +17,6 @@ pub fn target() -> Target { Target { llvm_target, - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:o-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ f64:32:64-f80:128-n8:16:32-S128" diff --git a/compiler/rustc_target/src/spec/i686_linux_android.rs b/compiler/rustc_target/src/spec/i686_linux_android.rs index 44f743820334..f973ec163b10 100644 --- a/compiler/rustc_target/src/spec/i686_linux_android.rs +++ b/compiler/rustc_target/src/spec/i686_linux_android.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { Target { llvm_target: "i686-linux-android".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ f64:32:64-f80:32-n8:16:32-S128" diff --git a/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs b/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs index b4b6f3af1f7e..05cd6495448c 100644 --- a/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs @@ -18,7 +18,6 @@ pub fn target() -> Target { Target { llvm_target: "i686-pc-windows-gnu".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i64:64-f80:32-n8:16:32-a:0:32-S32" diff --git a/compiler/rustc_target/src/spec/i686_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/i686_pc_windows_msvc.rs index 9ff53d8f890b..a9496dc0636f 100644 --- a/compiler/rustc_target/src/spec/i686_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/i686_pc_windows_msvc.rs @@ -22,7 +22,6 @@ pub fn target() -> Target { Target { llvm_target: "i686-pc-windows-msvc".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i64:64-f80:32-n8:16:32-a:0:32-S32" diff --git a/compiler/rustc_target/src/spec/i686_unknown_cloudabi.rs b/compiler/rustc_target/src/spec/i686_unknown_cloudabi.rs index 2b66a178d0cd..1e7cafe785ee 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_cloudabi.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_cloudabi.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { Target { llvm_target: "i686-unknown-cloudabi".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ f64:32:64-f80:32-n8:16:32-S128" diff --git a/compiler/rustc_target/src/spec/i686_unknown_freebsd.rs b/compiler/rustc_target/src/spec/i686_unknown_freebsd.rs index 1e3f767acc96..7b03fbae90bf 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_freebsd.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { Target { llvm_target: "i686-unknown-freebsd".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ f64:32:64-f80:32-n8:16:32-S128" diff --git a/compiler/rustc_target/src/spec/i686_unknown_haiku.rs b/compiler/rustc_target/src/spec/i686_unknown_haiku.rs index 21afe751f80c..5e26a6f55403 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_haiku.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_haiku.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { Target { llvm_target: "i686-unknown-haiku".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ f64:32:64-f80:32-n8:16:32-S128" diff --git a/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs index 7f068b6e888e..209446e9851f 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { Target { llvm_target: "i686-unknown-linux-gnu".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ f64:32:64-f80:32-n8:16:32-S128" diff --git a/compiler/rustc_target/src/spec/i686_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/i686_unknown_linux_musl.rs index 04f308edcfee..11f23e502338 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_linux_musl.rs @@ -24,7 +24,6 @@ pub fn target() -> Target { Target { llvm_target: "i686-unknown-linux-musl".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ f64:32:64-f80:32-n8:16:32-S128" diff --git a/compiler/rustc_target/src/spec/i686_unknown_netbsd.rs b/compiler/rustc_target/src/spec/i686_unknown_netbsd.rs index e73d9c0bd88a..7f94e9d65aec 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_netbsd.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { Target { llvm_target: "i686-unknown-netbsdelf".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ f64:32:64-f80:32-n8:16:32-S128" diff --git a/compiler/rustc_target/src/spec/i686_unknown_openbsd.rs b/compiler/rustc_target/src/spec/i686_unknown_openbsd.rs index a673f0e29116..8fc72fa3b8fb 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_openbsd.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { Target { llvm_target: "i686-unknown-openbsd".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ f64:32:64-f80:32-n8:16:32-S128" diff --git a/compiler/rustc_target/src/spec/i686_unknown_uefi.rs b/compiler/rustc_target/src/spec/i686_unknown_uefi.rs index 7ede79549014..fcc1e77600fc 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_uefi.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_uefi.rs @@ -78,7 +78,6 @@ pub fn target() -> Target { // remove -gnu and use the default one. Target { llvm_target: "i686-unknown-windows-gnu".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i64:64-f80:32-n8:16:32-a:0:32-S32" diff --git a/compiler/rustc_target/src/spec/i686_uwp_windows_gnu.rs b/compiler/rustc_target/src/spec/i686_uwp_windows_gnu.rs index 687ead315268..1c8791974e68 100644 --- a/compiler/rustc_target/src/spec/i686_uwp_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/i686_uwp_windows_gnu.rs @@ -17,7 +17,6 @@ pub fn target() -> Target { Target { llvm_target: "i686-pc-windows-gnu".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i64:64-f80:32-n8:16:32-a:0:32-S32" diff --git a/compiler/rustc_target/src/spec/i686_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/i686_uwp_windows_msvc.rs index fade8655e92a..962c69860ca9 100644 --- a/compiler/rustc_target/src/spec/i686_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/i686_uwp_windows_msvc.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { Target { llvm_target: "i686-pc-windows-msvc".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i64:64-f80:32-n8:16:32-a:0:32-S32" diff --git a/compiler/rustc_target/src/spec/i686_wrs_vxworks.rs b/compiler/rustc_target/src/spec/i686_wrs_vxworks.rs index 5226bab1e6ba..86c5ca1adbc5 100644 --- a/compiler/rustc_target/src/spec/i686_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/i686_wrs_vxworks.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { Target { llvm_target: "i686-unknown-linux-gnu".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ f64:32:64-f80:32-n8:16:32-S128" diff --git a/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs index 64d86acd69a5..e27d7d073bcb 100644 --- a/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs @@ -3,7 +3,6 @@ pub fn target() -> Target { Target { llvm_target: "mips64-unknown-linux-gnuabi64".to_string(), - target_endian: "big".to_string(), pointer_width: 64, data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), @@ -12,6 +11,7 @@ pub fn target() -> Target { target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { + target_endian: "big".to_string(), // NOTE(mips64r2) matches C toolchain cpu: "mips64r2".to_string(), features: "+mips64r2".to_string(), diff --git a/compiler/rustc_target/src/spec/mips64_unknown_linux_muslabi64.rs b/compiler/rustc_target/src/spec/mips64_unknown_linux_muslabi64.rs index 31047ce220c1..f40f0e587ad3 100644 --- a/compiler/rustc_target/src/spec/mips64_unknown_linux_muslabi64.rs +++ b/compiler/rustc_target/src/spec/mips64_unknown_linux_muslabi64.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { Target { // LLVM doesn't recognize "muslabi64" yet. llvm_target: "mips64-unknown-linux-musl".to_string(), - target_endian: "big".to_string(), pointer_width: 64, data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), @@ -16,6 +15,10 @@ pub fn target() -> Target { target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, - options: TargetOptions { target_mcount: "_mcount".to_string(), ..base }, + options: TargetOptions { + target_endian: "big".to_string(), + target_mcount: "_mcount".to_string(), + ..base + }, } } diff --git a/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs index 11141cd8fdc6..a54d0e4c307d 100644 --- a/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs @@ -3,7 +3,6 @@ pub fn target() -> Target { Target { llvm_target: "mips64el-unknown-linux-gnuabi64".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), diff --git a/compiler/rustc_target/src/spec/mips64el_unknown_linux_muslabi64.rs b/compiler/rustc_target/src/spec/mips64el_unknown_linux_muslabi64.rs index f08c2a5dc0e7..b9971c1ebb69 100644 --- a/compiler/rustc_target/src/spec/mips64el_unknown_linux_muslabi64.rs +++ b/compiler/rustc_target/src/spec/mips64el_unknown_linux_muslabi64.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { Target { // LLVM doesn't recognize "muslabi64" yet. llvm_target: "mips64el-unknown-linux-musl".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), diff --git a/compiler/rustc_target/src/spec/mips_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/mips_unknown_linux_gnu.rs index 5cfa34567ea7..2eaed76e504e 100644 --- a/compiler/rustc_target/src/spec/mips_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/mips_unknown_linux_gnu.rs @@ -3,7 +3,6 @@ pub fn target() -> Target { Target { llvm_target: "mips-unknown-linux-gnu".to_string(), - target_endian: "big".to_string(), pointer_width: 32, data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), @@ -12,6 +11,7 @@ pub fn target() -> Target { target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { + target_endian: "big".to_string(), cpu: "mips32r2".to_string(), features: "+mips32r2,+fpxx,+nooddspreg".to_string(), max_atomic_width: Some(32), diff --git a/compiler/rustc_target/src/spec/mips_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/mips_unknown_linux_musl.rs index 91344ce47edb..47be91a89c70 100644 --- a/compiler/rustc_target/src/spec/mips_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/mips_unknown_linux_musl.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { base.crt_static_default = false; Target { llvm_target: "mips-unknown-linux-musl".to_string(), - target_endian: "big".to_string(), pointer_width: 32, data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), @@ -16,6 +15,10 @@ pub fn target() -> Target { target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, - options: TargetOptions { target_mcount: "_mcount".to_string(), ..base }, + options: TargetOptions { + target_endian: "big".to_string(), + target_mcount: "_mcount".to_string(), + ..base + }, } } diff --git a/compiler/rustc_target/src/spec/mips_unknown_linux_uclibc.rs b/compiler/rustc_target/src/spec/mips_unknown_linux_uclibc.rs index bb3b07bb941c..8f5302a1687b 100644 --- a/compiler/rustc_target/src/spec/mips_unknown_linux_uclibc.rs +++ b/compiler/rustc_target/src/spec/mips_unknown_linux_uclibc.rs @@ -3,7 +3,6 @@ pub fn target() -> Target { Target { llvm_target: "mips-unknown-linux-uclibc".to_string(), - target_endian: "big".to_string(), pointer_width: 32, data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), @@ -12,6 +11,7 @@ pub fn target() -> Target { target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { + target_endian: "big".to_string(), cpu: "mips32r2".to_string(), features: "+mips32r2,+soft-float".to_string(), max_atomic_width: Some(32), diff --git a/compiler/rustc_target/src/spec/mipsel_sony_psp.rs b/compiler/rustc_target/src/spec/mipsel_sony_psp.rs index c3d7c0d43fc8..05828f738e58 100644 --- a/compiler/rustc_target/src/spec/mipsel_sony_psp.rs +++ b/compiler/rustc_target/src/spec/mipsel_sony_psp.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { Target { llvm_target: "mipsel-sony-psp".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), diff --git a/compiler/rustc_target/src/spec/mipsel_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/mipsel_unknown_linux_gnu.rs index 7005a7edc6b4..81178dd23d7f 100644 --- a/compiler/rustc_target/src/spec/mipsel_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/mipsel_unknown_linux_gnu.rs @@ -3,7 +3,6 @@ pub fn target() -> Target { Target { llvm_target: "mipsel-unknown-linux-gnu".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), diff --git a/compiler/rustc_target/src/spec/mipsel_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/mipsel_unknown_linux_musl.rs index 7ac2485e1282..68660dfb6e80 100644 --- a/compiler/rustc_target/src/spec/mipsel_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/mipsel_unknown_linux_musl.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { base.crt_static_default = false; Target { llvm_target: "mipsel-unknown-linux-musl".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), diff --git a/compiler/rustc_target/src/spec/mipsel_unknown_linux_uclibc.rs b/compiler/rustc_target/src/spec/mipsel_unknown_linux_uclibc.rs index 89693af7ba9b..80a93ade5832 100644 --- a/compiler/rustc_target/src/spec/mipsel_unknown_linux_uclibc.rs +++ b/compiler/rustc_target/src/spec/mipsel_unknown_linux_uclibc.rs @@ -3,7 +3,6 @@ pub fn target() -> Target { Target { llvm_target: "mipsel-unknown-linux-uclibc".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), diff --git a/compiler/rustc_target/src/spec/mipsisa32r6_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/mipsisa32r6_unknown_linux_gnu.rs index 55e91318f703..bd6ad56f4dea 100644 --- a/compiler/rustc_target/src/spec/mipsisa32r6_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/mipsisa32r6_unknown_linux_gnu.rs @@ -3,7 +3,6 @@ pub fn target() -> Target { Target { llvm_target: "mipsisa32r6-unknown-linux-gnu".to_string(), - target_endian: "big".to_string(), pointer_width: 32, data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), @@ -12,6 +11,7 @@ pub fn target() -> Target { target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { + target_endian: "big".to_string(), cpu: "mips32r6".to_string(), features: "+mips32r6".to_string(), max_atomic_width: Some(32), diff --git a/compiler/rustc_target/src/spec/mipsisa32r6el_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/mipsisa32r6el_unknown_linux_gnu.rs index f0c85cbb7757..6ae972af0705 100644 --- a/compiler/rustc_target/src/spec/mipsisa32r6el_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/mipsisa32r6el_unknown_linux_gnu.rs @@ -3,7 +3,6 @@ pub fn target() -> Target { Target { llvm_target: "mipsisa32r6el-unknown-linux-gnu".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), diff --git a/compiler/rustc_target/src/spec/mipsisa64r6_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/mipsisa64r6_unknown_linux_gnuabi64.rs index 4bf442d5ab8a..278ffff40bc6 100644 --- a/compiler/rustc_target/src/spec/mipsisa64r6_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/mipsisa64r6_unknown_linux_gnuabi64.rs @@ -3,7 +3,6 @@ pub fn target() -> Target { Target { llvm_target: "mipsisa64r6-unknown-linux-gnuabi64".to_string(), - target_endian: "big".to_string(), pointer_width: 64, data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), @@ -12,6 +11,7 @@ pub fn target() -> Target { target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { + target_endian: "big".to_string(), // NOTE(mips64r6) matches C toolchain cpu: "mips64r6".to_string(), features: "+mips64r6".to_string(), diff --git a/compiler/rustc_target/src/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs index 8a44545813f5..4d785b309cf1 100644 --- a/compiler/rustc_target/src/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs @@ -3,7 +3,6 @@ pub fn target() -> Target { Target { llvm_target: "mipsisa64r6el-unknown-linux-gnuabi64".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index 3de6b17a152e..08e3949c7286 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -665,8 +665,6 @@ fn $module() { pub struct Target { /// Target triple to pass to LLVM. pub llvm_target: String, - /// String to use as the `target_endian` `cfg` variable. - pub target_endian: String, /// Number of bits in a pointer. Influences the `target_pointer_width` `cfg` variable. pub pointer_width: u32, /// OS name to use for conditional compilation. @@ -706,7 +704,9 @@ pub struct TargetOptions { /// Whether the target is built-in or loaded from a custom target specification. pub is_builtin: bool, - /// Width of c_int type + /// String to use as the `target_endian` `cfg` variable. Defaults to "little". + pub target_endian: String, + /// Width of c_int type. Defaults to "32". pub target_c_int_width: String, /// Linker to invoke @@ -987,6 +987,7 @@ impl Default for TargetOptions { fn default() -> TargetOptions { TargetOptions { is_builtin: false, + target_endian: "little".to_string(), target_c_int_width: "32".to_string(), linker: option_env!("CFG_DEFAULT_LINKER").map(|s| s.to_string()), lld_flavor: LldFlavor::Ld, @@ -1158,7 +1159,6 @@ pub fn from_json(obj: Json) -> Result { let mut base = Target { llvm_target: get_req_field("llvm-target")?, - target_endian: get_req_field("target-endian")?, pointer_width: get_req_field("target-pointer-width")? .parse::() .map_err(|_| "target-pointer-width must be an integer".to_string())?, @@ -1405,6 +1405,7 @@ macro_rules! key { } key!(is_builtin, bool); + key!(target_endian); key!(target_c_int_width); key!(linker, optional); key!(lld_flavor, LldFlavor)?; @@ -1633,7 +1634,6 @@ macro_rules! target_option_val { } target_val!(llvm_target); - target_val!(target_endian); d.insert("target-pointer-width".to_string(), self.pointer_width.to_string().to_json()); target_val!(arch); target_val!(target_os, "os"); @@ -1642,6 +1642,7 @@ macro_rules! target_option_val { target_val!(data_layout); target_val!(linker_flavor); + target_option_val!(target_endian); target_option_val!(target_c_int_width); target_option_val!(is_builtin); target_option_val!(linker); diff --git a/compiler/rustc_target/src/spec/msp430_none_elf.rs b/compiler/rustc_target/src/spec/msp430_none_elf.rs index 5b2749f73dcf..9170077dcecd 100644 --- a/compiler/rustc_target/src/spec/msp430_none_elf.rs +++ b/compiler/rustc_target/src/spec/msp430_none_elf.rs @@ -3,7 +3,6 @@ pub fn target() -> Target { Target { llvm_target: "msp430-none-elf".to_string(), - target_endian: "little".to_string(), pointer_width: 16, data_layout: "e-m:e-p:16:16-i32:16-i64:16-f32:16-f64:16-a:8-n8:16-S16".to_string(), arch: "msp430".to_string(), diff --git a/compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs b/compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs index 8387411bd87e..315138878f75 100644 --- a/compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs +++ b/compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { linker_flavor: LinkerFlavor::PtxLinker, - target_endian: "little".to_string(), pointer_width: 64, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_freebsd.rs b/compiler/rustc_target/src/spec/powerpc64_unknown_freebsd.rs index 6cda45828faf..803c079db54b 100644 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/powerpc64_unknown_freebsd.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { Target { llvm_target: "powerpc64-unknown-freebsd".to_string(), - target_endian: "big".to_string(), pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), @@ -16,6 +15,10 @@ pub fn target() -> Target { target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, - options: TargetOptions { target_mcount: "_mcount".to_string(), ..base }, + options: TargetOptions { + target_endian: "big".to_string(), + target_mcount: "_mcount".to_string(), + ..base + }, } } diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs index 892efc5fbaac..cf5a10d11529 100644 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs @@ -12,7 +12,6 @@ pub fn target() -> Target { Target { llvm_target: "powerpc64-unknown-linux-gnu".to_string(), - target_endian: "big".to_string(), pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), @@ -20,6 +19,10 @@ pub fn target() -> Target { target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, - options: TargetOptions { target_mcount: "_mcount".to_string(), ..base }, + options: TargetOptions { + target_endian: "big".to_string(), + target_mcount: "_mcount".to_string(), + ..base + }, } } diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_musl.rs index b23c131e761a..635a0e78d01b 100644 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_musl.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { Target { llvm_target: "powerpc64-unknown-linux-musl".to_string(), - target_endian: "big".to_string(), pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), @@ -16,6 +15,10 @@ pub fn target() -> Target { target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, - options: TargetOptions { target_mcount: "_mcount".to_string(), ..base }, + options: TargetOptions { + target_endian: "big".to_string(), + target_mcount: "_mcount".to_string(), + ..base + }, } } diff --git a/compiler/rustc_target/src/spec/powerpc64_wrs_vxworks.rs b/compiler/rustc_target/src/spec/powerpc64_wrs_vxworks.rs index c29ff00daa05..fcf9bfdd20da 100644 --- a/compiler/rustc_target/src/spec/powerpc64_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/powerpc64_wrs_vxworks.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { Target { llvm_target: "powerpc64-unknown-linux-gnu".to_string(), - target_endian: "big".to_string(), pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), @@ -16,6 +15,6 @@ pub fn target() -> Target { target_env: "gnu".to_string(), target_vendor: "wrs".to_string(), linker_flavor: LinkerFlavor::Gcc, - options: TargetOptions { ..base }, + options: TargetOptions { target_endian: "big".to_string(), ..base }, } } diff --git a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs index 0e854d552183..11fafa1201ba 100644 --- a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { Target { llvm_target: "powerpc64le-unknown-linux-gnu".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), diff --git a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_musl.rs index 242041c76571..23812b723402 100644 --- a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_musl.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { Target { llvm_target: "powerpc64le-unknown-linux-musl".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), diff --git a/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnu.rs index 797216cc8c79..45525b9ba9af 100644 --- a/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnu.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { Target { llvm_target: "powerpc-unknown-linux-gnu".to_string(), - target_endian: "big".to_string(), pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), @@ -15,6 +14,10 @@ pub fn target() -> Target { target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, - options: TargetOptions { target_mcount: "_mcount".to_string(), ..base }, + options: TargetOptions { + target_endian: "big".to_string(), + target_mcount: "_mcount".to_string(), + ..base + }, } } diff --git a/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnuspe.rs b/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnuspe.rs index 6b479c80f26a..677e9bae83a7 100644 --- a/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnuspe.rs +++ b/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnuspe.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { Target { llvm_target: "powerpc-unknown-linux-gnuspe".to_string(), - target_endian: "big".to_string(), pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), @@ -15,6 +14,10 @@ pub fn target() -> Target { target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, - options: TargetOptions { target_mcount: "_mcount".to_string(), ..base }, + options: TargetOptions { + target_endian: "big".to_string(), + target_mcount: "_mcount".to_string(), + ..base + }, } } diff --git a/compiler/rustc_target/src/spec/powerpc_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc_unknown_linux_musl.rs index cf3c0bf58e7a..243ab7f666b9 100644 --- a/compiler/rustc_target/src/spec/powerpc_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/powerpc_unknown_linux_musl.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { Target { llvm_target: "powerpc-unknown-linux-musl".to_string(), - target_endian: "big".to_string(), pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), @@ -15,6 +14,10 @@ pub fn target() -> Target { target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, - options: TargetOptions { target_mcount: "_mcount".to_string(), ..base }, + options: TargetOptions { + target_endian: "big".to_string(), + target_mcount: "_mcount".to_string(), + ..base + }, } } diff --git a/compiler/rustc_target/src/spec/powerpc_unknown_netbsd.rs b/compiler/rustc_target/src/spec/powerpc_unknown_netbsd.rs index b31154500d7f..ef842375b17c 100644 --- a/compiler/rustc_target/src/spec/powerpc_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/powerpc_unknown_netbsd.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { Target { llvm_target: "powerpc-unknown-netbsd".to_string(), - target_endian: "big".to_string(), pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), @@ -15,6 +14,10 @@ pub fn target() -> Target { target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, - options: TargetOptions { target_mcount: "__mcount".to_string(), ..base }, + options: TargetOptions { + target_endian: "big".to_string(), + target_mcount: "__mcount".to_string(), + ..base + }, } } diff --git a/compiler/rustc_target/src/spec/powerpc_wrs_vxworks.rs b/compiler/rustc_target/src/spec/powerpc_wrs_vxworks.rs index a442ab31c603..3e940377ae52 100644 --- a/compiler/rustc_target/src/spec/powerpc_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/powerpc_wrs_vxworks.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { Target { llvm_target: "powerpc-unknown-linux-gnu".to_string(), - target_endian: "big".to_string(), pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), @@ -16,6 +15,10 @@ pub fn target() -> Target { target_env: "gnu".to_string(), target_vendor: "wrs".to_string(), linker_flavor: LinkerFlavor::Gcc, - options: TargetOptions { features: "+secure-plt".to_string(), ..base }, + options: TargetOptions { + target_endian: "big".to_string(), + features: "+secure-plt".to_string(), + ..base + }, } } diff --git a/compiler/rustc_target/src/spec/powerpc_wrs_vxworks_spe.rs b/compiler/rustc_target/src/spec/powerpc_wrs_vxworks_spe.rs index 188a80dfd82d..9e019bd05d2f 100644 --- a/compiler/rustc_target/src/spec/powerpc_wrs_vxworks_spe.rs +++ b/compiler/rustc_target/src/spec/powerpc_wrs_vxworks_spe.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { Target { llvm_target: "powerpc-unknown-linux-gnuspe".to_string(), - target_endian: "big".to_string(), pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), @@ -17,6 +16,7 @@ pub fn target() -> Target { target_vendor: "wrs".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { + target_endian: "big".to_string(), // feature msync would disable instruction 'fsync' which is not supported by fsl_p1p2 features: "+secure-plt,+msync".to_string(), ..base diff --git a/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs index ac6fa16b500a..5314b53bd39b 100644 --- a/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs @@ -3,7 +3,6 @@ pub fn target() -> Target { Target { llvm_target: "riscv32-unknown-linux-gnu".to_string(), - target_endian: "little".to_string(), pointer_width: 32, target_env: "gnu".to_string(), data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(), diff --git a/compiler/rustc_target/src/spec/riscv32i_unknown_none_elf.rs b/compiler/rustc_target/src/spec/riscv32i_unknown_none_elf.rs index 89471b68abaf..e7dc614c88db 100644 --- a/compiler/rustc_target/src/spec/riscv32i_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/riscv32i_unknown_none_elf.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { Target { data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(), llvm_target: "riscv32".to_string(), - target_endian: "little".to_string(), pointer_width: 32, target_os: "none".to_string(), target_env: String::new(), diff --git a/compiler/rustc_target/src/spec/riscv32imac_unknown_none_elf.rs b/compiler/rustc_target/src/spec/riscv32imac_unknown_none_elf.rs index d2302e958da5..d7f6048c9c89 100644 --- a/compiler/rustc_target/src/spec/riscv32imac_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/riscv32imac_unknown_none_elf.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { Target { data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(), llvm_target: "riscv32".to_string(), - target_endian: "little".to_string(), pointer_width: 32, target_os: "none".to_string(), target_env: String::new(), diff --git a/compiler/rustc_target/src/spec/riscv32imc_unknown_none_elf.rs b/compiler/rustc_target/src/spec/riscv32imc_unknown_none_elf.rs index 4f9631705f3e..969a689c73ef 100644 --- a/compiler/rustc_target/src/spec/riscv32imc_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/riscv32imc_unknown_none_elf.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { Target { data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(), llvm_target: "riscv32".to_string(), - target_endian: "little".to_string(), pointer_width: 32, target_os: "none".to_string(), target_env: String::new(), diff --git a/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_gnu.rs index c1357201d00a..aa8e747ff204 100644 --- a/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_gnu.rs @@ -3,7 +3,6 @@ pub fn target() -> Target { Target { llvm_target: "riscv64-unknown-linux-gnu".to_string(), - target_endian: "little".to_string(), pointer_width: 64, target_env: "gnu".to_string(), data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".to_string(), diff --git a/compiler/rustc_target/src/spec/riscv64gc_unknown_none_elf.rs b/compiler/rustc_target/src/spec/riscv64gc_unknown_none_elf.rs index f2dbda027a4d..214541484a51 100644 --- a/compiler/rustc_target/src/spec/riscv64gc_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/riscv64gc_unknown_none_elf.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { Target { data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".to_string(), llvm_target: "riscv64".to_string(), - target_endian: "little".to_string(), pointer_width: 64, target_os: "none".to_string(), target_env: String::new(), diff --git a/compiler/rustc_target/src/spec/riscv64imac_unknown_none_elf.rs b/compiler/rustc_target/src/spec/riscv64imac_unknown_none_elf.rs index 31f8eed5b8cb..f805a531cdf5 100644 --- a/compiler/rustc_target/src/spec/riscv64imac_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/riscv64imac_unknown_none_elf.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { Target { data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".to_string(), llvm_target: "riscv64".to_string(), - target_endian: "little".to_string(), pointer_width: 64, target_os: "none".to_string(), target_env: String::new(), diff --git a/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs index 002d498f7030..cf5500eea314 100644 --- a/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs @@ -2,6 +2,7 @@ pub fn target() -> Target { let mut base = super::linux_base::opts(); + base.target_endian = "big".to_string(); // z10 is the oldest CPU supported by LLVM base.cpu = "z10".to_string(); // FIXME: The data_layout string below and the ABI implementation in @@ -13,7 +14,6 @@ pub fn target() -> Target { Target { llvm_target: "s390x-unknown-linux-gnu".to_string(), - target_endian: "big".to_string(), pointer_width: 64, data_layout: "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-a:8:16-n32:64".to_string(), arch: "s390x".to_string(), diff --git a/compiler/rustc_target/src/spec/sparc64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/sparc64_unknown_linux_gnu.rs index f8052dcc955b..911183ad9a62 100644 --- a/compiler/rustc_target/src/spec/sparc64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/sparc64_unknown_linux_gnu.rs @@ -2,12 +2,12 @@ pub fn target() -> Target { let mut base = super::linux_base::opts(); + base.target_endian = "big".to_string(); base.cpu = "v9".to_string(); base.max_atomic_width = Some(64); Target { llvm_target: "sparc64-unknown-linux-gnu".to_string(), - target_endian: "big".to_string(), pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64-S128".to_string(), arch: "sparc64".to_string(), diff --git a/compiler/rustc_target/src/spec/sparc64_unknown_netbsd.rs b/compiler/rustc_target/src/spec/sparc64_unknown_netbsd.rs index 07035bf15d5f..161ace037e5b 100644 --- a/compiler/rustc_target/src/spec/sparc64_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/sparc64_unknown_netbsd.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { Target { llvm_target: "sparc64-unknown-netbsd".to_string(), - target_endian: "big".to_string(), pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64-S128".to_string(), arch: "sparc64".to_string(), @@ -16,6 +15,10 @@ pub fn target() -> Target { target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, - options: TargetOptions { target_mcount: "__mcount".to_string(), ..base }, + options: TargetOptions { + target_endian: "big".to_string(), + target_mcount: "__mcount".to_string(), + ..base + }, } } diff --git a/compiler/rustc_target/src/spec/sparc64_unknown_openbsd.rs b/compiler/rustc_target/src/spec/sparc64_unknown_openbsd.rs index 5fa4b93dfd66..2ba531e9ef99 100644 --- a/compiler/rustc_target/src/spec/sparc64_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/sparc64_unknown_openbsd.rs @@ -2,13 +2,13 @@ pub fn target() -> Target { let mut base = super::openbsd_base::opts(); + base.target_endian = "big".to_string(); base.cpu = "v9".to_string(); base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string()); base.max_atomic_width = Some(64); Target { llvm_target: "sparc64-unknown-openbsd".to_string(), - target_endian: "big".to_string(), pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64-S128".to_string(), arch: "sparc64".to_string(), diff --git a/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs index 868f618f2e23..d523a29eda25 100644 --- a/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs @@ -2,13 +2,13 @@ pub fn target() -> Target { let mut base = super::linux_base::opts(); + base.target_endian = "big".to_string(); base.cpu = "v9".to_string(); base.max_atomic_width = Some(64); base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-mv8plus".to_string()); Target { llvm_target: "sparc-unknown-linux-gnu".to_string(), - target_endian: "big".to_string(), pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-f128:64-n32-S64".to_string(), arch: "sparc".to_string(), diff --git a/compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs b/compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs index a6e8b7814c41..271464015325 100644 --- a/compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs +++ b/compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs @@ -2,6 +2,7 @@ pub fn target() -> Target { let mut base = super::solaris_base::opts(); + base.target_endian = "big".to_string(); base.pre_link_args.insert(LinkerFlavor::Gcc, vec!["-m64".to_string()]); // llvm calls this "v9" base.cpu = "v9".to_string(); @@ -9,7 +10,6 @@ pub fn target() -> Target { Target { llvm_target: "sparcv9-sun-solaris".to_string(), - target_endian: "big".to_string(), pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64-S128".to_string(), // Use "sparc64" instead of "sparcv9" here, since the former is already diff --git a/compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs index 9741ebf4bd24..c50d7d71ee79 100644 --- a/compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { Target { llvm_target: "thumbv4t-none-eabi".to_string(), - target_endian: "little".to_string(), pointer_width: 32, target_os: "none".to_string(), target_env: "".to_string(), diff --git a/compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs index 080d5e4f2838..b21853850d67 100644 --- a/compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { Target { llvm_target: "thumbv6m-none-eabi".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/thumbv7a_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/thumbv7a_pc_windows_msvc.rs index 60d10b0a47c7..642fccb9abb0 100644 --- a/compiler/rustc_target/src/spec/thumbv7a_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/thumbv7a_pc_windows_msvc.rs @@ -23,7 +23,6 @@ pub fn target() -> Target { Target { llvm_target: "thumbv7a-pc-windows-msvc".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:w-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/thumbv7a_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/thumbv7a_uwp_windows_msvc.rs index b1d467b966dc..709c70f25479 100644 --- a/compiler/rustc_target/src/spec/thumbv7a_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/thumbv7a_uwp_windows_msvc.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { Target { llvm_target: "thumbv7a-pc-windows-msvc".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:w-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/thumbv7em_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv7em_none_eabi.rs index 9858123b7753..bd833ce11387 100644 --- a/compiler/rustc_target/src/spec/thumbv7em_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv7em_none_eabi.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { Target { llvm_target: "thumbv7em-none-eabi".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/thumbv7em_none_eabihf.rs b/compiler/rustc_target/src/spec/thumbv7em_none_eabihf.rs index da4ad58f46a7..b735014b8859 100644 --- a/compiler/rustc_target/src/spec/thumbv7em_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/thumbv7em_none_eabihf.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { Target { llvm_target: "thumbv7em-none-eabihf".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/thumbv7m_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv7m_none_eabi.rs index fe051b69ae11..7bd33589266c 100644 --- a/compiler/rustc_target/src/spec/thumbv7m_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv7m_none_eabi.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { Target { llvm_target: "thumbv7m-none-eabi".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/thumbv7neon_linux_androideabi.rs b/compiler/rustc_target/src/spec/thumbv7neon_linux_androideabi.rs index ebee5a21c3aa..f628eff477be 100644 --- a/compiler/rustc_target/src/spec/thumbv7neon_linux_androideabi.rs +++ b/compiler/rustc_target/src/spec/thumbv7neon_linux_androideabi.rs @@ -16,7 +16,6 @@ pub fn target() -> Target { Target { llvm_target: "armv7-none-linux-android".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_gnueabihf.rs b/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_gnueabihf.rs index 3d6c69d3eece..735a82c785e2 100644 --- a/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_gnueabihf.rs +++ b/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_gnueabihf.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { let base = super::linux_base::opts(); Target { llvm_target: "armv7-unknown-linux-gnueabihf".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_musleabihf.rs b/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_musleabihf.rs index b6bcaff99f42..ab2e9588df61 100644 --- a/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_musleabihf.rs +++ b/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_musleabihf.rs @@ -13,7 +13,6 @@ 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".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/thumbv8m_base_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv8m_base_none_eabi.rs index 7f73697f64d1..e89f07f6c520 100644 --- a/compiler/rustc_target/src/spec/thumbv8m_base_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv8m_base_none_eabi.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { Target { llvm_target: "thumbv8m.base-none-eabi".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/thumbv8m_main_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv8m_main_none_eabi.rs index 2c63ee7e4acf..911d5b087f21 100644 --- a/compiler/rustc_target/src/spec/thumbv8m_main_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv8m_main_none_eabi.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { Target { llvm_target: "thumbv8m.main-none-eabi".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/thumbv8m_main_none_eabihf.rs b/compiler/rustc_target/src/spec/thumbv8m_main_none_eabihf.rs index a40e4f53c4d3..b02d3e8fc927 100644 --- a/compiler/rustc_target/src/spec/thumbv8m_main_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/thumbv8m_main_none_eabihf.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { Target { llvm_target: "thumbv8m.main-none-eabihf".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs b/compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs index 3712bf26c2c2..3aaf9f6e0de9 100644 --- a/compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs +++ b/compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs @@ -30,7 +30,6 @@ pub fn target() -> Target { }; Target { llvm_target: "wasm32-unknown-emscripten".to_string(), - target_endian: "little".to_string(), pointer_width: 32, target_os: "emscripten".to_string(), target_env: String::new(), diff --git a/compiler/rustc_target/src/spec/wasm32_unknown_unknown.rs b/compiler/rustc_target/src/spec/wasm32_unknown_unknown.rs index 69854dbc48bd..70727d7d78a7 100644 --- a/compiler/rustc_target/src/spec/wasm32_unknown_unknown.rs +++ b/compiler/rustc_target/src/spec/wasm32_unknown_unknown.rs @@ -32,7 +32,6 @@ pub fn target() -> Target { Target { llvm_target: "wasm32-unknown-unknown".to_string(), - target_endian: "little".to_string(), pointer_width: 32, target_os: "unknown".to_string(), target_env: String::new(), diff --git a/compiler/rustc_target/src/spec/wasm32_wasi.rs b/compiler/rustc_target/src/spec/wasm32_wasi.rs index 83ed37c30a21..ae076f27529b 100644 --- a/compiler/rustc_target/src/spec/wasm32_wasi.rs +++ b/compiler/rustc_target/src/spec/wasm32_wasi.rs @@ -106,7 +106,6 @@ pub fn target() -> Target { Target { llvm_target: "wasm32-wasi".to_string(), - target_endian: "little".to_string(), pointer_width: 32, target_os: "wasi".to_string(), target_env: String::new(), diff --git a/compiler/rustc_target/src/spec/x86_64_apple_darwin.rs b/compiler/rustc_target/src/spec/x86_64_apple_darwin.rs index a474cc94ac10..3a35af3d935f 100644 --- a/compiler/rustc_target/src/spec/x86_64_apple_darwin.rs +++ b/compiler/rustc_target/src/spec/x86_64_apple_darwin.rs @@ -20,7 +20,6 @@ pub fn target() -> Target { Target { llvm_target, - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_apple_ios.rs b/compiler/rustc_target/src/spec/x86_64_apple_ios.rs index 8e2dd51c9020..967c4a35cbe6 100644 --- a/compiler/rustc_target/src/spec/x86_64_apple_ios.rs +++ b/compiler/rustc_target/src/spec/x86_64_apple_ios.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { let base = opts(Arch::X86_64); Target { llvm_target: "x86_64-apple-ios".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_apple_ios_macabi.rs b/compiler/rustc_target/src/spec/x86_64_apple_ios_macabi.rs index a45d5c2fcc46..c427b91a18d2 100644 --- a/compiler/rustc_target/src/spec/x86_64_apple_ios_macabi.rs +++ b/compiler/rustc_target/src/spec/x86_64_apple_ios_macabi.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { let base = opts(Arch::X86_64_macabi); Target { llvm_target: "x86_64-apple-ios13.0-macabi".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_apple_tvos.rs b/compiler/rustc_target/src/spec/x86_64_apple_tvos.rs index de52ef332b53..1124fc4b09a3 100644 --- a/compiler/rustc_target/src/spec/x86_64_apple_tvos.rs +++ b/compiler/rustc_target/src/spec/x86_64_apple_tvos.rs @@ -5,7 +5,6 @@ pub fn target() -> Target { let base = opts(Arch::X86_64); Target { llvm_target: "x86_64-apple-tvos".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:o-i64:64-f80:128-n8:16:32:64-S128".to_string(), arch: "x86_64".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_fortanix_unknown_sgx.rs b/compiler/rustc_target/src/spec/x86_64_fortanix_unknown_sgx.rs index dfbc400f5c7f..db1ac26a0e0b 100644 --- a/compiler/rustc_target/src/spec/x86_64_fortanix_unknown_sgx.rs +++ b/compiler/rustc_target/src/spec/x86_64_fortanix_unknown_sgx.rs @@ -76,7 +76,6 @@ pub fn target() -> Target { }; Target { llvm_target: "x86_64-elf".into(), - target_endian: "little".into(), pointer_width: 64, target_os: "unknown".into(), target_env: "sgx".into(), diff --git a/compiler/rustc_target/src/spec/x86_64_fuchsia.rs b/compiler/rustc_target/src/spec/x86_64_fuchsia.rs index 39f010773df4..3a2a032e5354 100644 --- a/compiler/rustc_target/src/spec/x86_64_fuchsia.rs +++ b/compiler/rustc_target/src/spec/x86_64_fuchsia.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-fuchsia".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_linux_android.rs b/compiler/rustc_target/src/spec/x86_64_linux_android.rs index a70c6b670915..2a3aaa932b45 100644 --- a/compiler/rustc_target/src/spec/x86_64_linux_android.rs +++ b/compiler/rustc_target/src/spec/x86_64_linux_android.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-linux-android".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_linux_kernel.rs b/compiler/rustc_target/src/spec/x86_64_linux_kernel.rs index 7dde4a87be1c..1ebe53b891f6 100644 --- a/compiler/rustc_target/src/spec/x86_64_linux_kernel.rs +++ b/compiler/rustc_target/src/spec/x86_64_linux_kernel.rs @@ -16,7 +16,6 @@ pub fn target() -> Target { Target { // FIXME: Some dispute, the linux-on-clang folks think this should use "Linux" llvm_target: "x86_64-elf".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs b/compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs index a8278dbc6a44..5721d01503be 100644 --- a/compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-pc-windows-gnu".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/x86_64_pc_windows_msvc.rs index 741ca81c9536..94dbfdafc388 100644 --- a/compiler/rustc_target/src/spec/x86_64_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/x86_64_pc_windows_msvc.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-pc-windows-msvc".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_rumprun_netbsd.rs b/compiler/rustc_target/src/spec/x86_64_rumprun_netbsd.rs index 95c53d11afbf..1ed9cd0af204 100644 --- a/compiler/rustc_target/src/spec/x86_64_rumprun_netbsd.rs +++ b/compiler/rustc_target/src/spec/x86_64_rumprun_netbsd.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-rumprun-netbsd".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_sun_solaris.rs b/compiler/rustc_target/src/spec/x86_64_sun_solaris.rs index d427e5a297ed..879060c6d081 100644 --- a/compiler/rustc_target/src/spec/x86_64_sun_solaris.rs +++ b/compiler/rustc_target/src/spec/x86_64_sun_solaris.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-pc-solaris".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_cloudabi.rs b/compiler/rustc_target/src/spec/x86_64_unknown_cloudabi.rs index 1f463994ca67..87fabb3ee452 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_cloudabi.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_cloudabi.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-unknown-cloudabi".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_dragonfly.rs b/compiler/rustc_target/src/spec/x86_64_unknown_dragonfly.rs index 5c9359da1a14..b4dfb6a9e0ca 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_dragonfly.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_dragonfly.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-unknown-dragonfly".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_freebsd.rs b/compiler/rustc_target/src/spec/x86_64_unknown_freebsd.rs index 9172c0203b9c..884a00f98440 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_freebsd.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-unknown-freebsd".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_haiku.rs b/compiler/rustc_target/src/spec/x86_64_unknown_haiku.rs index ee5074d8c725..18d68596e12e 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_haiku.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_haiku.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-unknown-haiku".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_hermit.rs b/compiler/rustc_target/src/spec/x86_64_unknown_hermit.rs index 3faa0bb14699..a00627f343f4 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_hermit.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_hermit.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-unknown-hermit".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_hermit_kernel.rs b/compiler/rustc_target/src/spec/x86_64_unknown_hermit_kernel.rs index f8e2025eb005..08f501e3bb06 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_hermit_kernel.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_hermit_kernel.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-unknown-hermit".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_illumos.rs b/compiler/rustc_target/src/spec/x86_64_unknown_illumos.rs index e350efc79434..51fd05c27126 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_illumos.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_illumos.rs @@ -10,7 +10,6 @@ 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".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_l4re_uclibc.rs b/compiler/rustc_target/src/spec/x86_64_unknown_l4re_uclibc.rs index a1677fb65afd..956f31973f61 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_l4re_uclibc.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_l4re_uclibc.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-unknown-l4re-uclibc".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs index a737b0fdd49a..e5578ae67a22 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-unknown-linux-gnu".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnux32.rs b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnux32.rs index 8e3762ab190a..96d172411ec6 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnux32.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnux32.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-unknown-linux-gnux32".to_string(), - target_endian: "little".to_string(), pointer_width: 32, data_layout: "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i64:64-f80:128-n8:16:32:64-S128" diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/x86_64_unknown_linux_musl.rs index c866101ec548..343b6677bb50 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_linux_musl.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-unknown-linux-musl".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_netbsd.rs b/compiler/rustc_target/src/spec/x86_64_unknown_netbsd.rs index 7c8980a1d01c..76c741516cbf 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_netbsd.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-unknown-netbsd".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_openbsd.rs b/compiler/rustc_target/src/spec/x86_64_unknown_openbsd.rs index 06f6e6479886..6dc749ef05e6 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_openbsd.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-unknown-openbsd".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_redox.rs b/compiler/rustc_target/src/spec/x86_64_unknown_redox.rs index 2701562e3ef1..824502cb7916 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_redox.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_redox.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-unknown-redox".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs b/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs index cc3784928c53..23e73c423f67 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs @@ -30,7 +30,6 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-unknown-windows".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_uwp_windows_gnu.rs b/compiler/rustc_target/src/spec/x86_64_uwp_windows_gnu.rs index f23808e1680c..c156a3a214fc 100644 --- a/compiler/rustc_target/src/spec/x86_64_uwp_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/x86_64_uwp_windows_gnu.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-pc-windows-gnu".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/x86_64_uwp_windows_msvc.rs index 126da3996bb7..d5186fb2093a 100644 --- a/compiler/rustc_target/src/spec/x86_64_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/x86_64_uwp_windows_msvc.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-pc-windows-msvc".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_wrs_vxworks.rs b/compiler/rustc_target/src/spec/x86_64_wrs_vxworks.rs index 53ea4e04c41d..4a40ebffcf8d 100644 --- a/compiler/rustc_target/src/spec/x86_64_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/x86_64_wrs_vxworks.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-unknown-linux-gnu".to_string(), - target_endian: "little".to_string(), pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), From 74ffb9b4a2846dd44ece0583a869df0ca8581268 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Thu, 8 Oct 2020 20:54:45 +0300 Subject: [PATCH 3/7] rustc_target: Move `target_os` from `Target` to `TargetOptions` --- .../rustc_target/src/spec/aarch64_apple_darwin.rs | 3 +-- .../rustc_target/src/spec/aarch64_apple_ios.rs | 3 +-- .../rustc_target/src/spec/aarch64_apple_tvos.rs | 3 +-- compiler/rustc_target/src/spec/aarch64_fuchsia.rs | 1 - .../src/spec/aarch64_linux_android.rs | 1 - .../src/spec/aarch64_pc_windows_msvc.rs | 1 - .../src/spec/aarch64_unknown_cloudabi.rs | 1 - .../src/spec/aarch64_unknown_freebsd.rs | 1 - .../src/spec/aarch64_unknown_hermit.rs | 1 - .../src/spec/aarch64_unknown_linux_gnu.rs | 1 - .../src/spec/aarch64_unknown_linux_musl.rs | 1 - .../src/spec/aarch64_unknown_netbsd.rs | 1 - .../rustc_target/src/spec/aarch64_unknown_none.rs | 1 - .../src/spec/aarch64_unknown_none_softfloat.rs | 1 - .../src/spec/aarch64_unknown_openbsd.rs | 1 - .../src/spec/aarch64_unknown_redox.rs | 1 - .../src/spec/aarch64_uwp_windows_msvc.rs | 1 - .../rustc_target/src/spec/aarch64_wrs_vxworks.rs | 1 - compiler/rustc_target/src/spec/android_base.rs | 1 + compiler/rustc_target/src/spec/apple_base.rs | 3 ++- compiler/rustc_target/src/spec/apple_sdk_base.rs | 4 ++-- .../src/spec/arm_linux_androideabi.rs | 1 - .../src/spec/arm_unknown_linux_gnueabi.rs | 1 - .../src/spec/arm_unknown_linux_gnueabihf.rs | 1 - .../src/spec/arm_unknown_linux_musleabi.rs | 1 - .../src/spec/arm_unknown_linux_musleabihf.rs | 1 - .../rustc_target/src/spec/armebv7r_none_eabi.rs | 1 - .../rustc_target/src/spec/armebv7r_none_eabihf.rs | 1 - .../src/spec/armv4t_unknown_linux_gnueabi.rs | 1 - .../src/spec/armv5te_unknown_linux_gnueabi.rs | 1 - .../src/spec/armv5te_unknown_linux_musleabi.rs | 1 - .../src/spec/armv6_unknown_freebsd.rs | 1 - .../src/spec/armv6_unknown_netbsd_eabihf.rs | 1 - compiler/rustc_target/src/spec/armv7_apple_ios.rs | 3 +-- .../src/spec/armv7_linux_androideabi.rs | 1 - .../src/spec/armv7_unknown_cloudabi_eabihf.rs | 1 - .../src/spec/armv7_unknown_freebsd.rs | 1 - .../src/spec/armv7_unknown_linux_gnueabi.rs | 1 - .../src/spec/armv7_unknown_linux_gnueabihf.rs | 1 - .../src/spec/armv7_unknown_linux_musleabi.rs | 1 - .../src/spec/armv7_unknown_linux_musleabihf.rs | 1 - .../src/spec/armv7_unknown_netbsd_eabihf.rs | 1 - .../src/spec/armv7_wrs_vxworks_eabihf.rs | 1 - .../rustc_target/src/spec/armv7a_none_eabi.rs | 1 - .../rustc_target/src/spec/armv7a_none_eabihf.rs | 1 - .../rustc_target/src/spec/armv7r_none_eabi.rs | 1 - .../rustc_target/src/spec/armv7r_none_eabihf.rs | 1 - .../rustc_target/src/spec/armv7s_apple_ios.rs | 3 +-- compiler/rustc_target/src/spec/avr_gnu_base.rs | 2 +- compiler/rustc_target/src/spec/cloudabi_base.rs | 1 + compiler/rustc_target/src/spec/dragonfly_base.rs | 1 + compiler/rustc_target/src/spec/freebsd_base.rs | 1 + compiler/rustc_target/src/spec/fuchsia_base.rs | 1 + compiler/rustc_target/src/spec/haiku_base.rs | 1 + compiler/rustc_target/src/spec/hermit_base.rs | 1 + .../rustc_target/src/spec/hermit_kernel_base.rs | 1 + .../src/spec/hexagon_unknown_linux_musl.rs | 1 - compiler/rustc_target/src/spec/i386_apple_ios.rs | 3 +-- .../rustc_target/src/spec/i686_apple_darwin.rs | 3 +-- .../rustc_target/src/spec/i686_linux_android.rs | 1 - .../rustc_target/src/spec/i686_pc_windows_gnu.rs | 1 - .../rustc_target/src/spec/i686_pc_windows_msvc.rs | 1 - .../src/spec/i686_unknown_cloudabi.rs | 1 - .../rustc_target/src/spec/i686_unknown_freebsd.rs | 1 - .../rustc_target/src/spec/i686_unknown_haiku.rs | 1 - .../src/spec/i686_unknown_linux_gnu.rs | 1 - .../src/spec/i686_unknown_linux_musl.rs | 1 - .../rustc_target/src/spec/i686_unknown_netbsd.rs | 1 - .../rustc_target/src/spec/i686_unknown_openbsd.rs | 1 - .../rustc_target/src/spec/i686_unknown_uefi.rs | 1 - .../rustc_target/src/spec/i686_uwp_windows_gnu.rs | 1 - .../src/spec/i686_uwp_windows_msvc.rs | 1 - .../rustc_target/src/spec/i686_wrs_vxworks.rs | 1 - compiler/rustc_target/src/spec/illumos_base.rs | 1 + compiler/rustc_target/src/spec/l4re_base.rs | 1 + compiler/rustc_target/src/spec/linux_base.rs | 1 + .../src/spec/mips64_unknown_linux_gnuabi64.rs | 1 - .../src/spec/mips64_unknown_linux_muslabi64.rs | 1 - .../src/spec/mips64el_unknown_linux_gnuabi64.rs | 1 - .../src/spec/mips64el_unknown_linux_muslabi64.rs | 1 - .../src/spec/mips_unknown_linux_gnu.rs | 1 - .../src/spec/mips_unknown_linux_musl.rs | 1 - .../src/spec/mips_unknown_linux_uclibc.rs | 1 - compiler/rustc_target/src/spec/mipsel_sony_psp.rs | 2 +- .../src/spec/mipsel_unknown_linux_gnu.rs | 1 - .../src/spec/mipsel_unknown_linux_musl.rs | 1 - .../src/spec/mipsel_unknown_linux_uclibc.rs | 1 - .../src/spec/mipsisa32r6_unknown_linux_gnu.rs | 1 - .../src/spec/mipsisa32r6el_unknown_linux_gnu.rs | 1 - .../spec/mipsisa64r6_unknown_linux_gnuabi64.rs | 1 - .../spec/mipsisa64r6el_unknown_linux_gnuabi64.rs | 1 - compiler/rustc_target/src/spec/mod.rs | 15 +++++++++++---- compiler/rustc_target/src/spec/msp430_none_elf.rs | 1 - compiler/rustc_target/src/spec/netbsd_base.rs | 1 + .../rustc_target/src/spec/nvptx64_nvidia_cuda.rs | 2 +- compiler/rustc_target/src/spec/openbsd_base.rs | 1 + .../src/spec/powerpc64_unknown_freebsd.rs | 1 - .../src/spec/powerpc64_unknown_linux_gnu.rs | 1 - .../src/spec/powerpc64_unknown_linux_musl.rs | 1 - .../src/spec/powerpc64_wrs_vxworks.rs | 1 - .../src/spec/powerpc64le_unknown_linux_gnu.rs | 1 - .../src/spec/powerpc64le_unknown_linux_musl.rs | 1 - .../src/spec/powerpc_unknown_linux_gnu.rs | 1 - .../src/spec/powerpc_unknown_linux_gnuspe.rs | 1 - .../src/spec/powerpc_unknown_linux_musl.rs | 1 - .../src/spec/powerpc_unknown_netbsd.rs | 1 - .../rustc_target/src/spec/powerpc_wrs_vxworks.rs | 1 - .../src/spec/powerpc_wrs_vxworks_spe.rs | 1 - compiler/rustc_target/src/spec/redox_base.rs | 1 + .../src/spec/riscv32gc_unknown_linux_gnu.rs | 1 - .../src/spec/riscv32i_unknown_none_elf.rs | 1 - .../src/spec/riscv32imac_unknown_none_elf.rs | 1 - .../src/spec/riscv32imc_unknown_none_elf.rs | 1 - .../src/spec/riscv64gc_unknown_linux_gnu.rs | 1 - .../src/spec/riscv64gc_unknown_none_elf.rs | 1 - .../src/spec/riscv64imac_unknown_none_elf.rs | 1 - .../src/spec/s390x_unknown_linux_gnu.rs | 1 - compiler/rustc_target/src/spec/solaris_base.rs | 1 + .../src/spec/sparc64_unknown_linux_gnu.rs | 1 - .../src/spec/sparc64_unknown_netbsd.rs | 1 - .../src/spec/sparc64_unknown_openbsd.rs | 1 - .../src/spec/sparc_unknown_linux_gnu.rs | 1 - .../rustc_target/src/spec/sparcv9_sun_solaris.rs | 1 - .../rustc_target/src/spec/thumbv4t_none_eabi.rs | 1 - .../rustc_target/src/spec/thumbv6m_none_eabi.rs | 1 - .../src/spec/thumbv7a_pc_windows_msvc.rs | 1 - .../src/spec/thumbv7a_uwp_windows_msvc.rs | 1 - .../rustc_target/src/spec/thumbv7em_none_eabi.rs | 1 - .../src/spec/thumbv7em_none_eabihf.rs | 1 - .../rustc_target/src/spec/thumbv7m_none_eabi.rs | 1 - .../src/spec/thumbv7neon_linux_androideabi.rs | 1 - .../spec/thumbv7neon_unknown_linux_gnueabihf.rs | 1 - .../spec/thumbv7neon_unknown_linux_musleabihf.rs | 1 - .../src/spec/thumbv8m_base_none_eabi.rs | 1 - .../src/spec/thumbv8m_main_none_eabi.rs | 1 - .../src/spec/thumbv8m_main_none_eabihf.rs | 1 - compiler/rustc_target/src/spec/uefi_msvc_base.rs | 1 + compiler/rustc_target/src/spec/vxworks_base.rs | 1 + .../src/spec/wasm32_unknown_emscripten.rs | 2 +- .../src/spec/wasm32_unknown_unknown.rs | 2 +- compiler/rustc_target/src/spec/wasm32_wasi.rs | 2 +- .../rustc_target/src/spec/windows_gnu_base.rs | 1 + .../rustc_target/src/spec/windows_msvc_base.rs | 1 + .../rustc_target/src/spec/x86_64_apple_darwin.rs | 3 +-- .../rustc_target/src/spec/x86_64_apple_ios.rs | 3 +-- .../src/spec/x86_64_apple_ios_macabi.rs | 3 +-- .../rustc_target/src/spec/x86_64_apple_tvos.rs | 3 +-- .../src/spec/x86_64_fortanix_unknown_sgx.rs | 2 +- compiler/rustc_target/src/spec/x86_64_fuchsia.rs | 1 - .../rustc_target/src/spec/x86_64_linux_android.rs | 1 - .../rustc_target/src/spec/x86_64_linux_kernel.rs | 1 - .../src/spec/x86_64_pc_windows_gnu.rs | 1 - .../src/spec/x86_64_pc_windows_msvc.rs | 1 - .../src/spec/x86_64_rumprun_netbsd.rs | 1 - .../rustc_target/src/spec/x86_64_sun_solaris.rs | 1 - .../src/spec/x86_64_unknown_cloudabi.rs | 1 - .../src/spec/x86_64_unknown_dragonfly.rs | 1 - .../src/spec/x86_64_unknown_freebsd.rs | 1 - .../rustc_target/src/spec/x86_64_unknown_haiku.rs | 1 - .../src/spec/x86_64_unknown_hermit.rs | 1 - .../src/spec/x86_64_unknown_hermit_kernel.rs | 1 - .../src/spec/x86_64_unknown_illumos.rs | 1 - .../src/spec/x86_64_unknown_l4re_uclibc.rs | 1 - .../src/spec/x86_64_unknown_linux_gnu.rs | 1 - .../src/spec/x86_64_unknown_linux_gnux32.rs | 1 - .../src/spec/x86_64_unknown_linux_musl.rs | 1 - .../src/spec/x86_64_unknown_netbsd.rs | 1 - .../src/spec/x86_64_unknown_openbsd.rs | 1 - .../rustc_target/src/spec/x86_64_unknown_redox.rs | 1 - .../rustc_target/src/spec/x86_64_unknown_uefi.rs | 1 - .../src/spec/x86_64_uwp_windows_gnu.rs | 1 - .../src/spec/x86_64_uwp_windows_msvc.rs | 1 - .../rustc_target/src/spec/x86_64_wrs_vxworks.rs | 1 - 173 files changed, 52 insertions(+), 169 deletions(-) diff --git a/compiler/rustc_target/src/spec/aarch64_apple_darwin.rs b/compiler/rustc_target/src/spec/aarch64_apple_darwin.rs index ff15f32ca9d6..201b13a0f8ac 100644 --- a/compiler/rustc_target/src/spec/aarch64_apple_darwin.rs +++ b/compiler/rustc_target/src/spec/aarch64_apple_darwin.rs @@ -1,7 +1,7 @@ use crate::spec::{LinkerFlavor, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::apple_base::opts(); + let mut base = super::apple_base::opts("macos"); base.cpu = "apple-a12".to_string(); base.max_atomic_width = Some(128); base.pre_link_args.insert(LinkerFlavor::Gcc, vec!["-arch".to_string(), "arm64".to_string()]); @@ -19,7 +19,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".to_string(), arch: arch.to_string(), - target_os: "macos".to_string(), target_env: String::new(), target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/aarch64_apple_ios.rs b/compiler/rustc_target/src/spec/aarch64_apple_ios.rs index ce59163e0aad..0c63b9649e80 100644 --- a/compiler/rustc_target/src/spec/aarch64_apple_ios.rs +++ b/compiler/rustc_target/src/spec/aarch64_apple_ios.rs @@ -2,13 +2,12 @@ use crate::spec::{LinkerFlavor, Target, TargetOptions}; pub fn target() -> Target { - let base = opts(Arch::Arm64); + let base = opts("ios", Arch::Arm64); Target { llvm_target: "arm64-apple-ios".to_string(), pointer_width: 64, data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_os: "ios".to_string(), target_env: String::new(), target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/aarch64_apple_tvos.rs b/compiler/rustc_target/src/spec/aarch64_apple_tvos.rs index a8126c81add9..c81a215b7f63 100644 --- a/compiler/rustc_target/src/spec/aarch64_apple_tvos.rs +++ b/compiler/rustc_target/src/spec/aarch64_apple_tvos.rs @@ -2,13 +2,12 @@ use crate::spec::{LinkerFlavor, Target, TargetOptions}; pub fn target() -> Target { - let base = opts(Arch::Arm64); + let base = opts("tvos", Arch::Arm64); Target { llvm_target: "arm64-apple-tvos".to_string(), pointer_width: 64, data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_os: "tvos".to_string(), target_env: String::new(), target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/aarch64_fuchsia.rs b/compiler/rustc_target/src/spec/aarch64_fuchsia.rs index 65254d5d0194..ffaf7453dd65 100644 --- a/compiler/rustc_target/src/spec/aarch64_fuchsia.rs +++ b/compiler/rustc_target/src/spec/aarch64_fuchsia.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_os: "fuchsia".to_string(), target_env: String::new(), target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/aarch64_linux_android.rs b/compiler/rustc_target/src/spec/aarch64_linux_android.rs index caf17fe4e0b5..ed859c03209d 100644 --- a/compiler/rustc_target/src/spec/aarch64_linux_android.rs +++ b/compiler/rustc_target/src/spec/aarch64_linux_android.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_os: "android".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/aarch64_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/aarch64_pc_windows_msvc.rs index 382e2b9272a6..6bef3914b4c0 100644 --- a/compiler/rustc_target/src/spec/aarch64_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/aarch64_pc_windows_msvc.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_os: "windows".to_string(), target_env: "msvc".to_string(), target_vendor: "pc".to_string(), linker_flavor: LinkerFlavor::Msvc, diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_cloudabi.rs b/compiler/rustc_target/src/spec/aarch64_unknown_cloudabi.rs index ab8e5ad07556..9ad1e5ba36ca 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_cloudabi.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_cloudabi.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_os: "cloudabi".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_freebsd.rs b/compiler/rustc_target/src/spec/aarch64_unknown_freebsd.rs index c2dd63e6fc44..5e704567b69d 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_freebsd.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_os: "freebsd".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs b/compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs index 541c485f7acd..5b4c7a2a6f69 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_os: "hermit".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs index 58b461bf0d6d..99f841989eba 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { target_env: "gnu".to_string(), data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_os: "linux".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/aarch64_unknown_linux_musl.rs index 391672365f90..e3892cc74518 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_linux_musl.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { target_env: "musl".to_string(), data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_os: "linux".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_netbsd.rs b/compiler/rustc_target/src/spec/aarch64_unknown_netbsd.rs index 08b54edf4fdf..c601d847784c 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_netbsd.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_os: "netbsd".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_none.rs b/compiler/rustc_target/src/spec/aarch64_unknown_none.rs index 6f24787d8fab..03b9f53a5325 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_none.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_none.rs @@ -24,7 +24,6 @@ pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-none".to_string(), pointer_width: 64, - target_os: "none".to_string(), target_env: String::new(), target_vendor: String::new(), data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_none_softfloat.rs b/compiler/rustc_target/src/spec/aarch64_unknown_none_softfloat.rs index b72c1600397c..a1fbe5b58197 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_none_softfloat.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_none_softfloat.rs @@ -24,7 +24,6 @@ pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-none".to_string(), pointer_width: 64, - target_os: "none".to_string(), target_env: String::new(), target_vendor: String::new(), data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_openbsd.rs b/compiler/rustc_target/src/spec/aarch64_unknown_openbsd.rs index 0f50da1e86c3..fefab5df9ae8 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_openbsd.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_os: "openbsd".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_redox.rs b/compiler/rustc_target/src/spec/aarch64_unknown_redox.rs index c2c00af03800..fcdc0e873a01 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_redox.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_redox.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_os: "redox".to_string(), target_env: "relibc".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/aarch64_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/aarch64_uwp_windows_msvc.rs index 143e6651c6be..5b80d55cb0ab 100644 --- a/compiler/rustc_target/src/spec/aarch64_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/aarch64_uwp_windows_msvc.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_os: "windows".to_string(), target_env: "msvc".to_string(), target_vendor: "uwp".to_string(), linker_flavor: LinkerFlavor::Msvc, diff --git a/compiler/rustc_target/src/spec/aarch64_wrs_vxworks.rs b/compiler/rustc_target/src/spec/aarch64_wrs_vxworks.rs index a0ba61ca83e6..411814b2206f 100644 --- a/compiler/rustc_target/src/spec/aarch64_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/aarch64_wrs_vxworks.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_os: "vxworks".to_string(), target_env: "gnu".to_string(), target_vendor: "wrs".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/android_base.rs b/compiler/rustc_target/src/spec/android_base.rs index 0824bc303582..1bd5eb6988c2 100644 --- a/compiler/rustc_target/src/spec/android_base.rs +++ b/compiler/rustc_target/src/spec/android_base.rs @@ -2,6 +2,7 @@ pub fn opts() -> TargetOptions { let mut base = super::linux_base::opts(); + base.target_os = "android".to_string(); // Many of the symbols defined in compiler-rt are also defined in libgcc. // Android's linker doesn't like that by default. base.pre_link_args diff --git a/compiler/rustc_target/src/spec/apple_base.rs b/compiler/rustc_target/src/spec/apple_base.rs index 2e3c835c0e5e..9532ff4bf50f 100644 --- a/compiler/rustc_target/src/spec/apple_base.rs +++ b/compiler/rustc_target/src/spec/apple_base.rs @@ -2,7 +2,7 @@ use crate::spec::{LinkArgs, TargetOptions}; -pub fn opts() -> TargetOptions { +pub fn opts(os: &str) -> TargetOptions { // ELF TLS is only available in macOS 10.7+. If you try to compile for 10.6 // either the linker will complain if it is used or the binary will end up // segfaulting at runtime when run on 10.6. Rust by default supports macOS @@ -17,6 +17,7 @@ pub fn opts() -> TargetOptions { let version = macos_deployment_target(); TargetOptions { + target_os: os.to_string(), // macOS has -dead_strip, which doesn't rely on function_sections function_sections: false, dynamic_linking: true, diff --git a/compiler/rustc_target/src/spec/apple_sdk_base.rs b/compiler/rustc_target/src/spec/apple_sdk_base.rs index 1b17c2c278f9..092401f11462 100644 --- a/compiler/rustc_target/src/spec/apple_sdk_base.rs +++ b/compiler/rustc_target/src/spec/apple_sdk_base.rs @@ -31,7 +31,7 @@ fn link_env_remove(arch: Arch) -> Vec { } } -pub fn opts(arch: Arch) -> TargetOptions { +pub fn opts(os: &str, arch: Arch) -> TargetOptions { TargetOptions { cpu: target_cpu(arch), dynamic_linking: false, @@ -39,6 +39,6 @@ pub fn opts(arch: Arch) -> TargetOptions { link_env_remove: link_env_remove(arch), has_elf_tls: false, eliminate_frame_pointer: false, - ..super::apple_base::opts() + ..super::apple_base::opts(os) } } diff --git a/compiler/rustc_target/src/spec/arm_linux_androideabi.rs b/compiler/rustc_target/src/spec/arm_linux_androideabi.rs index f94b6c7cbbab..a2996655ee4f 100644 --- a/compiler/rustc_target/src/spec/arm_linux_androideabi.rs +++ b/compiler/rustc_target/src/spec/arm_linux_androideabi.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "android".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabi.rs index c0751eb4b030..495bb5477b61 100644 --- a/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabi.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "linux".to_string(), target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabihf.rs b/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabihf.rs index c218b8a033f6..32bed7fe0112 100644 --- a/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabihf.rs +++ b/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabihf.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "linux".to_string(), target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/arm_unknown_linux_musleabi.rs b/compiler/rustc_target/src/spec/arm_unknown_linux_musleabi.rs index 310a1c96e669..2b99f700a4cb 100644 --- a/compiler/rustc_target/src/spec/arm_unknown_linux_musleabi.rs +++ b/compiler/rustc_target/src/spec/arm_unknown_linux_musleabi.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "linux".to_string(), target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/arm_unknown_linux_musleabihf.rs b/compiler/rustc_target/src/spec/arm_unknown_linux_musleabihf.rs index b48886263fdb..e494e08d4e64 100644 --- a/compiler/rustc_target/src/spec/arm_unknown_linux_musleabihf.rs +++ b/compiler/rustc_target/src/spec/arm_unknown_linux_musleabihf.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "linux".to_string(), target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/armebv7r_none_eabi.rs b/compiler/rustc_target/src/spec/armebv7r_none_eabi.rs index 4f8371b5adda..3ba9c1028a72 100644 --- a/compiler/rustc_target/src/spec/armebv7r_none_eabi.rs +++ b/compiler/rustc_target/src/spec/armebv7r_none_eabi.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "none".to_string(), target_env: "".to_string(), target_vendor: "".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/armebv7r_none_eabihf.rs b/compiler/rustc_target/src/spec/armebv7r_none_eabihf.rs index 6b75e70ce5a7..cfa083275e56 100644 --- a/compiler/rustc_target/src/spec/armebv7r_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/armebv7r_none_eabihf.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "none".to_string(), target_env: String::new(), target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/armv4t_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/armv4t_unknown_linux_gnueabi.rs index cc7f1bb28d13..5af602c47147 100644 --- a/compiler/rustc_target/src/spec/armv4t_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/armv4t_unknown_linux_gnueabi.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "linux".to_string(), target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/armv5te_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/armv5te_unknown_linux_gnueabi.rs index 75e0d4a3db7f..8775d8bd58a6 100644 --- a/compiler/rustc_target/src/spec/armv5te_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/armv5te_unknown_linux_gnueabi.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "linux".to_string(), target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/armv5te_unknown_linux_musleabi.rs b/compiler/rustc_target/src/spec/armv5te_unknown_linux_musleabi.rs index 834b4b389996..da727657cb4e 100644 --- a/compiler/rustc_target/src/spec/armv5te_unknown_linux_musleabi.rs +++ b/compiler/rustc_target/src/spec/armv5te_unknown_linux_musleabi.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "linux".to_string(), target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/armv6_unknown_freebsd.rs b/compiler/rustc_target/src/spec/armv6_unknown_freebsd.rs index 1cd6fae21524..6c03b4840ed6 100644 --- a/compiler/rustc_target/src/spec/armv6_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/armv6_unknown_freebsd.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "freebsd".to_string(), target_env: "gnueabihf".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/armv6_unknown_netbsd_eabihf.rs b/compiler/rustc_target/src/spec/armv6_unknown_netbsd_eabihf.rs index 9cda99457262..75ce18f8dd99 100644 --- a/compiler/rustc_target/src/spec/armv6_unknown_netbsd_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv6_unknown_netbsd_eabihf.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "netbsd".to_string(), target_env: "eabihf".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/armv7_apple_ios.rs b/compiler/rustc_target/src/spec/armv7_apple_ios.rs index 3df6c2f7c562..3fa2abd3b2a4 100644 --- a/compiler/rustc_target/src/spec/armv7_apple_ios.rs +++ b/compiler/rustc_target/src/spec/armv7_apple_ios.rs @@ -2,13 +2,12 @@ use crate::spec::{LinkerFlavor, Target, TargetOptions}; pub fn target() -> Target { - let base = opts(Arch::Armv7); + let base = opts("ios", Arch::Armv7); Target { llvm_target: "armv7-apple-ios".to_string(), 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".to_string(), arch: "arm".to_string(), - target_os: "ios".to_string(), target_env: String::new(), target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/armv7_linux_androideabi.rs b/compiler/rustc_target/src/spec/armv7_linux_androideabi.rs index 34ffe21d0cf1..ff95bcb61178 100644 --- a/compiler/rustc_target/src/spec/armv7_linux_androideabi.rs +++ b/compiler/rustc_target/src/spec/armv7_linux_androideabi.rs @@ -19,7 +19,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "android".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/armv7_unknown_cloudabi_eabihf.rs b/compiler/rustc_target/src/spec/armv7_unknown_cloudabi_eabihf.rs index e29b9bfee126..e712d7e26904 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_cloudabi_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_cloudabi_eabihf.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "cloudabi".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/armv7_unknown_freebsd.rs b/compiler/rustc_target/src/spec/armv7_unknown_freebsd.rs index ca96dccc8470..4e26db53f5d1 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_freebsd.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "freebsd".to_string(), target_env: "gnueabihf".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabi.rs index b0251a3d9cb0..7f31f6183c05 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabi.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "linux".to_string(), target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabihf.rs b/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabihf.rs index 97c2fe21d339..edbd923a3d5e 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabihf.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabihf.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "linux".to_string(), target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabi.rs b/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabi.rs index 095a7c80879c..0200ab7240c0 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabi.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabi.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "linux".to_string(), target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabihf.rs b/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabihf.rs index 414ab7fccf79..5bd32d8aaddf 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabihf.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabihf.rs @@ -12,7 +12,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "linux".to_string(), target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/armv7_unknown_netbsd_eabihf.rs b/compiler/rustc_target/src/spec/armv7_unknown_netbsd_eabihf.rs index c25a23d8231b..5d8eab0c4143 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_netbsd_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_netbsd_eabihf.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "netbsd".to_string(), target_env: "eabihf".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/armv7_wrs_vxworks_eabihf.rs b/compiler/rustc_target/src/spec/armv7_wrs_vxworks_eabihf.rs index e40086dfea48..3615dbce01f5 100644 --- a/compiler/rustc_target/src/spec/armv7_wrs_vxworks_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv7_wrs_vxworks_eabihf.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "vxworks".to_string(), target_env: "gnu".to_string(), target_vendor: "wrs".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/armv7a_none_eabi.rs b/compiler/rustc_target/src/spec/armv7a_none_eabi.rs index c84dbcace720..464d66473cfd 100644 --- a/compiler/rustc_target/src/spec/armv7a_none_eabi.rs +++ b/compiler/rustc_target/src/spec/armv7a_none_eabi.rs @@ -35,7 +35,6 @@ pub fn target() -> Target { Target { llvm_target: "armv7a-none-eabi".to_string(), pointer_width: 32, - target_os: "none".to_string(), target_env: String::new(), target_vendor: String::new(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7a_none_eabihf.rs b/compiler/rustc_target/src/spec/armv7a_none_eabihf.rs index 432b841ca7d3..9f0d91af3e99 100644 --- a/compiler/rustc_target/src/spec/armv7a_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv7a_none_eabihf.rs @@ -23,7 +23,6 @@ pub fn target() -> Target { Target { llvm_target: "armv7a-none-eabihf".to_string(), pointer_width: 32, - target_os: "none".to_string(), target_env: String::new(), target_vendor: String::new(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7r_none_eabi.rs b/compiler/rustc_target/src/spec/armv7r_none_eabi.rs index 54f105639ffc..ad2726e6508e 100644 --- a/compiler/rustc_target/src/spec/armv7r_none_eabi.rs +++ b/compiler/rustc_target/src/spec/armv7r_none_eabi.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "none".to_string(), target_env: "".to_string(), target_vendor: "".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/armv7r_none_eabihf.rs b/compiler/rustc_target/src/spec/armv7r_none_eabihf.rs index 7efc0e31da19..bed0126b3d91 100644 --- a/compiler/rustc_target/src/spec/armv7r_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv7r_none_eabihf.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "none".to_string(), target_env: "".to_string(), target_vendor: "".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/armv7s_apple_ios.rs b/compiler/rustc_target/src/spec/armv7s_apple_ios.rs index 85892eaf065b..fdcb097fb5d8 100644 --- a/compiler/rustc_target/src/spec/armv7s_apple_ios.rs +++ b/compiler/rustc_target/src/spec/armv7s_apple_ios.rs @@ -2,13 +2,12 @@ use crate::spec::{LinkerFlavor, Target, TargetOptions}; pub fn target() -> Target { - let base = opts(Arch::Armv7s); + let base = opts("ios", Arch::Armv7s); Target { llvm_target: "armv7s-apple-ios".to_string(), 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".to_string(), arch: "arm".to_string(), - target_os: "ios".to_string(), target_env: String::new(), target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/avr_gnu_base.rs b/compiler/rustc_target/src/spec/avr_gnu_base.rs index e2340efadefd..65271c2cb77b 100644 --- a/compiler/rustc_target/src/spec/avr_gnu_base.rs +++ b/compiler/rustc_target/src/spec/avr_gnu_base.rs @@ -10,11 +10,11 @@ pub fn target(target_cpu: String) -> Target { llvm_target: "avr-unknown-unknown".to_string(), pointer_width: 16, linker_flavor: LinkerFlavor::Gcc, - target_os: "unknown".to_string(), target_env: "".to_string(), target_vendor: "unknown".to_string(), options: TargetOptions { target_c_int_width: "16".to_string(), + target_os: "unknown".to_string(), cpu: target_cpu.clone(), exe_suffix: ".elf".to_string(), diff --git a/compiler/rustc_target/src/spec/cloudabi_base.rs b/compiler/rustc_target/src/spec/cloudabi_base.rs index 39039435f581..0053adb85525 100644 --- a/compiler/rustc_target/src/spec/cloudabi_base.rs +++ b/compiler/rustc_target/src/spec/cloudabi_base.rs @@ -12,6 +12,7 @@ pub fn opts() -> TargetOptions { ); TargetOptions { + target_os: "cloudabi".to_string(), executables: true, target_family: None, linker_is_gnu: true, diff --git a/compiler/rustc_target/src/spec/dragonfly_base.rs b/compiler/rustc_target/src/spec/dragonfly_base.rs index 82dc5f546592..a182e37dd803 100644 --- a/compiler/rustc_target/src/spec/dragonfly_base.rs +++ b/compiler/rustc_target/src/spec/dragonfly_base.rs @@ -16,6 +16,7 @@ pub fn opts() -> TargetOptions { ); TargetOptions { + target_os: "dragonfly".to_string(), dynamic_linking: true, executables: true, target_family: Some("unix".to_string()), diff --git a/compiler/rustc_target/src/spec/freebsd_base.rs b/compiler/rustc_target/src/spec/freebsd_base.rs index 051325a8df68..255351177436 100644 --- a/compiler/rustc_target/src/spec/freebsd_base.rs +++ b/compiler/rustc_target/src/spec/freebsd_base.rs @@ -16,6 +16,7 @@ pub fn opts() -> TargetOptions { ); TargetOptions { + target_os: "freebsd".to_string(), dynamic_linking: true, executables: true, target_family: Some("unix".to_string()), diff --git a/compiler/rustc_target/src/spec/fuchsia_base.rs b/compiler/rustc_target/src/spec/fuchsia_base.rs index 6f432dc11718..ffd06170d332 100644 --- a/compiler/rustc_target/src/spec/fuchsia_base.rs +++ b/compiler/rustc_target/src/spec/fuchsia_base.rs @@ -20,6 +20,7 @@ pub fn opts() -> TargetOptions { ); TargetOptions { + target_os: "fuchsia".to_string(), linker: Some("rust-lld".to_owned()), lld_flavor: LldFlavor::Ld, dynamic_linking: true, diff --git a/compiler/rustc_target/src/spec/haiku_base.rs b/compiler/rustc_target/src/spec/haiku_base.rs index 3d7ae6c302d9..3d9dd44e7867 100644 --- a/compiler/rustc_target/src/spec/haiku_base.rs +++ b/compiler/rustc_target/src/spec/haiku_base.rs @@ -2,6 +2,7 @@ pub fn opts() -> TargetOptions { TargetOptions { + target_os: "haiku".to_string(), dynamic_linking: true, executables: true, has_rpath: false, diff --git a/compiler/rustc_target/src/spec/hermit_base.rs b/compiler/rustc_target/src/spec/hermit_base.rs index e063c94cf2ca..e2d194afa18a 100644 --- a/compiler/rustc_target/src/spec/hermit_base.rs +++ b/compiler/rustc_target/src/spec/hermit_base.rs @@ -9,6 +9,7 @@ pub fn opts() -> TargetOptions { ); TargetOptions { + target_os: "hermit".to_string(), linker: Some("rust-lld".to_owned()), executables: true, has_elf_tls: true, diff --git a/compiler/rustc_target/src/spec/hermit_kernel_base.rs b/compiler/rustc_target/src/spec/hermit_kernel_base.rs index 01b9f75637fc..e20df9d15aae 100644 --- a/compiler/rustc_target/src/spec/hermit_kernel_base.rs +++ b/compiler/rustc_target/src/spec/hermit_kernel_base.rs @@ -9,6 +9,7 @@ pub fn opts() -> TargetOptions { ); TargetOptions { + target_os: "hermit".to_string(), disable_redzone: true, linker: Some("rust-lld".to_owned()), executables: true, diff --git a/compiler/rustc_target/src/spec/hexagon_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/hexagon_unknown_linux_musl.rs index f7df7fcff767..80ef0c747b7f 100644 --- a/compiler/rustc_target/src/spec/hexagon_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/hexagon_unknown_linux_musl.rs @@ -28,7 +28,6 @@ pub fn target() -> Target { ) .to_string(), arch: "hexagon".to_string(), - target_os: "linux".to_string(), target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/i386_apple_ios.rs b/compiler/rustc_target/src/spec/i386_apple_ios.rs index e3e13585af34..15b51be12896 100644 --- a/compiler/rustc_target/src/spec/i386_apple_ios.rs +++ b/compiler/rustc_target/src/spec/i386_apple_ios.rs @@ -2,7 +2,7 @@ use crate::spec::{LinkerFlavor, Target, TargetOptions}; pub fn target() -> Target { - let base = opts(Arch::I386); + let base = opts("ios", Arch::I386); Target { llvm_target: "i386-apple-ios".to_string(), pointer_width: 32, @@ -10,7 +10,6 @@ pub fn target() -> Target { f64:32:64-f80:128-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_os: "ios".to_string(), target_env: String::new(), target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/i686_apple_darwin.rs b/compiler/rustc_target/src/spec/i686_apple_darwin.rs index 2f5a3da57ab2..dae9654c5c4c 100644 --- a/compiler/rustc_target/src/spec/i686_apple_darwin.rs +++ b/compiler/rustc_target/src/spec/i686_apple_darwin.rs @@ -1,7 +1,7 @@ use crate::spec::{LinkerFlavor, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::apple_base::opts(); + let mut base = super::apple_base::opts("macos"); base.cpu = "yonah".to_string(); base.max_atomic_width = Some(64); base.pre_link_args.insert(LinkerFlavor::Gcc, vec!["-m32".to_string()]); @@ -22,7 +22,6 @@ pub fn target() -> Target { f64:32:64-f80:128-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_os: "macos".to_string(), target_env: String::new(), target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/i686_linux_android.rs b/compiler/rustc_target/src/spec/i686_linux_android.rs index f973ec163b10..cb6fbd929f0f 100644 --- a/compiler/rustc_target/src/spec/i686_linux_android.rs +++ b/compiler/rustc_target/src/spec/i686_linux_android.rs @@ -20,7 +20,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_os: "android".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs b/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs index 05cd6495448c..583938b2ab6c 100644 --- a/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs @@ -23,7 +23,6 @@ pub fn target() -> Target { i64:64-f80:32-n8:16:32-a:0:32-S32" .to_string(), arch: "x86".to_string(), - target_os: "windows".to_string(), target_env: "gnu".to_string(), target_vendor: "pc".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/i686_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/i686_pc_windows_msvc.rs index a9496dc0636f..067081105e41 100644 --- a/compiler/rustc_target/src/spec/i686_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/i686_pc_windows_msvc.rs @@ -27,7 +27,6 @@ pub fn target() -> Target { i64:64-f80:32-n8:16:32-a:0:32-S32" .to_string(), arch: "x86".to_string(), - target_os: "windows".to_string(), target_env: "msvc".to_string(), target_vendor: "pc".to_string(), linker_flavor: LinkerFlavor::Msvc, diff --git a/compiler/rustc_target/src/spec/i686_unknown_cloudabi.rs b/compiler/rustc_target/src/spec/i686_unknown_cloudabi.rs index 1e7cafe785ee..cf9853320842 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_cloudabi.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_cloudabi.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_os: "cloudabi".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/i686_unknown_freebsd.rs b/compiler/rustc_target/src/spec/i686_unknown_freebsd.rs index 7b03fbae90bf..6bc3da0796bd 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_freebsd.rs @@ -16,7 +16,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_os: "freebsd".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/i686_unknown_haiku.rs b/compiler/rustc_target/src/spec/i686_unknown_haiku.rs index 5e26a6f55403..77d138a15c9c 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_haiku.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_haiku.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_os: "haiku".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs index 209446e9851f..13be539d4c75 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_os: "linux".to_string(), target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/i686_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/i686_unknown_linux_musl.rs index 11f23e502338..ab69a5675487 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_linux_musl.rs @@ -29,7 +29,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_os: "linux".to_string(), target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/i686_unknown_netbsd.rs b/compiler/rustc_target/src/spec/i686_unknown_netbsd.rs index 7f94e9d65aec..505c9b55ca1a 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_netbsd.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_os: "netbsd".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/i686_unknown_openbsd.rs b/compiler/rustc_target/src/spec/i686_unknown_openbsd.rs index 8fc72fa3b8fb..a70573272ca2 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_openbsd.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_os: "openbsd".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/i686_unknown_uefi.rs b/compiler/rustc_target/src/spec/i686_unknown_uefi.rs index fcc1e77600fc..22249ded44b7 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_uefi.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_uefi.rs @@ -82,7 +82,6 @@ pub fn target() -> Target { data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i64:64-f80:32-n8:16:32-a:0:32-S32" .to_string(), - target_os: "uefi".to_string(), target_env: "".to_string(), target_vendor: "unknown".to_string(), arch: "x86".to_string(), diff --git a/compiler/rustc_target/src/spec/i686_uwp_windows_gnu.rs b/compiler/rustc_target/src/spec/i686_uwp_windows_gnu.rs index 1c8791974e68..199d47c5f246 100644 --- a/compiler/rustc_target/src/spec/i686_uwp_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/i686_uwp_windows_gnu.rs @@ -22,7 +22,6 @@ pub fn target() -> Target { i64:64-f80:32-n8:16:32-a:0:32-S32" .to_string(), arch: "x86".to_string(), - target_os: "windows".to_string(), target_env: "gnu".to_string(), target_vendor: "uwp".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/i686_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/i686_uwp_windows_msvc.rs index 962c69860ca9..de2f09dcf9aa 100644 --- a/compiler/rustc_target/src/spec/i686_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/i686_uwp_windows_msvc.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { i64:64-f80:32-n8:16:32-a:0:32-S32" .to_string(), arch: "x86".to_string(), - target_os: "windows".to_string(), target_env: "msvc".to_string(), target_vendor: "uwp".to_string(), linker_flavor: LinkerFlavor::Msvc, diff --git a/compiler/rustc_target/src/spec/i686_wrs_vxworks.rs b/compiler/rustc_target/src/spec/i686_wrs_vxworks.rs index 86c5ca1adbc5..dbf65ee1bfb1 100644 --- a/compiler/rustc_target/src/spec/i686_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/i686_wrs_vxworks.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_os: "vxworks".to_string(), target_env: "gnu".to_string(), target_vendor: "wrs".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/illumos_base.rs b/compiler/rustc_target/src/spec/illumos_base.rs index 214142b88fc2..625f7b18b251 100644 --- a/compiler/rustc_target/src/spec/illumos_base.rs +++ b/compiler/rustc_target/src/spec/illumos_base.rs @@ -16,6 +16,7 @@ pub fn opts() -> TargetOptions { ); TargetOptions { + target_os: "illumos".to_string(), dynamic_linking: true, executables: true, has_rpath: true, diff --git a/compiler/rustc_target/src/spec/l4re_base.rs b/compiler/rustc_target/src/spec/l4re_base.rs index 5caad10161d8..5237b9728b00 100644 --- a/compiler/rustc_target/src/spec/l4re_base.rs +++ b/compiler/rustc_target/src/spec/l4re_base.rs @@ -17,6 +17,7 @@ pub fn opts() -> TargetOptions { args.insert(LinkerFlavor::Gcc, vec![]); TargetOptions { + target_os: "l4re".to_string(), executables: true, has_elf_tls: false, panic_strategy: PanicStrategy::Abort, diff --git a/compiler/rustc_target/src/spec/linux_base.rs b/compiler/rustc_target/src/spec/linux_base.rs index 7ad972b06921..8758e1240849 100644 --- a/compiler/rustc_target/src/spec/linux_base.rs +++ b/compiler/rustc_target/src/spec/linux_base.rs @@ -19,6 +19,7 @@ pub fn opts() -> TargetOptions { ); TargetOptions { + target_os: "linux".to_string(), dynamic_linking: true, executables: true, target_family: Some("unix".to_string()), diff --git a/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs index e27d7d073bcb..1ca458dd73b4 100644 --- a/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), - target_os: "linux".to_string(), target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/mips64_unknown_linux_muslabi64.rs b/compiler/rustc_target/src/spec/mips64_unknown_linux_muslabi64.rs index f40f0e587ad3..3b715436c178 100644 --- a/compiler/rustc_target/src/spec/mips64_unknown_linux_muslabi64.rs +++ b/compiler/rustc_target/src/spec/mips64_unknown_linux_muslabi64.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), - target_os: "linux".to_string(), target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs index a54d0e4c307d..746f7c04eaa2 100644 --- a/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), - target_os: "linux".to_string(), target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/mips64el_unknown_linux_muslabi64.rs b/compiler/rustc_target/src/spec/mips64el_unknown_linux_muslabi64.rs index b9971c1ebb69..61d1a1145915 100644 --- a/compiler/rustc_target/src/spec/mips64el_unknown_linux_muslabi64.rs +++ b/compiler/rustc_target/src/spec/mips64el_unknown_linux_muslabi64.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), - target_os: "linux".to_string(), target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/mips_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/mips_unknown_linux_gnu.rs index 2eaed76e504e..0348446faabb 100644 --- a/compiler/rustc_target/src/spec/mips_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/mips_unknown_linux_gnu.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - target_os: "linux".to_string(), target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/mips_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/mips_unknown_linux_musl.rs index 47be91a89c70..b323b307041b 100644 --- a/compiler/rustc_target/src/spec/mips_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/mips_unknown_linux_musl.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - target_os: "linux".to_string(), target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/mips_unknown_linux_uclibc.rs b/compiler/rustc_target/src/spec/mips_unknown_linux_uclibc.rs index 8f5302a1687b..d7988fd0e7c3 100644 --- a/compiler/rustc_target/src/spec/mips_unknown_linux_uclibc.rs +++ b/compiler/rustc_target/src/spec/mips_unknown_linux_uclibc.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - target_os: "linux".to_string(), target_env: "uclibc".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/mipsel_sony_psp.rs b/compiler/rustc_target/src/spec/mipsel_sony_psp.rs index 05828f738e58..b14a23ac2482 100644 --- a/compiler/rustc_target/src/spec/mipsel_sony_psp.rs +++ b/compiler/rustc_target/src/spec/mipsel_sony_psp.rs @@ -13,12 +13,12 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - target_os: "psp".to_string(), target_env: "".to_string(), target_vendor: "sony".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { + target_os: "psp".to_string(), cpu: "mips2".to_string(), executables: true, linker: Some("rust-lld".to_owned()), diff --git a/compiler/rustc_target/src/spec/mipsel_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/mipsel_unknown_linux_gnu.rs index 81178dd23d7f..de593329a381 100644 --- a/compiler/rustc_target/src/spec/mipsel_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/mipsel_unknown_linux_gnu.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - target_os: "linux".to_string(), target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/mipsel_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/mipsel_unknown_linux_musl.rs index 68660dfb6e80..20d4bdfb0bb8 100644 --- a/compiler/rustc_target/src/spec/mipsel_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/mipsel_unknown_linux_musl.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - target_os: "linux".to_string(), target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/mipsel_unknown_linux_uclibc.rs b/compiler/rustc_target/src/spec/mipsel_unknown_linux_uclibc.rs index 80a93ade5832..56b66faa5ef5 100644 --- a/compiler/rustc_target/src/spec/mipsel_unknown_linux_uclibc.rs +++ b/compiler/rustc_target/src/spec/mipsel_unknown_linux_uclibc.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - target_os: "linux".to_string(), target_env: "uclibc".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/mipsisa32r6_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/mipsisa32r6_unknown_linux_gnu.rs index bd6ad56f4dea..467470bc8c4c 100644 --- a/compiler/rustc_target/src/spec/mipsisa32r6_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/mipsisa32r6_unknown_linux_gnu.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - target_os: "linux".to_string(), target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/mipsisa32r6el_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/mipsisa32r6el_unknown_linux_gnu.rs index 6ae972af0705..a5c052e77f0f 100644 --- a/compiler/rustc_target/src/spec/mipsisa32r6el_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/mipsisa32r6el_unknown_linux_gnu.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - target_os: "linux".to_string(), target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/mipsisa64r6_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/mipsisa64r6_unknown_linux_gnuabi64.rs index 278ffff40bc6..ae6dbcb14c58 100644 --- a/compiler/rustc_target/src/spec/mipsisa64r6_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/mipsisa64r6_unknown_linux_gnuabi64.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), - target_os: "linux".to_string(), target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs index 4d785b309cf1..4b2a0a1795df 100644 --- a/compiler/rustc_target/src/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), - target_os: "linux".to_string(), target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index 08e3949c7286..b226016b3b2f 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -667,8 +667,6 @@ pub struct Target { pub llvm_target: String, /// Number of bits in a pointer. Influences the `target_pointer_width` `cfg` variable. pub pointer_width: u32, - /// OS name to use for conditional compilation. - pub target_os: String, /// Environment name to use for conditional compilation. pub target_env: String, /// Vendor name to use for conditional compilation. @@ -708,6 +706,8 @@ pub struct TargetOptions { pub target_endian: String, /// Width of c_int type. Defaults to "32". pub target_c_int_width: String, + /// OS name to use for conditional compilation. Defaults to "none". + pub target_os: String, /// Linker to invoke pub linker: Option, @@ -989,6 +989,7 @@ fn default() -> TargetOptions { is_builtin: false, target_endian: "little".to_string(), target_c_int_width: "32".to_string(), + target_os: "none".to_string(), linker: option_env!("CFG_DEFAULT_LINKER").map(|s| s.to_string()), lld_flavor: LldFlavor::Ld, pre_link_args: LinkArgs::new(), @@ -1164,7 +1165,6 @@ pub fn from_json(obj: Json) -> Result { .map_err(|_| "target-pointer-width must be an integer".to_string())?, data_layout: get_req_field("data-layout")?, arch: get_req_field("arch")?, - target_os: get_req_field("os")?, target_env: get_opt_field("env", ""), target_vendor: get_opt_field("vendor", "unknown"), linker_flavor: LinkerFlavor::from_str(&*get_req_field("linker-flavor")?) @@ -1179,6 +1179,12 @@ macro_rules! key { base.options.$key_name = s.to_string(); } } ); + ($key_name:ident = $json_name:expr) => ( { + let name = $json_name; + if let Some(s) = obj.find(&name).and_then(Json::as_string) { + base.options.$key_name = s.to_string(); + } + } ); ($key_name:ident, bool) => ( { let name = (stringify!($key_name)).replace("_", "-"); if let Some(s) = obj.find(&name).and_then(Json::as_boolean) { @@ -1407,6 +1413,7 @@ macro_rules! key { key!(is_builtin, bool); key!(target_endian); key!(target_c_int_width); + key!(target_os = "os"); key!(linker, optional); key!(lld_flavor, LldFlavor)?; key!(pre_link_objects, link_objects); @@ -1636,7 +1643,6 @@ macro_rules! target_option_val { target_val!(llvm_target); d.insert("target-pointer-width".to_string(), self.pointer_width.to_string().to_json()); target_val!(arch); - target_val!(target_os, "os"); target_val!(target_env, "env"); target_val!(target_vendor, "vendor"); target_val!(data_layout); @@ -1644,6 +1650,7 @@ macro_rules! target_option_val { target_option_val!(target_endian); target_option_val!(target_c_int_width); + target_option_val!(target_os, "os"); target_option_val!(is_builtin); target_option_val!(linker); target_option_val!(lld_flavor); diff --git a/compiler/rustc_target/src/spec/msp430_none_elf.rs b/compiler/rustc_target/src/spec/msp430_none_elf.rs index 9170077dcecd..0b85d5e31da2 100644 --- a/compiler/rustc_target/src/spec/msp430_none_elf.rs +++ b/compiler/rustc_target/src/spec/msp430_none_elf.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 16, data_layout: "e-m:e-p:16:16-i32:16-i64:16-f32:16-f64:16-a:8-n8:16-S16".to_string(), arch: "msp430".to_string(), - target_os: "none".to_string(), target_env: String::new(), target_vendor: String::new(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/netbsd_base.rs b/compiler/rustc_target/src/spec/netbsd_base.rs index d7baf81fce36..437b50b6f110 100644 --- a/compiler/rustc_target/src/spec/netbsd_base.rs +++ b/compiler/rustc_target/src/spec/netbsd_base.rs @@ -14,6 +14,7 @@ pub fn opts() -> TargetOptions { ); TargetOptions { + target_os: "netbsd".to_string(), dynamic_linking: true, executables: true, target_family: Some("unix".to_string()), diff --git a/compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs b/compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs index 315138878f75..c9a84352c694 100644 --- a/compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs +++ b/compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { data_layout: "e-i64:64-i128:128-v16:16-v32:32-n16:32:64".to_string(), llvm_target: "nvptx64-nvidia-cuda".to_string(), - target_os: "cuda".to_string(), target_vendor: "nvidia".to_string(), target_env: String::new(), @@ -16,6 +15,7 @@ pub fn target() -> Target { pointer_width: 64, options: TargetOptions { + target_os: "cuda".to_string(), // The linker can be installed from `crates.io`. linker: Some("rust-ptx-linker".to_string()), diff --git a/compiler/rustc_target/src/spec/openbsd_base.rs b/compiler/rustc_target/src/spec/openbsd_base.rs index 92a382e826b9..5e83e79d9ed7 100644 --- a/compiler/rustc_target/src/spec/openbsd_base.rs +++ b/compiler/rustc_target/src/spec/openbsd_base.rs @@ -16,6 +16,7 @@ pub fn opts() -> TargetOptions { ); TargetOptions { + target_os: "openbsd".to_string(), dynamic_linking: true, executables: true, target_family: Some("unix".to_string()), diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_freebsd.rs b/compiler/rustc_target/src/spec/powerpc64_unknown_freebsd.rs index 803c079db54b..2870d56d64c9 100644 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/powerpc64_unknown_freebsd.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), - target_os: "freebsd".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs index cf5a10d11529..6091ecfb8251 100644 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), - target_os: "linux".to_string(), target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_musl.rs index 635a0e78d01b..988e84a9fb9f 100644 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_musl.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), - target_os: "linux".to_string(), target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/powerpc64_wrs_vxworks.rs b/compiler/rustc_target/src/spec/powerpc64_wrs_vxworks.rs index fcf9bfdd20da..3a52b55dc653 100644 --- a/compiler/rustc_target/src/spec/powerpc64_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/powerpc64_wrs_vxworks.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), - target_os: "vxworks".to_string(), target_env: "gnu".to_string(), target_vendor: "wrs".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs index 11fafa1201ba..1c472bcac299 100644 --- a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), - target_os: "linux".to_string(), target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_musl.rs index 23812b723402..2a8aef916014 100644 --- a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_musl.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), - target_os: "linux".to_string(), target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnu.rs index 45525b9ba9af..7631b46c120b 100644 --- a/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnu.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), - target_os: "linux".to_string(), target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnuspe.rs b/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnuspe.rs index 677e9bae83a7..cc8c051c5dc1 100644 --- a/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnuspe.rs +++ b/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnuspe.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), - target_os: "linux".to_string(), target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/powerpc_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc_unknown_linux_musl.rs index 243ab7f666b9..efc14a77a162 100644 --- a/compiler/rustc_target/src/spec/powerpc_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/powerpc_unknown_linux_musl.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), - target_os: "linux".to_string(), target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/powerpc_unknown_netbsd.rs b/compiler/rustc_target/src/spec/powerpc_unknown_netbsd.rs index ef842375b17c..08db795494db 100644 --- a/compiler/rustc_target/src/spec/powerpc_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/powerpc_unknown_netbsd.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), - target_os: "netbsd".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/powerpc_wrs_vxworks.rs b/compiler/rustc_target/src/spec/powerpc_wrs_vxworks.rs index 3e940377ae52..ffb495bebbda 100644 --- a/compiler/rustc_target/src/spec/powerpc_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/powerpc_wrs_vxworks.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), - target_os: "vxworks".to_string(), target_env: "gnu".to_string(), target_vendor: "wrs".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/powerpc_wrs_vxworks_spe.rs b/compiler/rustc_target/src/spec/powerpc_wrs_vxworks_spe.rs index 9e019bd05d2f..719f50da7684 100644 --- a/compiler/rustc_target/src/spec/powerpc_wrs_vxworks_spe.rs +++ b/compiler/rustc_target/src/spec/powerpc_wrs_vxworks_spe.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), - target_os: "vxworks".to_string(), target_env: "gnu".to_string(), target_vendor: "wrs".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/redox_base.rs b/compiler/rustc_target/src/spec/redox_base.rs index 18cafe654d17..11616045fa8e 100644 --- a/compiler/rustc_target/src/spec/redox_base.rs +++ b/compiler/rustc_target/src/spec/redox_base.rs @@ -19,6 +19,7 @@ pub fn opts() -> TargetOptions { ); TargetOptions { + target_os: "redox".to_string(), dynamic_linking: true, executables: true, target_family: Some("unix".to_string()), diff --git a/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs index 5314b53bd39b..39d47f4e053c 100644 --- a/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { target_env: "gnu".to_string(), data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(), arch: "riscv32".to_string(), - target_os: "linux".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/riscv32i_unknown_none_elf.rs b/compiler/rustc_target/src/spec/riscv32i_unknown_none_elf.rs index e7dc614c88db..963a7f7e2212 100644 --- a/compiler/rustc_target/src/spec/riscv32i_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/riscv32i_unknown_none_elf.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(), llvm_target: "riscv32".to_string(), pointer_width: 32, - target_os: "none".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), arch: "riscv32".to_string(), diff --git a/compiler/rustc_target/src/spec/riscv32imac_unknown_none_elf.rs b/compiler/rustc_target/src/spec/riscv32imac_unknown_none_elf.rs index d7f6048c9c89..d08c851a3a99 100644 --- a/compiler/rustc_target/src/spec/riscv32imac_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/riscv32imac_unknown_none_elf.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(), llvm_target: "riscv32".to_string(), pointer_width: 32, - target_os: "none".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), arch: "riscv32".to_string(), diff --git a/compiler/rustc_target/src/spec/riscv32imc_unknown_none_elf.rs b/compiler/rustc_target/src/spec/riscv32imc_unknown_none_elf.rs index 969a689c73ef..2671401d1700 100644 --- a/compiler/rustc_target/src/spec/riscv32imc_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/riscv32imc_unknown_none_elf.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(), llvm_target: "riscv32".to_string(), pointer_width: 32, - target_os: "none".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), arch: "riscv32".to_string(), diff --git a/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_gnu.rs index aa8e747ff204..c5502aae218a 100644 --- a/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_gnu.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { target_env: "gnu".to_string(), data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".to_string(), arch: "riscv64".to_string(), - target_os: "linux".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/riscv64gc_unknown_none_elf.rs b/compiler/rustc_target/src/spec/riscv64gc_unknown_none_elf.rs index 214541484a51..90830f4077a4 100644 --- a/compiler/rustc_target/src/spec/riscv64gc_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/riscv64gc_unknown_none_elf.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".to_string(), llvm_target: "riscv64".to_string(), pointer_width: 64, - target_os: "none".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), arch: "riscv64".to_string(), diff --git a/compiler/rustc_target/src/spec/riscv64imac_unknown_none_elf.rs b/compiler/rustc_target/src/spec/riscv64imac_unknown_none_elf.rs index f805a531cdf5..374295d04bf1 100644 --- a/compiler/rustc_target/src/spec/riscv64imac_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/riscv64imac_unknown_none_elf.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".to_string(), llvm_target: "riscv64".to_string(), pointer_width: 64, - target_os: "none".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), arch: "riscv64".to_string(), diff --git a/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs index cf5500eea314..53f34eed32a5 100644 --- a/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs @@ -17,7 +17,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-a:8:16-n32:64".to_string(), arch: "s390x".to_string(), - target_os: "linux".to_string(), target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/solaris_base.rs b/compiler/rustc_target/src/spec/solaris_base.rs index 3d7f0034b8b1..0374de200184 100644 --- a/compiler/rustc_target/src/spec/solaris_base.rs +++ b/compiler/rustc_target/src/spec/solaris_base.rs @@ -2,6 +2,7 @@ pub fn opts() -> TargetOptions { TargetOptions { + target_os: "solaris".to_string(), dynamic_linking: true, executables: true, has_rpath: true, diff --git a/compiler/rustc_target/src/spec/sparc64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/sparc64_unknown_linux_gnu.rs index 911183ad9a62..43f494c2d038 100644 --- a/compiler/rustc_target/src/spec/sparc64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/sparc64_unknown_linux_gnu.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64-S128".to_string(), arch: "sparc64".to_string(), - target_os: "linux".to_string(), target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/sparc64_unknown_netbsd.rs b/compiler/rustc_target/src/spec/sparc64_unknown_netbsd.rs index 161ace037e5b..5bba6222dbf4 100644 --- a/compiler/rustc_target/src/spec/sparc64_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/sparc64_unknown_netbsd.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64-S128".to_string(), arch: "sparc64".to_string(), - target_os: "netbsd".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/sparc64_unknown_openbsd.rs b/compiler/rustc_target/src/spec/sparc64_unknown_openbsd.rs index 2ba531e9ef99..dec1f2606ef4 100644 --- a/compiler/rustc_target/src/spec/sparc64_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/sparc64_unknown_openbsd.rs @@ -12,7 +12,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64-S128".to_string(), arch: "sparc64".to_string(), - target_os: "openbsd".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs index d523a29eda25..8b669a9f7339 100644 --- a/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs @@ -12,7 +12,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-f128:64-n32-S64".to_string(), arch: "sparc".to_string(), - target_os: "linux".to_string(), target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs b/compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs index 271464015325..796b6bf876d2 100644 --- a/compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs +++ b/compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs @@ -17,7 +17,6 @@ pub fn target() -> Target { // differentiation from the sparc64, we could, but that would probably // just be confusing. arch: "sparc64".to_string(), - target_os: "solaris".to_string(), target_env: String::new(), target_vendor: "sun".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs index c50d7d71ee79..d1238e66f668 100644 --- a/compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { Target { llvm_target: "thumbv4t-none-eabi".to_string(), pointer_width: 32, - target_os: "none".to_string(), target_env: "".to_string(), target_vendor: "".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs index b21853850d67..f89a4b7e8270 100644 --- a/compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "none".to_string(), target_env: String::new(), target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/thumbv7a_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/thumbv7a_pc_windows_msvc.rs index 642fccb9abb0..97b412ed0233 100644 --- a/compiler/rustc_target/src/spec/thumbv7a_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/thumbv7a_pc_windows_msvc.rs @@ -26,7 +26,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:w-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "windows".to_string(), target_env: "msvc".to_string(), target_vendor: "pc".to_string(), linker_flavor: LinkerFlavor::Msvc, diff --git a/compiler/rustc_target/src/spec/thumbv7a_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/thumbv7a_uwp_windows_msvc.rs index 709c70f25479..cc8036d4fb39 100644 --- a/compiler/rustc_target/src/spec/thumbv7a_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/thumbv7a_uwp_windows_msvc.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:w-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "windows".to_string(), target_env: "msvc".to_string(), target_vendor: "uwp".to_string(), linker_flavor: LinkerFlavor::Msvc, diff --git a/compiler/rustc_target/src/spec/thumbv7em_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv7em_none_eabi.rs index bd833ce11387..4bd0585c2d64 100644 --- a/compiler/rustc_target/src/spec/thumbv7em_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv7em_none_eabi.rs @@ -17,7 +17,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "none".to_string(), target_env: String::new(), target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/thumbv7em_none_eabihf.rs b/compiler/rustc_target/src/spec/thumbv7em_none_eabihf.rs index b735014b8859..013370b3dbda 100644 --- a/compiler/rustc_target/src/spec/thumbv7em_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/thumbv7em_none_eabihf.rs @@ -16,7 +16,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "none".to_string(), target_env: String::new(), target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/thumbv7m_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv7m_none_eabi.rs index 7bd33589266c..69263a853854 100644 --- a/compiler/rustc_target/src/spec/thumbv7m_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv7m_none_eabi.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "none".to_string(), target_env: String::new(), target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/thumbv7neon_linux_androideabi.rs b/compiler/rustc_target/src/spec/thumbv7neon_linux_androideabi.rs index f628eff477be..4e26c1354968 100644 --- a/compiler/rustc_target/src/spec/thumbv7neon_linux_androideabi.rs +++ b/compiler/rustc_target/src/spec/thumbv7neon_linux_androideabi.rs @@ -19,7 +19,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "android".to_string(), target_env: "".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_gnueabihf.rs b/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_gnueabihf.rs index 735a82c785e2..1b4727189339 100644 --- a/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_gnueabihf.rs +++ b/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_gnueabihf.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "linux".to_string(), target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_musleabihf.rs b/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_musleabihf.rs index ab2e9588df61..ac0e6ad7a23f 100644 --- a/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_musleabihf.rs +++ b/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_musleabihf.rs @@ -16,7 +16,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "linux".to_string(), target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/thumbv8m_base_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv8m_base_none_eabi.rs index e89f07f6c520..a0b4075a9e57 100644 --- a/compiler/rustc_target/src/spec/thumbv8m_base_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv8m_base_none_eabi.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "none".to_string(), target_env: String::new(), target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/thumbv8m_main_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv8m_main_none_eabi.rs index 911d5b087f21..8e033f6a8de9 100644 --- a/compiler/rustc_target/src/spec/thumbv8m_main_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv8m_main_none_eabi.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "none".to_string(), target_env: String::new(), target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/thumbv8m_main_none_eabihf.rs b/compiler/rustc_target/src/spec/thumbv8m_main_none_eabihf.rs index b02d3e8fc927..ed0fca59b34a 100644 --- a/compiler/rustc_target/src/spec/thumbv8m_main_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/thumbv8m_main_none_eabihf.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_os: "none".to_string(), target_env: String::new(), target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/uefi_msvc_base.rs b/compiler/rustc_target/src/spec/uefi_msvc_base.rs index 3f7c78c8e7d4..386fed19e3fb 100644 --- a/compiler/rustc_target/src/spec/uefi_msvc_base.rs +++ b/compiler/rustc_target/src/spec/uefi_msvc_base.rs @@ -37,6 +37,7 @@ pub fn opts() -> TargetOptions { .extend(pre_link_args_msvc); TargetOptions { + target_os: "uefi".to_string(), disable_redzone: true, exe_suffix: ".efi".to_string(), allows_weak_linkage: false, diff --git a/compiler/rustc_target/src/spec/vxworks_base.rs b/compiler/rustc_target/src/spec/vxworks_base.rs index 777bb58d7db8..56a83194e9eb 100644 --- a/compiler/rustc_target/src/spec/vxworks_base.rs +++ b/compiler/rustc_target/src/spec/vxworks_base.rs @@ -17,6 +17,7 @@ pub fn opts() -> TargetOptions { ); TargetOptions { + target_os: "vxworks".to_string(), linker: Some("wr-c++".to_string()), exe_suffix: ".vxe".to_string(), dynamic_linking: true, diff --git a/compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs b/compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs index 3aaf9f6e0de9..f0da2c2986ba 100644 --- a/compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs +++ b/compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs @@ -17,6 +17,7 @@ pub fn target() -> Target { ); let opts = TargetOptions { + target_os: "emscripten".to_string(), // emcc emits two files - a .js file to instantiate the wasm and supply platform // functionality, and a .wasm file. exe_suffix: ".js".to_string(), @@ -31,7 +32,6 @@ pub fn target() -> Target { Target { llvm_target: "wasm32-unknown-emscripten".to_string(), pointer_width: 32, - target_os: "emscripten".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), data_layout: "e-m:e-p:32:32-i64:64-n32:64-S128".to_string(), diff --git a/compiler/rustc_target/src/spec/wasm32_unknown_unknown.rs b/compiler/rustc_target/src/spec/wasm32_unknown_unknown.rs index 70727d7d78a7..c8c0d7117c92 100644 --- a/compiler/rustc_target/src/spec/wasm32_unknown_unknown.rs +++ b/compiler/rustc_target/src/spec/wasm32_unknown_unknown.rs @@ -15,6 +15,7 @@ pub fn target() -> Target { let mut options = wasm32_base::options(); + options.target_os = "unknown".to_string(); let clang_args = options.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap(); // Make sure clang uses LLD as its linker and is configured appropriately @@ -33,7 +34,6 @@ pub fn target() -> Target { Target { llvm_target: "wasm32-unknown-unknown".to_string(), pointer_width: 32, - target_os: "unknown".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), data_layout: "e-m:e-p:32:32-i64:64-n32:64-S128".to_string(), diff --git a/compiler/rustc_target/src/spec/wasm32_wasi.rs b/compiler/rustc_target/src/spec/wasm32_wasi.rs index ae076f27529b..0bd6c2a9e19c 100644 --- a/compiler/rustc_target/src/spec/wasm32_wasi.rs +++ b/compiler/rustc_target/src/spec/wasm32_wasi.rs @@ -78,6 +78,7 @@ pub fn target() -> Target { let mut options = wasm32_base::options(); + options.target_os = "wasi".to_string(); options .pre_link_args .entry(LinkerFlavor::Gcc) @@ -107,7 +108,6 @@ pub fn target() -> Target { Target { llvm_target: "wasm32-wasi".to_string(), pointer_width: 32, - target_os: "wasi".to_string(), target_env: String::new(), target_vendor: String::new(), data_layout: "e-m:e-p:32:32-i64:64-n32:64-S128".to_string(), diff --git a/compiler/rustc_target/src/spec/windows_gnu_base.rs b/compiler/rustc_target/src/spec/windows_gnu_base.rs index 98e42f6c37c5..b06f3ebed3c4 100644 --- a/compiler/rustc_target/src/spec/windows_gnu_base.rs +++ b/compiler/rustc_target/src/spec/windows_gnu_base.rs @@ -62,6 +62,7 @@ pub fn opts() -> TargetOptions { late_link_args_static.insert(LinkerFlavor::Lld(LldFlavor::Ld), static_unwind_libs); TargetOptions { + target_os: "windows".to_string(), // FIXME(#13846) this should be enabled for windows function_sections: false, linker: Some("gcc".to_string()), diff --git a/compiler/rustc_target/src/spec/windows_msvc_base.rs b/compiler/rustc_target/src/spec/windows_msvc_base.rs index 77171f8672e8..68d21473261c 100644 --- a/compiler/rustc_target/src/spec/windows_msvc_base.rs +++ b/compiler/rustc_target/src/spec/windows_msvc_base.rs @@ -4,6 +4,7 @@ pub fn opts() -> TargetOptions { let base = super::msvc_base::opts(); TargetOptions { + target_os: "windows".to_string(), dynamic_linking: true, dll_prefix: String::new(), dll_suffix: ".dll".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_apple_darwin.rs b/compiler/rustc_target/src/spec/x86_64_apple_darwin.rs index 3a35af3d935f..38cfcc0593ae 100644 --- a/compiler/rustc_target/src/spec/x86_64_apple_darwin.rs +++ b/compiler/rustc_target/src/spec/x86_64_apple_darwin.rs @@ -1,7 +1,7 @@ use crate::spec::{LinkerFlavor, Target, TargetOptions}; pub fn target() -> Target { - let mut base = super::apple_base::opts(); + let mut base = super::apple_base::opts("macos"); base.cpu = "core2".to_string(); base.max_atomic_width = Some(128); // core2 support cmpxchg16b base.eliminate_frame_pointer = false; @@ -24,7 +24,6 @@ pub fn target() -> Target { data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: arch.to_string(), - target_os: "macos".to_string(), target_env: String::new(), target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/x86_64_apple_ios.rs b/compiler/rustc_target/src/spec/x86_64_apple_ios.rs index 967c4a35cbe6..46e1b383c55c 100644 --- a/compiler/rustc_target/src/spec/x86_64_apple_ios.rs +++ b/compiler/rustc_target/src/spec/x86_64_apple_ios.rs @@ -2,14 +2,13 @@ use crate::spec::{LinkerFlavor, Target, TargetOptions}; pub fn target() -> Target { - let base = opts(Arch::X86_64); + let base = opts("ios", Arch::X86_64); Target { llvm_target: "x86_64-apple-ios".to_string(), pointer_width: 64, data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_os: "ios".to_string(), target_env: String::new(), target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/x86_64_apple_ios_macabi.rs b/compiler/rustc_target/src/spec/x86_64_apple_ios_macabi.rs index c427b91a18d2..e2a6d76ef3a9 100644 --- a/compiler/rustc_target/src/spec/x86_64_apple_ios_macabi.rs +++ b/compiler/rustc_target/src/spec/x86_64_apple_ios_macabi.rs @@ -2,14 +2,13 @@ use crate::spec::{LinkerFlavor, Target, TargetOptions}; pub fn target() -> Target { - let base = opts(Arch::X86_64_macabi); + let base = opts("ios", Arch::X86_64_macabi); Target { llvm_target: "x86_64-apple-ios13.0-macabi".to_string(), pointer_width: 64, data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_os: "ios".to_string(), target_env: String::new(), target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/x86_64_apple_tvos.rs b/compiler/rustc_target/src/spec/x86_64_apple_tvos.rs index 1124fc4b09a3..223aabdef5f9 100644 --- a/compiler/rustc_target/src/spec/x86_64_apple_tvos.rs +++ b/compiler/rustc_target/src/spec/x86_64_apple_tvos.rs @@ -2,13 +2,12 @@ use crate::spec::{LinkerFlavor, Target, TargetOptions}; pub fn target() -> Target { - let base = opts(Arch::X86_64); + let base = opts("tvos", Arch::X86_64); Target { llvm_target: "x86_64-apple-tvos".to_string(), pointer_width: 64, data_layout: "e-m:o-i64:64-f80:128-n8:16:32:64-S128".to_string(), arch: "x86_64".to_string(), - target_os: "tvos".to_string(), target_env: String::new(), target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/x86_64_fortanix_unknown_sgx.rs b/compiler/rustc_target/src/spec/x86_64_fortanix_unknown_sgx.rs index db1ac26a0e0b..6000f0340daa 100644 --- a/compiler/rustc_target/src/spec/x86_64_fortanix_unknown_sgx.rs +++ b/compiler/rustc_target/src/spec/x86_64_fortanix_unknown_sgx.rs @@ -55,6 +55,7 @@ pub fn target() -> Target { "TEXT_SIZE", ]; let opts = TargetOptions { + target_os: "unknown".into(), dynamic_linking: false, executables: true, linker_is_gnu: true, @@ -77,7 +78,6 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-elf".into(), pointer_width: 64, - target_os: "unknown".into(), target_env: "sgx".into(), target_vendor: "fortanix".into(), data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" diff --git a/compiler/rustc_target/src/spec/x86_64_fuchsia.rs b/compiler/rustc_target/src/spec/x86_64_fuchsia.rs index 3a2a032e5354..e8f9bc4f7cab 100644 --- a/compiler/rustc_target/src/spec/x86_64_fuchsia.rs +++ b/compiler/rustc_target/src/spec/x86_64_fuchsia.rs @@ -12,7 +12,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_os: "fuchsia".to_string(), target_env: String::new(), target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/x86_64_linux_android.rs b/compiler/rustc_target/src/spec/x86_64_linux_android.rs index 2a3aaa932b45..24f4df87f6e0 100644 --- a/compiler/rustc_target/src/spec/x86_64_linux_android.rs +++ b/compiler/rustc_target/src/spec/x86_64_linux_android.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_os: "android".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/x86_64_linux_kernel.rs b/compiler/rustc_target/src/spec/x86_64_linux_kernel.rs index 1ebe53b891f6..19080d9361f1 100644 --- a/compiler/rustc_target/src/spec/x86_64_linux_kernel.rs +++ b/compiler/rustc_target/src/spec/x86_64_linux_kernel.rs @@ -19,7 +19,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), - target_os: "none".to_string(), target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), arch: "x86_64".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs b/compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs index 5721d01503be..cef07e3de69d 100644 --- a/compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs @@ -18,7 +18,6 @@ pub fn target() -> Target { data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_os: "windows".to_string(), target_env: "gnu".to_string(), target_vendor: "pc".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/x86_64_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/x86_64_pc_windows_msvc.rs index 94dbfdafc388..70365cd533b9 100644 --- a/compiler/rustc_target/src/spec/x86_64_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/x86_64_pc_windows_msvc.rs @@ -12,7 +12,6 @@ pub fn target() -> Target { data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_os: "windows".to_string(), target_env: "msvc".to_string(), target_vendor: "pc".to_string(), linker_flavor: LinkerFlavor::Msvc, diff --git a/compiler/rustc_target/src/spec/x86_64_rumprun_netbsd.rs b/compiler/rustc_target/src/spec/x86_64_rumprun_netbsd.rs index 1ed9cd0af204..378bd05bc711 100644 --- a/compiler/rustc_target/src/spec/x86_64_rumprun_netbsd.rs +++ b/compiler/rustc_target/src/spec/x86_64_rumprun_netbsd.rs @@ -19,7 +19,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_os: "netbsd".to_string(), target_env: String::new(), target_vendor: "rumprun".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/x86_64_sun_solaris.rs b/compiler/rustc_target/src/spec/x86_64_sun_solaris.rs index 879060c6d081..7d020ad509e4 100644 --- a/compiler/rustc_target/src/spec/x86_64_sun_solaris.rs +++ b/compiler/rustc_target/src/spec/x86_64_sun_solaris.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_os: "solaris".to_string(), target_env: String::new(), target_vendor: "sun".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_cloudabi.rs b/compiler/rustc_target/src/spec/x86_64_unknown_cloudabi.rs index 87fabb3ee452..cc91c1e035dd 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_cloudabi.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_cloudabi.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_os: "cloudabi".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_dragonfly.rs b/compiler/rustc_target/src/spec/x86_64_unknown_dragonfly.rs index b4dfb6a9e0ca..451bf187d575 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_dragonfly.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_dragonfly.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_os: "dragonfly".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_freebsd.rs b/compiler/rustc_target/src/spec/x86_64_unknown_freebsd.rs index 884a00f98440..9ecdba134616 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_freebsd.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_os: "freebsd".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_haiku.rs b/compiler/rustc_target/src/spec/x86_64_unknown_haiku.rs index 18d68596e12e..bedc4073f368 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_haiku.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_haiku.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_os: "haiku".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_hermit.rs b/compiler/rustc_target/src/spec/x86_64_unknown_hermit.rs index a00627f343f4..be1865f7664b 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_hermit.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_hermit.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_os: "hermit".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_hermit_kernel.rs b/compiler/rustc_target/src/spec/x86_64_unknown_hermit_kernel.rs index 08f501e3bb06..9eed950a9688 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_hermit_kernel.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_hermit_kernel.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_os: "hermit".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_illumos.rs b/compiler/rustc_target/src/spec/x86_64_unknown_illumos.rs index 51fd05c27126..15e7e965e2d8 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_illumos.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_illumos.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_os: "illumos".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_l4re_uclibc.rs b/compiler/rustc_target/src/spec/x86_64_unknown_l4re_uclibc.rs index 956f31973f61..a857c0873bac 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_l4re_uclibc.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_l4re_uclibc.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_os: "l4re".to_string(), target_env: "uclibc".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Ld, diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs index e5578ae67a22..bbb63805059e 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_os: "linux".to_string(), target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnux32.rs b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnux32.rs index 96d172411ec6..6a5b3faf98be 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnux32.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnux32.rs @@ -18,7 +18,6 @@ pub fn target() -> Target { i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_os: "linux".to_string(), target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/x86_64_unknown_linux_musl.rs index 343b6677bb50..e44d28b16410 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_linux_musl.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_os: "linux".to_string(), target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_netbsd.rs b/compiler/rustc_target/src/spec/x86_64_unknown_netbsd.rs index 76c741516cbf..c5c6570a94dc 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_netbsd.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_os: "netbsd".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_openbsd.rs b/compiler/rustc_target/src/spec/x86_64_unknown_openbsd.rs index 6dc749ef05e6..872523c9ceaf 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_openbsd.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_os: "openbsd".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_redox.rs b/compiler/rustc_target/src/spec/x86_64_unknown_redox.rs index 824502cb7916..bec51a4b9f98 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_redox.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_redox.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_os: "redox".to_string(), target_env: "relibc".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs b/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs index 23e73c423f67..7907247dba38 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs @@ -33,7 +33,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), - target_os: "uefi".to_string(), target_env: "".to_string(), target_vendor: "unknown".to_string(), arch: "x86_64".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_uwp_windows_gnu.rs b/compiler/rustc_target/src/spec/x86_64_uwp_windows_gnu.rs index c156a3a214fc..f7c88068eaf7 100644 --- a/compiler/rustc_target/src/spec/x86_64_uwp_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/x86_64_uwp_windows_gnu.rs @@ -17,7 +17,6 @@ pub fn target() -> Target { data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_os: "windows".to_string(), target_env: "gnu".to_string(), target_vendor: "uwp".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/x86_64_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/x86_64_uwp_windows_msvc.rs index d5186fb2093a..2c74b7a71419 100644 --- a/compiler/rustc_target/src/spec/x86_64_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/x86_64_uwp_windows_msvc.rs @@ -12,7 +12,6 @@ pub fn target() -> Target { data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_os: "windows".to_string(), target_env: "msvc".to_string(), target_vendor: "uwp".to_string(), linker_flavor: LinkerFlavor::Msvc, diff --git a/compiler/rustc_target/src/spec/x86_64_wrs_vxworks.rs b/compiler/rustc_target/src/spec/x86_64_wrs_vxworks.rs index 4a40ebffcf8d..942395bedd0a 100644 --- a/compiler/rustc_target/src/spec/x86_64_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/x86_64_wrs_vxworks.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_os: "vxworks".to_string(), target_env: "gnu".to_string(), target_vendor: "wrs".to_string(), linker_flavor: LinkerFlavor::Gcc, From d5fd31197fe1a4f704186874b67e170ff4029a4c Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Thu, 8 Oct 2020 21:47:22 +0300 Subject: [PATCH 4/7] rustc_target: Move `target_env` from `Target` to `TargetOptions` --- .../rustc_target/src/spec/aarch64_apple_darwin.rs | 1 - compiler/rustc_target/src/spec/aarch64_apple_ios.rs | 1 - compiler/rustc_target/src/spec/aarch64_apple_tvos.rs | 1 - compiler/rustc_target/src/spec/aarch64_fuchsia.rs | 1 - .../rustc_target/src/spec/aarch64_linux_android.rs | 1 - .../rustc_target/src/spec/aarch64_pc_windows_msvc.rs | 1 - .../src/spec/aarch64_unknown_cloudabi.rs | 1 - .../rustc_target/src/spec/aarch64_unknown_freebsd.rs | 1 - .../rustc_target/src/spec/aarch64_unknown_hermit.rs | 1 - .../src/spec/aarch64_unknown_linux_gnu.rs | 1 - .../src/spec/aarch64_unknown_linux_musl.rs | 1 - .../rustc_target/src/spec/aarch64_unknown_netbsd.rs | 1 - .../rustc_target/src/spec/aarch64_unknown_none.rs | 1 - .../src/spec/aarch64_unknown_none_softfloat.rs | 1 - .../rustc_target/src/spec/aarch64_unknown_openbsd.rs | 1 - .../rustc_target/src/spec/aarch64_unknown_redox.rs | 1 - .../src/spec/aarch64_uwp_windows_msvc.rs | 1 - .../rustc_target/src/spec/aarch64_wrs_vxworks.rs | 1 - .../rustc_target/src/spec/arm_linux_androideabi.rs | 1 - .../src/spec/arm_unknown_linux_gnueabi.rs | 1 - .../src/spec/arm_unknown_linux_gnueabihf.rs | 1 - .../src/spec/arm_unknown_linux_musleabi.rs | 1 - .../src/spec/arm_unknown_linux_musleabihf.rs | 1 - compiler/rustc_target/src/spec/armebv7r_none_eabi.rs | 1 - .../rustc_target/src/spec/armebv7r_none_eabihf.rs | 1 - .../src/spec/armv4t_unknown_linux_gnueabi.rs | 1 - .../src/spec/armv5te_unknown_linux_gnueabi.rs | 1 - .../src/spec/armv5te_unknown_linux_musleabi.rs | 1 - .../rustc_target/src/spec/armv6_unknown_freebsd.rs | 2 +- .../src/spec/armv6_unknown_netbsd_eabihf.rs | 2 +- compiler/rustc_target/src/spec/armv7_apple_ios.rs | 1 - .../rustc_target/src/spec/armv7_linux_androideabi.rs | 1 - .../src/spec/armv7_unknown_cloudabi_eabihf.rs | 1 - .../rustc_target/src/spec/armv7_unknown_freebsd.rs | 2 +- .../src/spec/armv7_unknown_linux_gnueabi.rs | 1 - .../src/spec/armv7_unknown_linux_gnueabihf.rs | 1 - .../src/spec/armv7_unknown_linux_musleabi.rs | 1 - .../src/spec/armv7_unknown_linux_musleabihf.rs | 1 - .../src/spec/armv7_unknown_netbsd_eabihf.rs | 2 +- .../src/spec/armv7_wrs_vxworks_eabihf.rs | 1 - compiler/rustc_target/src/spec/armv7a_none_eabi.rs | 1 - compiler/rustc_target/src/spec/armv7a_none_eabihf.rs | 1 - compiler/rustc_target/src/spec/armv7r_none_eabi.rs | 1 - compiler/rustc_target/src/spec/armv7r_none_eabihf.rs | 1 - compiler/rustc_target/src/spec/armv7s_apple_ios.rs | 1 - compiler/rustc_target/src/spec/avr_gnu_base.rs | 1 - .../src/spec/hexagon_unknown_linux_musl.rs | 1 - compiler/rustc_target/src/spec/i386_apple_ios.rs | 1 - compiler/rustc_target/src/spec/i686_apple_darwin.rs | 1 - compiler/rustc_target/src/spec/i686_linux_android.rs | 1 - .../rustc_target/src/spec/i686_pc_windows_gnu.rs | 1 - .../rustc_target/src/spec/i686_pc_windows_msvc.rs | 1 - .../rustc_target/src/spec/i686_unknown_cloudabi.rs | 1 - .../rustc_target/src/spec/i686_unknown_freebsd.rs | 1 - compiler/rustc_target/src/spec/i686_unknown_haiku.rs | 1 - .../rustc_target/src/spec/i686_unknown_linux_gnu.rs | 1 - .../rustc_target/src/spec/i686_unknown_linux_musl.rs | 1 - .../rustc_target/src/spec/i686_unknown_netbsd.rs | 1 - .../rustc_target/src/spec/i686_unknown_openbsd.rs | 1 - compiler/rustc_target/src/spec/i686_unknown_uefi.rs | 1 - .../rustc_target/src/spec/i686_uwp_windows_gnu.rs | 1 - .../rustc_target/src/spec/i686_uwp_windows_msvc.rs | 1 - compiler/rustc_target/src/spec/i686_wrs_vxworks.rs | 1 - compiler/rustc_target/src/spec/l4re_base.rs | 1 + compiler/rustc_target/src/spec/linux_base.rs | 1 + compiler/rustc_target/src/spec/linux_kernel_base.rs | 1 + compiler/rustc_target/src/spec/linux_musl_base.rs | 1 + compiler/rustc_target/src/spec/linux_uclibc_base.rs | 5 +++++ .../src/spec/mips64_unknown_linux_gnuabi64.rs | 1 - .../src/spec/mips64_unknown_linux_muslabi64.rs | 1 - .../src/spec/mips64el_unknown_linux_gnuabi64.rs | 1 - .../src/spec/mips64el_unknown_linux_muslabi64.rs | 1 - .../rustc_target/src/spec/mips_unknown_linux_gnu.rs | 1 - .../rustc_target/src/spec/mips_unknown_linux_musl.rs | 1 - .../src/spec/mips_unknown_linux_uclibc.rs | 3 +-- compiler/rustc_target/src/spec/mipsel_sony_psp.rs | 1 - .../src/spec/mipsel_unknown_linux_gnu.rs | 1 - .../src/spec/mipsel_unknown_linux_musl.rs | 1 - .../src/spec/mipsel_unknown_linux_uclibc.rs | 3 +-- .../src/spec/mipsisa32r6_unknown_linux_gnu.rs | 1 - .../src/spec/mipsisa32r6el_unknown_linux_gnu.rs | 1 - .../src/spec/mipsisa64r6_unknown_linux_gnuabi64.rs | 1 - .../src/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs | 1 - compiler/rustc_target/src/spec/mod.rs | 12 +++++++----- compiler/rustc_target/src/spec/msp430_none_elf.rs | 1 - .../rustc_target/src/spec/nvptx64_nvidia_cuda.rs | 1 - .../src/spec/powerpc64_unknown_freebsd.rs | 1 - .../src/spec/powerpc64_unknown_linux_gnu.rs | 1 - .../src/spec/powerpc64_unknown_linux_musl.rs | 1 - .../rustc_target/src/spec/powerpc64_wrs_vxworks.rs | 1 - .../src/spec/powerpc64le_unknown_linux_gnu.rs | 1 - .../src/spec/powerpc64le_unknown_linux_musl.rs | 1 - .../src/spec/powerpc_unknown_linux_gnu.rs | 1 - .../src/spec/powerpc_unknown_linux_gnuspe.rs | 1 - .../src/spec/powerpc_unknown_linux_musl.rs | 1 - .../rustc_target/src/spec/powerpc_unknown_netbsd.rs | 1 - .../rustc_target/src/spec/powerpc_wrs_vxworks.rs | 1 - .../rustc_target/src/spec/powerpc_wrs_vxworks_spe.rs | 1 - compiler/rustc_target/src/spec/redox_base.rs | 1 + .../src/spec/riscv32gc_unknown_linux_gnu.rs | 1 - .../src/spec/riscv32i_unknown_none_elf.rs | 1 - .../src/spec/riscv32imac_unknown_none_elf.rs | 1 - .../src/spec/riscv32imc_unknown_none_elf.rs | 1 - .../src/spec/riscv64gc_unknown_linux_gnu.rs | 1 - .../src/spec/riscv64gc_unknown_none_elf.rs | 1 - .../src/spec/riscv64imac_unknown_none_elf.rs | 1 - .../rustc_target/src/spec/s390x_unknown_linux_gnu.rs | 1 - .../src/spec/sparc64_unknown_linux_gnu.rs | 1 - .../rustc_target/src/spec/sparc64_unknown_netbsd.rs | 1 - .../rustc_target/src/spec/sparc64_unknown_openbsd.rs | 1 - .../rustc_target/src/spec/sparc_unknown_linux_gnu.rs | 1 - .../rustc_target/src/spec/sparcv9_sun_solaris.rs | 1 - compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs | 1 - compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs | 1 - .../src/spec/thumbv7a_pc_windows_msvc.rs | 1 - .../src/spec/thumbv7a_uwp_windows_msvc.rs | 1 - .../rustc_target/src/spec/thumbv7em_none_eabi.rs | 1 - .../rustc_target/src/spec/thumbv7em_none_eabihf.rs | 1 - compiler/rustc_target/src/spec/thumbv7m_none_eabi.rs | 1 - .../src/spec/thumbv7neon_linux_androideabi.rs | 1 - .../src/spec/thumbv7neon_unknown_linux_gnueabihf.rs | 1 - .../src/spec/thumbv7neon_unknown_linux_musleabihf.rs | 1 - .../rustc_target/src/spec/thumbv8m_base_none_eabi.rs | 1 - .../rustc_target/src/spec/thumbv8m_main_none_eabi.rs | 1 - .../src/spec/thumbv8m_main_none_eabihf.rs | 1 - compiler/rustc_target/src/spec/vxworks_base.rs | 1 + .../src/spec/wasm32_unknown_emscripten.rs | 1 - .../rustc_target/src/spec/wasm32_unknown_unknown.rs | 1 - compiler/rustc_target/src/spec/wasm32_wasi.rs | 1 - compiler/rustc_target/src/spec/windows_gnu_base.rs | 1 + compiler/rustc_target/src/spec/windows_msvc_base.rs | 1 + .../rustc_target/src/spec/x86_64_apple_darwin.rs | 1 - compiler/rustc_target/src/spec/x86_64_apple_ios.rs | 1 - .../rustc_target/src/spec/x86_64_apple_ios_macabi.rs | 1 - compiler/rustc_target/src/spec/x86_64_apple_tvos.rs | 1 - .../src/spec/x86_64_fortanix_unknown_sgx.rs | 2 +- compiler/rustc_target/src/spec/x86_64_fuchsia.rs | 1 - .../rustc_target/src/spec/x86_64_linux_android.rs | 1 - .../rustc_target/src/spec/x86_64_linux_kernel.rs | 1 - .../rustc_target/src/spec/x86_64_pc_windows_gnu.rs | 1 - .../rustc_target/src/spec/x86_64_pc_windows_msvc.rs | 1 - .../rustc_target/src/spec/x86_64_rumprun_netbsd.rs | 1 - compiler/rustc_target/src/spec/x86_64_sun_solaris.rs | 1 - .../rustc_target/src/spec/x86_64_unknown_cloudabi.rs | 1 - .../src/spec/x86_64_unknown_dragonfly.rs | 1 - .../rustc_target/src/spec/x86_64_unknown_freebsd.rs | 1 - .../rustc_target/src/spec/x86_64_unknown_haiku.rs | 1 - .../rustc_target/src/spec/x86_64_unknown_hermit.rs | 1 - .../src/spec/x86_64_unknown_hermit_kernel.rs | 1 - .../rustc_target/src/spec/x86_64_unknown_illumos.rs | 1 - .../src/spec/x86_64_unknown_l4re_uclibc.rs | 1 - .../src/spec/x86_64_unknown_linux_gnu.rs | 1 - .../src/spec/x86_64_unknown_linux_gnux32.rs | 1 - .../src/spec/x86_64_unknown_linux_musl.rs | 1 - .../rustc_target/src/spec/x86_64_unknown_netbsd.rs | 1 - .../rustc_target/src/spec/x86_64_unknown_openbsd.rs | 1 - .../rustc_target/src/spec/x86_64_unknown_redox.rs | 1 - .../rustc_target/src/spec/x86_64_unknown_uefi.rs | 1 - .../rustc_target/src/spec/x86_64_uwp_windows_gnu.rs | 1 - .../rustc_target/src/spec/x86_64_uwp_windows_msvc.rs | 1 - compiler/rustc_target/src/spec/x86_64_wrs_vxworks.rs | 1 - 161 files changed, 27 insertions(+), 158 deletions(-) create mode 100644 compiler/rustc_target/src/spec/linux_uclibc_base.rs diff --git a/compiler/rustc_target/src/spec/aarch64_apple_darwin.rs b/compiler/rustc_target/src/spec/aarch64_apple_darwin.rs index 201b13a0f8ac..e538e7389fa5 100644 --- a/compiler/rustc_target/src/spec/aarch64_apple_darwin.rs +++ b/compiler/rustc_target/src/spec/aarch64_apple_darwin.rs @@ -19,7 +19,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".to_string(), arch: arch.to_string(), - target_env: String::new(), target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "\u{1}mcount".to_string(), ..base }, diff --git a/compiler/rustc_target/src/spec/aarch64_apple_ios.rs b/compiler/rustc_target/src/spec/aarch64_apple_ios.rs index 0c63b9649e80..43716b08d104 100644 --- a/compiler/rustc_target/src/spec/aarch64_apple_ios.rs +++ b/compiler/rustc_target/src/spec/aarch64_apple_ios.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_env: String::new(), target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/aarch64_apple_tvos.rs b/compiler/rustc_target/src/spec/aarch64_apple_tvos.rs index c81a215b7f63..3085df7176d6 100644 --- a/compiler/rustc_target/src/spec/aarch64_apple_tvos.rs +++ b/compiler/rustc_target/src/spec/aarch64_apple_tvos.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_env: String::new(), target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/aarch64_fuchsia.rs b/compiler/rustc_target/src/spec/aarch64_fuchsia.rs index ffaf7453dd65..ac2b5ca74a0e 100644 --- a/compiler/rustc_target/src/spec/aarch64_fuchsia.rs +++ b/compiler/rustc_target/src/spec/aarch64_fuchsia.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_env: String::new(), target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, diff --git a/compiler/rustc_target/src/spec/aarch64_linux_android.rs b/compiler/rustc_target/src/spec/aarch64_linux_android.rs index ed859c03209d..92f470332cc8 100644 --- a/compiler/rustc_target/src/spec/aarch64_linux_android.rs +++ b/compiler/rustc_target/src/spec/aarch64_linux_android.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, diff --git a/compiler/rustc_target/src/spec/aarch64_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/aarch64_pc_windows_msvc.rs index 6bef3914b4c0..634ac5a5a2b8 100644 --- a/compiler/rustc_target/src/spec/aarch64_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/aarch64_pc_windows_msvc.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_env: "msvc".to_string(), target_vendor: "pc".to_string(), linker_flavor: LinkerFlavor::Msvc, options: base, diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_cloudabi.rs b/compiler/rustc_target/src/spec/aarch64_unknown_cloudabi.rs index 9ad1e5ba36ca..630db3d9bac0 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_cloudabi.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_cloudabi.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_freebsd.rs b/compiler/rustc_target/src/spec/aarch64_unknown_freebsd.rs index 5e704567b69d..15ee649822db 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_freebsd.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs b/compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs index 5b4c7a2a6f69..97dc416d6723 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: base, diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs index 99f841989eba..4d13c8c0e1e1 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-linux-gnu".to_string(), pointer_width: 64, - target_env: "gnu".to_string(), data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), target_vendor: "unknown".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/aarch64_unknown_linux_musl.rs index e3892cc74518..cda03a0707bf 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_linux_musl.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-linux-musl".to_string(), pointer_width: 64, - target_env: "musl".to_string(), data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), target_vendor: "unknown".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_netbsd.rs b/compiler/rustc_target/src/spec/aarch64_unknown_netbsd.rs index c601d847784c..6564b3a49b76 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_netbsd.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "__mcount".to_string(), ..base }, diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_none.rs b/compiler/rustc_target/src/spec/aarch64_unknown_none.rs index 03b9f53a5325..9ae126555eaa 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_none.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_none.rs @@ -24,7 +24,6 @@ pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-none".to_string(), pointer_width: 64, - target_env: String::new(), target_vendor: String::new(), data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_none_softfloat.rs b/compiler/rustc_target/src/spec/aarch64_unknown_none_softfloat.rs index a1fbe5b58197..341242b65dbf 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_none_softfloat.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_none_softfloat.rs @@ -24,7 +24,6 @@ pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-none".to_string(), pointer_width: 64, - target_env: String::new(), target_vendor: String::new(), data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_openbsd.rs b/compiler/rustc_target/src/spec/aarch64_unknown_openbsd.rs index fefab5df9ae8..daae49b4d58f 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_openbsd.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_redox.rs b/compiler/rustc_target/src/spec/aarch64_unknown_redox.rs index fcdc0e873a01..b009b0a22ea1 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_redox.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_redox.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_env: "relibc".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/aarch64_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/aarch64_uwp_windows_msvc.rs index 5b80d55cb0ab..16a808c9c2cd 100644 --- a/compiler/rustc_target/src/spec/aarch64_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/aarch64_uwp_windows_msvc.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_env: "msvc".to_string(), target_vendor: "uwp".to_string(), linker_flavor: LinkerFlavor::Msvc, options: base, diff --git a/compiler/rustc_target/src/spec/aarch64_wrs_vxworks.rs b/compiler/rustc_target/src/spec/aarch64_wrs_vxworks.rs index 411814b2206f..b82785fec6f9 100644 --- a/compiler/rustc_target/src/spec/aarch64_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/aarch64_wrs_vxworks.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_env: "gnu".to_string(), target_vendor: "wrs".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, diff --git a/compiler/rustc_target/src/spec/arm_linux_androideabi.rs b/compiler/rustc_target/src/spec/arm_linux_androideabi.rs index a2996655ee4f..e2dcd77107fd 100644 --- a/compiler/rustc_target/src/spec/arm_linux_androideabi.rs +++ b/compiler/rustc_target/src/spec/arm_linux_androideabi.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, diff --git a/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabi.rs index 495bb5477b61..cdd2083f5023 100644 --- a/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabi.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabihf.rs b/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabihf.rs index 32bed7fe0112..18d66bd5e360 100644 --- a/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabihf.rs +++ b/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabihf.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/arm_unknown_linux_musleabi.rs b/compiler/rustc_target/src/spec/arm_unknown_linux_musleabi.rs index 2b99f700a4cb..d9fad6e7b1e4 100644 --- a/compiler/rustc_target/src/spec/arm_unknown_linux_musleabi.rs +++ b/compiler/rustc_target/src/spec/arm_unknown_linux_musleabi.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/arm_unknown_linux_musleabihf.rs b/compiler/rustc_target/src/spec/arm_unknown_linux_musleabihf.rs index e494e08d4e64..8c8632fa3753 100644 --- a/compiler/rustc_target/src/spec/arm_unknown_linux_musleabihf.rs +++ b/compiler/rustc_target/src/spec/arm_unknown_linux_musleabihf.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/armebv7r_none_eabi.rs b/compiler/rustc_target/src/spec/armebv7r_none_eabi.rs index 3ba9c1028a72..5a880173a12a 100644 --- a/compiler/rustc_target/src/spec/armebv7r_none_eabi.rs +++ b/compiler/rustc_target/src/spec/armebv7r_none_eabi.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: "".to_string(), target_vendor: "".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/armebv7r_none_eabihf.rs b/compiler/rustc_target/src/spec/armebv7r_none_eabihf.rs index cfa083275e56..b9440ff9ee7b 100644 --- a/compiler/rustc_target/src/spec/armebv7r_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/armebv7r_none_eabihf.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: String::new(), target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/armv4t_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/armv4t_unknown_linux_gnueabi.rs index 5af602c47147..b96d95f1a2d9 100644 --- a/compiler/rustc_target/src/spec/armv4t_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/armv4t_unknown_linux_gnueabi.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/armv5te_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/armv5te_unknown_linux_gnueabi.rs index 8775d8bd58a6..f1571cf04164 100644 --- a/compiler/rustc_target/src/spec/armv5te_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/armv5te_unknown_linux_gnueabi.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/armv5te_unknown_linux_musleabi.rs b/compiler/rustc_target/src/spec/armv5te_unknown_linux_musleabi.rs index da727657cb4e..df50a0e25b78 100644 --- a/compiler/rustc_target/src/spec/armv5te_unknown_linux_musleabi.rs +++ b/compiler/rustc_target/src/spec/armv5te_unknown_linux_musleabi.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/armv6_unknown_freebsd.rs b/compiler/rustc_target/src/spec/armv6_unknown_freebsd.rs index 6c03b4840ed6..5e67a02f7e4c 100644 --- a/compiler/rustc_target/src/spec/armv6_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/armv6_unknown_freebsd.rs @@ -7,11 +7,11 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: "gnueabihf".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { + target_env: "gnueabihf".to_string(), features: "+v6,+vfp2,-d32".to_string(), max_atomic_width: Some(64), unsupported_abis: super::arm_base::unsupported_abis(), diff --git a/compiler/rustc_target/src/spec/armv6_unknown_netbsd_eabihf.rs b/compiler/rustc_target/src/spec/armv6_unknown_netbsd_eabihf.rs index 75ce18f8dd99..53b0f57fbcad 100644 --- a/compiler/rustc_target/src/spec/armv6_unknown_netbsd_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv6_unknown_netbsd_eabihf.rs @@ -8,11 +8,11 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: "eabihf".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { + target_env: "eabihf".to_string(), features: "+v6,+vfp2,-d32".to_string(), unsupported_abis: super::arm_base::unsupported_abis(), target_mcount: "__mcount".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7_apple_ios.rs b/compiler/rustc_target/src/spec/armv7_apple_ios.rs index 3fa2abd3b2a4..ed3324737521 100644 --- a/compiler/rustc_target/src/spec/armv7_apple_ios.rs +++ b/compiler/rustc_target/src/spec/armv7_apple_ios.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { 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".to_string(), arch: "arm".to_string(), - target_env: String::new(), target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/armv7_linux_androideabi.rs b/compiler/rustc_target/src/spec/armv7_linux_androideabi.rs index ff95bcb61178..8e0d1f61349d 100644 --- a/compiler/rustc_target/src/spec/armv7_linux_androideabi.rs +++ b/compiler/rustc_target/src/spec/armv7_linux_androideabi.rs @@ -19,7 +19,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, diff --git a/compiler/rustc_target/src/spec/armv7_unknown_cloudabi_eabihf.rs b/compiler/rustc_target/src/spec/armv7_unknown_cloudabi_eabihf.rs index e712d7e26904..21f7615577bb 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_cloudabi_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_cloudabi_eabihf.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "\u{1}mcount".to_string(), ..base }, diff --git a/compiler/rustc_target/src/spec/armv7_unknown_freebsd.rs b/compiler/rustc_target/src/spec/armv7_unknown_freebsd.rs index 4e26db53f5d1..17455ef48fb9 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_freebsd.rs @@ -7,11 +7,11 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: "gnueabihf".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { + target_env: "gnueabihf".to_string(), features: "+v7,+vfp3,-d32,+thumb2,-neon".to_string(), max_atomic_width: Some(64), unsupported_abis: super::arm_base::unsupported_abis(), diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabi.rs index 7f31f6183c05..c0b2dded55bb 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabi.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabihf.rs b/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabihf.rs index edbd923a3d5e..da1a9281e4c7 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabihf.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabihf.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabi.rs b/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabi.rs index 0200ab7240c0..a3a7ce53d901 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabi.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabi.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabihf.rs b/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabihf.rs index 5bd32d8aaddf..2cb3163dbb4c 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabihf.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabihf.rs @@ -12,7 +12,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/armv7_unknown_netbsd_eabihf.rs b/compiler/rustc_target/src/spec/armv7_unknown_netbsd_eabihf.rs index 5d8eab0c4143..43a4176f0d7c 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_netbsd_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_netbsd_eabihf.rs @@ -7,11 +7,11 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: "eabihf".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { + target_env: "eabihf".to_string(), features: "+v7,+vfp3,-d32,+thumb2,-neon".to_string(), cpu: "generic".to_string(), max_atomic_width: Some(64), diff --git a/compiler/rustc_target/src/spec/armv7_wrs_vxworks_eabihf.rs b/compiler/rustc_target/src/spec/armv7_wrs_vxworks_eabihf.rs index 3615dbce01f5..c44feff582e3 100644 --- a/compiler/rustc_target/src/spec/armv7_wrs_vxworks_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv7_wrs_vxworks_eabihf.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: "gnu".to_string(), target_vendor: "wrs".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/armv7a_none_eabi.rs b/compiler/rustc_target/src/spec/armv7a_none_eabi.rs index 464d66473cfd..9da962957c33 100644 --- a/compiler/rustc_target/src/spec/armv7a_none_eabi.rs +++ b/compiler/rustc_target/src/spec/armv7a_none_eabi.rs @@ -35,7 +35,6 @@ pub fn target() -> Target { Target { llvm_target: "armv7a-none-eabi".to_string(), pointer_width: 32, - target_env: String::new(), target_vendor: String::new(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7a_none_eabihf.rs b/compiler/rustc_target/src/spec/armv7a_none_eabihf.rs index 9f0d91af3e99..6bb51792c30a 100644 --- a/compiler/rustc_target/src/spec/armv7a_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv7a_none_eabihf.rs @@ -23,7 +23,6 @@ pub fn target() -> Target { Target { llvm_target: "armv7a-none-eabihf".to_string(), pointer_width: 32, - target_env: String::new(), target_vendor: String::new(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7r_none_eabi.rs b/compiler/rustc_target/src/spec/armv7r_none_eabi.rs index ad2726e6508e..c49502c04389 100644 --- a/compiler/rustc_target/src/spec/armv7r_none_eabi.rs +++ b/compiler/rustc_target/src/spec/armv7r_none_eabi.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: "".to_string(), target_vendor: "".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/armv7r_none_eabihf.rs b/compiler/rustc_target/src/spec/armv7r_none_eabihf.rs index bed0126b3d91..fb59c7fa2cb8 100644 --- a/compiler/rustc_target/src/spec/armv7r_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv7r_none_eabihf.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: "".to_string(), target_vendor: "".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/armv7s_apple_ios.rs b/compiler/rustc_target/src/spec/armv7s_apple_ios.rs index fdcb097fb5d8..9f88e7f1d324 100644 --- a/compiler/rustc_target/src/spec/armv7s_apple_ios.rs +++ b/compiler/rustc_target/src/spec/armv7s_apple_ios.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { 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".to_string(), arch: "arm".to_string(), - target_env: String::new(), target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/avr_gnu_base.rs b/compiler/rustc_target/src/spec/avr_gnu_base.rs index 65271c2cb77b..5152e2536cb7 100644 --- a/compiler/rustc_target/src/spec/avr_gnu_base.rs +++ b/compiler/rustc_target/src/spec/avr_gnu_base.rs @@ -10,7 +10,6 @@ pub fn target(target_cpu: String) -> Target { llvm_target: "avr-unknown-unknown".to_string(), pointer_width: 16, linker_flavor: LinkerFlavor::Gcc, - target_env: "".to_string(), target_vendor: "unknown".to_string(), options: TargetOptions { target_c_int_width: "16".to_string(), diff --git a/compiler/rustc_target/src/spec/hexagon_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/hexagon_unknown_linux_musl.rs index 80ef0c747b7f..e4de6cac0dc2 100644 --- a/compiler/rustc_target/src/spec/hexagon_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/hexagon_unknown_linux_musl.rs @@ -28,7 +28,6 @@ pub fn target() -> Target { ) .to_string(), arch: "hexagon".to_string(), - target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/i386_apple_ios.rs b/compiler/rustc_target/src/spec/i386_apple_ios.rs index 15b51be12896..c73eb938494f 100644 --- a/compiler/rustc_target/src/spec/i386_apple_ios.rs +++ b/compiler/rustc_target/src/spec/i386_apple_ios.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { f64:32:64-f80:128-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_env: String::new(), target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { max_atomic_width: Some(64), stack_probes: true, ..base }, diff --git a/compiler/rustc_target/src/spec/i686_apple_darwin.rs b/compiler/rustc_target/src/spec/i686_apple_darwin.rs index dae9654c5c4c..58d28d924c85 100644 --- a/compiler/rustc_target/src/spec/i686_apple_darwin.rs +++ b/compiler/rustc_target/src/spec/i686_apple_darwin.rs @@ -22,7 +22,6 @@ pub fn target() -> Target { f64:32:64-f80:128-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_env: String::new(), target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "\u{1}mcount".to_string(), ..base }, diff --git a/compiler/rustc_target/src/spec/i686_linux_android.rs b/compiler/rustc_target/src/spec/i686_linux_android.rs index cb6fbd929f0f..41eab781123d 100644 --- a/compiler/rustc_target/src/spec/i686_linux_android.rs +++ b/compiler/rustc_target/src/spec/i686_linux_android.rs @@ -20,7 +20,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs b/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs index 583938b2ab6c..ce8b8596b4d2 100644 --- a/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs @@ -23,7 +23,6 @@ pub fn target() -> Target { i64:64-f80:32-n8:16:32-a:0:32-S32" .to_string(), arch: "x86".to_string(), - target_env: "gnu".to_string(), target_vendor: "pc".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/i686_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/i686_pc_windows_msvc.rs index 067081105e41..f2a8a6cb3942 100644 --- a/compiler/rustc_target/src/spec/i686_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/i686_pc_windows_msvc.rs @@ -27,7 +27,6 @@ pub fn target() -> Target { i64:64-f80:32-n8:16:32-a:0:32-S32" .to_string(), arch: "x86".to_string(), - target_env: "msvc".to_string(), target_vendor: "pc".to_string(), linker_flavor: LinkerFlavor::Msvc, options: base, diff --git a/compiler/rustc_target/src/spec/i686_unknown_cloudabi.rs b/compiler/rustc_target/src/spec/i686_unknown_cloudabi.rs index cf9853320842..03c77c7f005b 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_cloudabi.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_cloudabi.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/i686_unknown_freebsd.rs b/compiler/rustc_target/src/spec/i686_unknown_freebsd.rs index 6bc3da0796bd..db90fa9e4780 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_freebsd.rs @@ -16,7 +16,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/i686_unknown_haiku.rs b/compiler/rustc_target/src/spec/i686_unknown_haiku.rs index 77d138a15c9c..be513954710f 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_haiku.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_haiku.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs index 13be539d4c75..0bfa621997fa 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/i686_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/i686_unknown_linux_musl.rs index ab69a5675487..9ae4303913b2 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_linux_musl.rs @@ -29,7 +29,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/i686_unknown_netbsd.rs b/compiler/rustc_target/src/spec/i686_unknown_netbsd.rs index 505c9b55ca1a..ac94b8000e3d 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_netbsd.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "__mcount".to_string(), ..base }, diff --git a/compiler/rustc_target/src/spec/i686_unknown_openbsd.rs b/compiler/rustc_target/src/spec/i686_unknown_openbsd.rs index a70573272ca2..a64da65f4ff8 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_openbsd.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/i686_unknown_uefi.rs b/compiler/rustc_target/src/spec/i686_unknown_uefi.rs index 22249ded44b7..ea82139dfa89 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_uefi.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_uefi.rs @@ -82,7 +82,6 @@ pub fn target() -> Target { data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i64:64-f80:32-n8:16:32-a:0:32-S32" .to_string(), - target_env: "".to_string(), target_vendor: "unknown".to_string(), arch: "x86".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Link), diff --git a/compiler/rustc_target/src/spec/i686_uwp_windows_gnu.rs b/compiler/rustc_target/src/spec/i686_uwp_windows_gnu.rs index 199d47c5f246..41e8167c740a 100644 --- a/compiler/rustc_target/src/spec/i686_uwp_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/i686_uwp_windows_gnu.rs @@ -22,7 +22,6 @@ pub fn target() -> Target { i64:64-f80:32-n8:16:32-a:0:32-S32" .to_string(), arch: "x86".to_string(), - target_env: "gnu".to_string(), target_vendor: "uwp".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/i686_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/i686_uwp_windows_msvc.rs index de2f09dcf9aa..bad6812e570c 100644 --- a/compiler/rustc_target/src/spec/i686_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/i686_uwp_windows_msvc.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { i64:64-f80:32-n8:16:32-a:0:32-S32" .to_string(), arch: "x86".to_string(), - target_env: "msvc".to_string(), target_vendor: "uwp".to_string(), linker_flavor: LinkerFlavor::Msvc, options: base, diff --git a/compiler/rustc_target/src/spec/i686_wrs_vxworks.rs b/compiler/rustc_target/src/spec/i686_wrs_vxworks.rs index dbf65ee1bfb1..e3182f293bad 100644 --- a/compiler/rustc_target/src/spec/i686_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/i686_wrs_vxworks.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_env: "gnu".to_string(), target_vendor: "wrs".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/l4re_base.rs b/compiler/rustc_target/src/spec/l4re_base.rs index 5237b9728b00..cc81b0dabbf7 100644 --- a/compiler/rustc_target/src/spec/l4re_base.rs +++ b/compiler/rustc_target/src/spec/l4re_base.rs @@ -18,6 +18,7 @@ pub fn opts() -> TargetOptions { TargetOptions { target_os: "l4re".to_string(), + target_env: "uclibc".to_string(), executables: true, has_elf_tls: false, panic_strategy: PanicStrategy::Abort, diff --git a/compiler/rustc_target/src/spec/linux_base.rs b/compiler/rustc_target/src/spec/linux_base.rs index 8758e1240849..b3a850591fd0 100644 --- a/compiler/rustc_target/src/spec/linux_base.rs +++ b/compiler/rustc_target/src/spec/linux_base.rs @@ -20,6 +20,7 @@ pub fn opts() -> TargetOptions { TargetOptions { target_os: "linux".to_string(), + target_env: "gnu".to_string(), dynamic_linking: true, executables: true, target_family: Some("unix".to_string()), diff --git a/compiler/rustc_target/src/spec/linux_kernel_base.rs b/compiler/rustc_target/src/spec/linux_kernel_base.rs index 6d929d124478..9c883f9a188f 100644 --- a/compiler/rustc_target/src/spec/linux_kernel_base.rs +++ b/compiler/rustc_target/src/spec/linux_kernel_base.rs @@ -8,6 +8,7 @@ pub fn opts() -> TargetOptions { ); TargetOptions { + target_env: "gnu".to_string(), disable_redzone: true, panic_strategy: PanicStrategy::Abort, stack_probes: true, diff --git a/compiler/rustc_target/src/spec/linux_musl_base.rs b/compiler/rustc_target/src/spec/linux_musl_base.rs index 16cc3b762f62..3a44d3326eba 100644 --- a/compiler/rustc_target/src/spec/linux_musl_base.rs +++ b/compiler/rustc_target/src/spec/linux_musl_base.rs @@ -4,6 +4,7 @@ pub fn opts() -> TargetOptions { let mut base = super::linux_base::opts(); + base.target_env = "musl".to_string(); base.pre_link_objects_fallback = crt_objects::pre_musl_fallback(); base.post_link_objects_fallback = crt_objects::post_musl_fallback(); base.crt_objects_fallback = Some(CrtObjectsFallback::Musl); diff --git a/compiler/rustc_target/src/spec/linux_uclibc_base.rs b/compiler/rustc_target/src/spec/linux_uclibc_base.rs new file mode 100644 index 000000000000..ce7c79c16446 --- /dev/null +++ b/compiler/rustc_target/src/spec/linux_uclibc_base.rs @@ -0,0 +1,5 @@ +use crate::spec::TargetOptions; + +pub fn opts() -> TargetOptions { + TargetOptions { target_env: "uclibc".to_string(), ..super::linux_base::opts() } +} diff --git a/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs index 1ca458dd73b4..5c514302f7b7 100644 --- a/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), - target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/mips64_unknown_linux_muslabi64.rs b/compiler/rustc_target/src/spec/mips64_unknown_linux_muslabi64.rs index 3b715436c178..4e445693ee93 100644 --- a/compiler/rustc_target/src/spec/mips64_unknown_linux_muslabi64.rs +++ b/compiler/rustc_target/src/spec/mips64_unknown_linux_muslabi64.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), - target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs index 746f7c04eaa2..e9d12331c9cc 100644 --- a/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), - target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/mips64el_unknown_linux_muslabi64.rs b/compiler/rustc_target/src/spec/mips64el_unknown_linux_muslabi64.rs index 61d1a1145915..b7175982219a 100644 --- a/compiler/rustc_target/src/spec/mips64el_unknown_linux_muslabi64.rs +++ b/compiler/rustc_target/src/spec/mips64el_unknown_linux_muslabi64.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), - target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "_mcount".to_string(), ..base }, diff --git a/compiler/rustc_target/src/spec/mips_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/mips_unknown_linux_gnu.rs index 0348446faabb..de8968016df7 100644 --- a/compiler/rustc_target/src/spec/mips_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/mips_unknown_linux_gnu.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/mips_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/mips_unknown_linux_musl.rs index b323b307041b..2b8aba5a1444 100644 --- a/compiler/rustc_target/src/spec/mips_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/mips_unknown_linux_musl.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/mips_unknown_linux_uclibc.rs b/compiler/rustc_target/src/spec/mips_unknown_linux_uclibc.rs index d7988fd0e7c3..49b563ccf043 100644 --- a/compiler/rustc_target/src/spec/mips_unknown_linux_uclibc.rs +++ b/compiler/rustc_target/src/spec/mips_unknown_linux_uclibc.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - target_env: "uclibc".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { @@ -16,7 +15,7 @@ pub fn target() -> Target { max_atomic_width: Some(32), target_mcount: "_mcount".to_string(), - ..super::linux_base::opts() + ..super::linux_uclibc_base::opts() }, } } diff --git a/compiler/rustc_target/src/spec/mipsel_sony_psp.rs b/compiler/rustc_target/src/spec/mipsel_sony_psp.rs index b14a23ac2482..37c561c21971 100644 --- a/compiler/rustc_target/src/spec/mipsel_sony_psp.rs +++ b/compiler/rustc_target/src/spec/mipsel_sony_psp.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - target_env: "".to_string(), target_vendor: "sony".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/mipsel_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/mipsel_unknown_linux_gnu.rs index de593329a381..ac9840335396 100644 --- a/compiler/rustc_target/src/spec/mipsel_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/mipsel_unknown_linux_gnu.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/mipsel_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/mipsel_unknown_linux_musl.rs index 20d4bdfb0bb8..4b98eccc837d 100644 --- a/compiler/rustc_target/src/spec/mipsel_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/mipsel_unknown_linux_musl.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "_mcount".to_string(), ..base }, diff --git a/compiler/rustc_target/src/spec/mipsel_unknown_linux_uclibc.rs b/compiler/rustc_target/src/spec/mipsel_unknown_linux_uclibc.rs index 56b66faa5ef5..2914a6c48916 100644 --- a/compiler/rustc_target/src/spec/mipsel_unknown_linux_uclibc.rs +++ b/compiler/rustc_target/src/spec/mipsel_unknown_linux_uclibc.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - target_env: "uclibc".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, @@ -16,7 +15,7 @@ pub fn target() -> Target { max_atomic_width: Some(32), target_mcount: "_mcount".to_string(), - ..super::linux_base::opts() + ..super::linux_uclibc_base::opts() }, } } diff --git a/compiler/rustc_target/src/spec/mipsisa32r6_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/mipsisa32r6_unknown_linux_gnu.rs index 467470bc8c4c..a5be34f310cf 100644 --- a/compiler/rustc_target/src/spec/mipsisa32r6_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/mipsisa32r6_unknown_linux_gnu.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/mipsisa32r6el_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/mipsisa32r6el_unknown_linux_gnu.rs index a5c052e77f0f..bd606b2de3cd 100644 --- a/compiler/rustc_target/src/spec/mipsisa32r6el_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/mipsisa32r6el_unknown_linux_gnu.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/mipsisa64r6_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/mipsisa64r6_unknown_linux_gnuabi64.rs index ae6dbcb14c58..d5371048f6d3 100644 --- a/compiler/rustc_target/src/spec/mipsisa64r6_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/mipsisa64r6_unknown_linux_gnuabi64.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), - target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs index 4b2a0a1795df..cecc82bbadd5 100644 --- a/compiler/rustc_target/src/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), - target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index b226016b3b2f..0173328df84c 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -65,6 +65,7 @@ mod linux_base; mod linux_kernel_base; mod linux_musl_base; +mod linux_uclibc_base; mod msvc_base; mod netbsd_base; mod openbsd_base; @@ -667,8 +668,6 @@ pub struct Target { pub llvm_target: String, /// Number of bits in a pointer. Influences the `target_pointer_width` `cfg` variable. pub pointer_width: u32, - /// Environment name to use for conditional compilation. - pub target_env: String, /// Vendor name to use for conditional compilation. pub target_vendor: String, /// Architecture to use for ABI considerations. Valid options include: "x86", @@ -708,6 +707,8 @@ pub struct TargetOptions { pub target_c_int_width: String, /// OS name to use for conditional compilation. Defaults to "none". pub target_os: String, + /// Environment name to use for conditional compilation. Defaults to "". + pub target_env: String, /// Linker to invoke pub linker: Option, @@ -990,6 +991,7 @@ fn default() -> TargetOptions { target_endian: "little".to_string(), target_c_int_width: "32".to_string(), target_os: "none".to_string(), + target_env: String::new(), linker: option_env!("CFG_DEFAULT_LINKER").map(|s| s.to_string()), lld_flavor: LldFlavor::Ld, pre_link_args: LinkArgs::new(), @@ -1165,7 +1167,6 @@ pub fn from_json(obj: Json) -> Result { .map_err(|_| "target-pointer-width must be an integer".to_string())?, data_layout: get_req_field("data-layout")?, arch: get_req_field("arch")?, - target_env: get_opt_field("env", ""), target_vendor: get_opt_field("vendor", "unknown"), linker_flavor: LinkerFlavor::from_str(&*get_req_field("linker-flavor")?) .ok_or_else(|| format!("linker flavor must be {}", LinkerFlavor::one_of()))?, @@ -1414,6 +1415,7 @@ macro_rules! key { key!(target_endian); key!(target_c_int_width); key!(target_os = "os"); + key!(target_env = "env"); key!(linker, optional); key!(lld_flavor, LldFlavor)?; key!(pre_link_objects, link_objects); @@ -1643,15 +1645,15 @@ macro_rules! target_option_val { target_val!(llvm_target); d.insert("target-pointer-width".to_string(), self.pointer_width.to_string().to_json()); target_val!(arch); - target_val!(target_env, "env"); target_val!(target_vendor, "vendor"); target_val!(data_layout); target_val!(linker_flavor); + target_option_val!(is_builtin); target_option_val!(target_endian); target_option_val!(target_c_int_width); target_option_val!(target_os, "os"); - target_option_val!(is_builtin); + target_option_val!(target_env, "env"); target_option_val!(linker); target_option_val!(lld_flavor); target_option_val!(pre_link_objects); diff --git a/compiler/rustc_target/src/spec/msp430_none_elf.rs b/compiler/rustc_target/src/spec/msp430_none_elf.rs index 0b85d5e31da2..83fb5da9cd0c 100644 --- a/compiler/rustc_target/src/spec/msp430_none_elf.rs +++ b/compiler/rustc_target/src/spec/msp430_none_elf.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 16, data_layout: "e-m:e-p:16:16-i32:16-i64:16-f32:16-f64:16-a:8-n8:16-S16".to_string(), arch: "msp430".to_string(), - target_env: String::new(), target_vendor: String::new(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs b/compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs index c9a84352c694..5fb344c28d08 100644 --- a/compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs +++ b/compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { llvm_target: "nvptx64-nvidia-cuda".to_string(), target_vendor: "nvidia".to_string(), - target_env: String::new(), linker_flavor: LinkerFlavor::PtxLinker, diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_freebsd.rs b/compiler/rustc_target/src/spec/powerpc64_unknown_freebsd.rs index 2870d56d64c9..7764fab7e5ba 100644 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/powerpc64_unknown_freebsd.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), - target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs index 6091ecfb8251..5d6a15ee8266 100644 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), - target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_musl.rs index 988e84a9fb9f..96aa5152478b 100644 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_musl.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), - target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/powerpc64_wrs_vxworks.rs b/compiler/rustc_target/src/spec/powerpc64_wrs_vxworks.rs index 3a52b55dc653..ee1d6c118e4e 100644 --- a/compiler/rustc_target/src/spec/powerpc64_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/powerpc64_wrs_vxworks.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), - target_env: "gnu".to_string(), target_vendor: "wrs".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), ..base }, diff --git a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs index 1c472bcac299..6cd6630539ec 100644 --- a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), - target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "_mcount".to_string(), ..base }, diff --git a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_musl.rs index 2a8aef916014..2f4a7d80fc88 100644 --- a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_musl.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), - target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "_mcount".to_string(), ..base }, diff --git a/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnu.rs index 7631b46c120b..043ab54a3abf 100644 --- a/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnu.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), - target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnuspe.rs b/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnuspe.rs index cc8c051c5dc1..a6f633f4dc3b 100644 --- a/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnuspe.rs +++ b/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnuspe.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), - target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/powerpc_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc_unknown_linux_musl.rs index efc14a77a162..ff80222676a4 100644 --- a/compiler/rustc_target/src/spec/powerpc_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/powerpc_unknown_linux_musl.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), - target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/powerpc_unknown_netbsd.rs b/compiler/rustc_target/src/spec/powerpc_unknown_netbsd.rs index 08db795494db..09816f230ff6 100644 --- a/compiler/rustc_target/src/spec/powerpc_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/powerpc_unknown_netbsd.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), - target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/powerpc_wrs_vxworks.rs b/compiler/rustc_target/src/spec/powerpc_wrs_vxworks.rs index ffb495bebbda..7f8db38dbce1 100644 --- a/compiler/rustc_target/src/spec/powerpc_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/powerpc_wrs_vxworks.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), - target_env: "gnu".to_string(), target_vendor: "wrs".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/powerpc_wrs_vxworks_spe.rs b/compiler/rustc_target/src/spec/powerpc_wrs_vxworks_spe.rs index 719f50da7684..93e97f0d1cb5 100644 --- a/compiler/rustc_target/src/spec/powerpc_wrs_vxworks_spe.rs +++ b/compiler/rustc_target/src/spec/powerpc_wrs_vxworks_spe.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), - target_env: "gnu".to_string(), target_vendor: "wrs".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/redox_base.rs b/compiler/rustc_target/src/spec/redox_base.rs index 11616045fa8e..04409a1cd047 100644 --- a/compiler/rustc_target/src/spec/redox_base.rs +++ b/compiler/rustc_target/src/spec/redox_base.rs @@ -20,6 +20,7 @@ pub fn opts() -> TargetOptions { TargetOptions { target_os: "redox".to_string(), + target_env: "relibc".to_string(), dynamic_linking: true, executables: true, target_family: Some("unix".to_string()), diff --git a/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs index 39d47f4e053c..84ccf0528400 100644 --- a/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs @@ -4,7 +4,6 @@ pub fn target() -> Target { Target { llvm_target: "riscv32-unknown-linux-gnu".to_string(), pointer_width: 32, - target_env: "gnu".to_string(), data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(), arch: "riscv32".to_string(), target_vendor: "unknown".to_string(), diff --git a/compiler/rustc_target/src/spec/riscv32i_unknown_none_elf.rs b/compiler/rustc_target/src/spec/riscv32i_unknown_none_elf.rs index 963a7f7e2212..fd300348067d 100644 --- a/compiler/rustc_target/src/spec/riscv32i_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/riscv32i_unknown_none_elf.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(), llvm_target: "riscv32".to_string(), pointer_width: 32, - target_env: String::new(), target_vendor: "unknown".to_string(), arch: "riscv32".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/riscv32imac_unknown_none_elf.rs b/compiler/rustc_target/src/spec/riscv32imac_unknown_none_elf.rs index d08c851a3a99..29426e65c43d 100644 --- a/compiler/rustc_target/src/spec/riscv32imac_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/riscv32imac_unknown_none_elf.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(), llvm_target: "riscv32".to_string(), pointer_width: 32, - target_env: String::new(), target_vendor: "unknown".to_string(), arch: "riscv32".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/riscv32imc_unknown_none_elf.rs b/compiler/rustc_target/src/spec/riscv32imc_unknown_none_elf.rs index 2671401d1700..394c5d52cadf 100644 --- a/compiler/rustc_target/src/spec/riscv32imc_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/riscv32imc_unknown_none_elf.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(), llvm_target: "riscv32".to_string(), pointer_width: 32, - target_env: String::new(), target_vendor: "unknown".to_string(), arch: "riscv32".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_gnu.rs index c5502aae218a..fc5439b86696 100644 --- a/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_gnu.rs @@ -4,7 +4,6 @@ pub fn target() -> Target { Target { llvm_target: "riscv64-unknown-linux-gnu".to_string(), pointer_width: 64, - target_env: "gnu".to_string(), data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".to_string(), arch: "riscv64".to_string(), target_vendor: "unknown".to_string(), diff --git a/compiler/rustc_target/src/spec/riscv64gc_unknown_none_elf.rs b/compiler/rustc_target/src/spec/riscv64gc_unknown_none_elf.rs index 90830f4077a4..3d68a722024c 100644 --- a/compiler/rustc_target/src/spec/riscv64gc_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/riscv64gc_unknown_none_elf.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".to_string(), llvm_target: "riscv64".to_string(), pointer_width: 64, - target_env: String::new(), target_vendor: "unknown".to_string(), arch: "riscv64".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/riscv64imac_unknown_none_elf.rs b/compiler/rustc_target/src/spec/riscv64imac_unknown_none_elf.rs index 374295d04bf1..be306ef12bf1 100644 --- a/compiler/rustc_target/src/spec/riscv64imac_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/riscv64imac_unknown_none_elf.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".to_string(), llvm_target: "riscv64".to_string(), pointer_width: 64, - target_env: String::new(), target_vendor: "unknown".to_string(), arch: "riscv64".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs index 53f34eed32a5..11ce9e24ef0e 100644 --- a/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs @@ -17,7 +17,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-a:8:16-n32:64".to_string(), arch: "s390x".to_string(), - target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/sparc64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/sparc64_unknown_linux_gnu.rs index 43f494c2d038..29cd3d729eac 100644 --- a/compiler/rustc_target/src/spec/sparc64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/sparc64_unknown_linux_gnu.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64-S128".to_string(), arch: "sparc64".to_string(), - target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/sparc64_unknown_netbsd.rs b/compiler/rustc_target/src/spec/sparc64_unknown_netbsd.rs index 5bba6222dbf4..c183f989cc04 100644 --- a/compiler/rustc_target/src/spec/sparc64_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/sparc64_unknown_netbsd.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64-S128".to_string(), arch: "sparc64".to_string(), - target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/sparc64_unknown_openbsd.rs b/compiler/rustc_target/src/spec/sparc64_unknown_openbsd.rs index dec1f2606ef4..4edf8c92fdf0 100644 --- a/compiler/rustc_target/src/spec/sparc64_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/sparc64_unknown_openbsd.rs @@ -12,7 +12,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64-S128".to_string(), arch: "sparc64".to_string(), - target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs index 8b669a9f7339..d40630e90039 100644 --- a/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs @@ -12,7 +12,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-f128:64-n32-S64".to_string(), arch: "sparc".to_string(), - target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs b/compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs index 796b6bf876d2..77127dc17030 100644 --- a/compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs +++ b/compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs @@ -17,7 +17,6 @@ pub fn target() -> Target { // differentiation from the sparc64, we could, but that would probably // just be confusing. arch: "sparc64".to_string(), - target_env: String::new(), target_vendor: "sun".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs index d1238e66f668..536aa3497e3d 100644 --- a/compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { Target { llvm_target: "thumbv4t-none-eabi".to_string(), pointer_width: 32, - target_env: "".to_string(), target_vendor: "".to_string(), arch: "arm".to_string(), /* Data layout args are '-' separated: diff --git a/compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs index f89a4b7e8270..2db9fb56646b 100644 --- a/compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: String::new(), target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/thumbv7a_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/thumbv7a_pc_windows_msvc.rs index 97b412ed0233..5f17a3767919 100644 --- a/compiler/rustc_target/src/spec/thumbv7a_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/thumbv7a_pc_windows_msvc.rs @@ -26,7 +26,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:w-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: "msvc".to_string(), target_vendor: "pc".to_string(), linker_flavor: LinkerFlavor::Msvc, diff --git a/compiler/rustc_target/src/spec/thumbv7a_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/thumbv7a_uwp_windows_msvc.rs index cc8036d4fb39..35ba73f1ad5b 100644 --- a/compiler/rustc_target/src/spec/thumbv7a_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/thumbv7a_uwp_windows_msvc.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:w-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: "msvc".to_string(), target_vendor: "uwp".to_string(), linker_flavor: LinkerFlavor::Msvc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/thumbv7em_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv7em_none_eabi.rs index 4bd0585c2d64..3fd7ddc36f78 100644 --- a/compiler/rustc_target/src/spec/thumbv7em_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv7em_none_eabi.rs @@ -17,7 +17,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: String::new(), target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/thumbv7em_none_eabihf.rs b/compiler/rustc_target/src/spec/thumbv7em_none_eabihf.rs index 013370b3dbda..cc06fcdb1e06 100644 --- a/compiler/rustc_target/src/spec/thumbv7em_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/thumbv7em_none_eabihf.rs @@ -16,7 +16,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: String::new(), target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/thumbv7m_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv7m_none_eabi.rs index 69263a853854..986a6fae0a58 100644 --- a/compiler/rustc_target/src/spec/thumbv7m_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv7m_none_eabi.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: String::new(), target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/thumbv7neon_linux_androideabi.rs b/compiler/rustc_target/src/spec/thumbv7neon_linux_androideabi.rs index 4e26c1354968..b03a6045cafc 100644 --- a/compiler/rustc_target/src/spec/thumbv7neon_linux_androideabi.rs +++ b/compiler/rustc_target/src/spec/thumbv7neon_linux_androideabi.rs @@ -19,7 +19,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: "".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, diff --git a/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_gnueabihf.rs b/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_gnueabihf.rs index 1b4727189339..26ac3adfb466 100644 --- a/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_gnueabihf.rs +++ b/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_gnueabihf.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_musleabihf.rs b/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_musleabihf.rs index ac0e6ad7a23f..f74d8121bdea 100644 --- a/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_musleabihf.rs +++ b/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_musleabihf.rs @@ -16,7 +16,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/thumbv8m_base_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv8m_base_none_eabi.rs index a0b4075a9e57..d2b4b064742f 100644 --- a/compiler/rustc_target/src/spec/thumbv8m_base_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv8m_base_none_eabi.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: String::new(), target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/thumbv8m_main_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv8m_main_none_eabi.rs index 8e033f6a8de9..2a5f9bd679c7 100644 --- a/compiler/rustc_target/src/spec/thumbv8m_main_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv8m_main_none_eabi.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: String::new(), target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/thumbv8m_main_none_eabihf.rs b/compiler/rustc_target/src/spec/thumbv8m_main_none_eabihf.rs index ed0fca59b34a..1c10786a2abf 100644 --- a/compiler/rustc_target/src/spec/thumbv8m_main_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/thumbv8m_main_none_eabihf.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_env: String::new(), target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/vxworks_base.rs b/compiler/rustc_target/src/spec/vxworks_base.rs index 56a83194e9eb..a2e89fafa8f3 100644 --- a/compiler/rustc_target/src/spec/vxworks_base.rs +++ b/compiler/rustc_target/src/spec/vxworks_base.rs @@ -18,6 +18,7 @@ pub fn opts() -> TargetOptions { TargetOptions { target_os: "vxworks".to_string(), + target_env: "gnu".to_string(), linker: Some("wr-c++".to_string()), exe_suffix: ".vxe".to_string(), dynamic_linking: true, diff --git a/compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs b/compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs index f0da2c2986ba..3e962de5cc10 100644 --- a/compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs +++ b/compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs @@ -32,7 +32,6 @@ pub fn target() -> Target { Target { llvm_target: "wasm32-unknown-emscripten".to_string(), pointer_width: 32, - target_env: String::new(), target_vendor: "unknown".to_string(), data_layout: "e-m:e-p:32:32-i64:64-n32:64-S128".to_string(), arch: "wasm32".to_string(), diff --git a/compiler/rustc_target/src/spec/wasm32_unknown_unknown.rs b/compiler/rustc_target/src/spec/wasm32_unknown_unknown.rs index c8c0d7117c92..c375896b3bff 100644 --- a/compiler/rustc_target/src/spec/wasm32_unknown_unknown.rs +++ b/compiler/rustc_target/src/spec/wasm32_unknown_unknown.rs @@ -34,7 +34,6 @@ pub fn target() -> Target { Target { llvm_target: "wasm32-unknown-unknown".to_string(), pointer_width: 32, - target_env: String::new(), target_vendor: "unknown".to_string(), data_layout: "e-m:e-p:32:32-i64:64-n32:64-S128".to_string(), arch: "wasm32".to_string(), diff --git a/compiler/rustc_target/src/spec/wasm32_wasi.rs b/compiler/rustc_target/src/spec/wasm32_wasi.rs index 0bd6c2a9e19c..a33ecee9c9ef 100644 --- a/compiler/rustc_target/src/spec/wasm32_wasi.rs +++ b/compiler/rustc_target/src/spec/wasm32_wasi.rs @@ -108,7 +108,6 @@ pub fn target() -> Target { Target { llvm_target: "wasm32-wasi".to_string(), pointer_width: 32, - target_env: String::new(), target_vendor: String::new(), data_layout: "e-m:e-p:32:32-i64:64-n32:64-S128".to_string(), arch: "wasm32".to_string(), diff --git a/compiler/rustc_target/src/spec/windows_gnu_base.rs b/compiler/rustc_target/src/spec/windows_gnu_base.rs index b06f3ebed3c4..f930fe6b8ab7 100644 --- a/compiler/rustc_target/src/spec/windows_gnu_base.rs +++ b/compiler/rustc_target/src/spec/windows_gnu_base.rs @@ -63,6 +63,7 @@ pub fn opts() -> TargetOptions { TargetOptions { target_os: "windows".to_string(), + target_env: "gnu".to_string(), // FIXME(#13846) this should be enabled for windows function_sections: false, linker: Some("gcc".to_string()), diff --git a/compiler/rustc_target/src/spec/windows_msvc_base.rs b/compiler/rustc_target/src/spec/windows_msvc_base.rs index 68d21473261c..7dfe5eb42bbf 100644 --- a/compiler/rustc_target/src/spec/windows_msvc_base.rs +++ b/compiler/rustc_target/src/spec/windows_msvc_base.rs @@ -5,6 +5,7 @@ pub fn opts() -> TargetOptions { TargetOptions { target_os: "windows".to_string(), + target_env: "msvc".to_string(), dynamic_linking: true, dll_prefix: String::new(), dll_suffix: ".dll".to_string(), diff --git a/compiler/rustc_target/src/spec/x86_64_apple_darwin.rs b/compiler/rustc_target/src/spec/x86_64_apple_darwin.rs index 38cfcc0593ae..f515396c3429 100644 --- a/compiler/rustc_target/src/spec/x86_64_apple_darwin.rs +++ b/compiler/rustc_target/src/spec/x86_64_apple_darwin.rs @@ -24,7 +24,6 @@ pub fn target() -> Target { data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: arch.to_string(), - target_env: String::new(), target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "\u{1}mcount".to_string(), ..base }, diff --git a/compiler/rustc_target/src/spec/x86_64_apple_ios.rs b/compiler/rustc_target/src/spec/x86_64_apple_ios.rs index 46e1b383c55c..afeb8708e832 100644 --- a/compiler/rustc_target/src/spec/x86_64_apple_ios.rs +++ b/compiler/rustc_target/src/spec/x86_64_apple_ios.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_env: String::new(), target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { max_atomic_width: Some(64), stack_probes: true, ..base }, diff --git a/compiler/rustc_target/src/spec/x86_64_apple_ios_macabi.rs b/compiler/rustc_target/src/spec/x86_64_apple_ios_macabi.rs index e2a6d76ef3a9..319eef7d8065 100644 --- a/compiler/rustc_target/src/spec/x86_64_apple_ios_macabi.rs +++ b/compiler/rustc_target/src/spec/x86_64_apple_ios_macabi.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_env: String::new(), target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { max_atomic_width: Some(64), stack_probes: true, ..base }, diff --git a/compiler/rustc_target/src/spec/x86_64_apple_tvos.rs b/compiler/rustc_target/src/spec/x86_64_apple_tvos.rs index 223aabdef5f9..a96bb2319297 100644 --- a/compiler/rustc_target/src/spec/x86_64_apple_tvos.rs +++ b/compiler/rustc_target/src/spec/x86_64_apple_tvos.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:o-i64:64-f80:128-n8:16:32:64-S128".to_string(), arch: "x86_64".to_string(), - target_env: String::new(), target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { max_atomic_width: Some(64), stack_probes: true, ..base }, diff --git a/compiler/rustc_target/src/spec/x86_64_fortanix_unknown_sgx.rs b/compiler/rustc_target/src/spec/x86_64_fortanix_unknown_sgx.rs index 6000f0340daa..2badd3a7fd47 100644 --- a/compiler/rustc_target/src/spec/x86_64_fortanix_unknown_sgx.rs +++ b/compiler/rustc_target/src/spec/x86_64_fortanix_unknown_sgx.rs @@ -56,6 +56,7 @@ pub fn target() -> Target { ]; let opts = TargetOptions { target_os: "unknown".into(), + target_env: "sgx".into(), dynamic_linking: false, executables: true, linker_is_gnu: true, @@ -78,7 +79,6 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-elf".into(), pointer_width: 64, - target_env: "sgx".into(), target_vendor: "fortanix".into(), data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .into(), diff --git a/compiler/rustc_target/src/spec/x86_64_fuchsia.rs b/compiler/rustc_target/src/spec/x86_64_fuchsia.rs index e8f9bc4f7cab..3a2fe0e09a77 100644 --- a/compiler/rustc_target/src/spec/x86_64_fuchsia.rs +++ b/compiler/rustc_target/src/spec/x86_64_fuchsia.rs @@ -12,7 +12,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_env: String::new(), target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: base, diff --git a/compiler/rustc_target/src/spec/x86_64_linux_android.rs b/compiler/rustc_target/src/spec/x86_64_linux_android.rs index 24f4df87f6e0..dd240f9f94c7 100644 --- a/compiler/rustc_target/src/spec/x86_64_linux_android.rs +++ b/compiler/rustc_target/src/spec/x86_64_linux_android.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/x86_64_linux_kernel.rs b/compiler/rustc_target/src/spec/x86_64_linux_kernel.rs index 19080d9361f1..539dd3007d7a 100644 --- a/compiler/rustc_target/src/spec/x86_64_linux_kernel.rs +++ b/compiler/rustc_target/src/spec/x86_64_linux_kernel.rs @@ -19,7 +19,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), - target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), arch: "x86_64".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs b/compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs index cef07e3de69d..17b5ac7f1682 100644 --- a/compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs @@ -18,7 +18,6 @@ pub fn target() -> Target { data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_env: "gnu".to_string(), target_vendor: "pc".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/x86_64_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/x86_64_pc_windows_msvc.rs index 70365cd533b9..099d5c5efa48 100644 --- a/compiler/rustc_target/src/spec/x86_64_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/x86_64_pc_windows_msvc.rs @@ -12,7 +12,6 @@ pub fn target() -> Target { data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_env: "msvc".to_string(), target_vendor: "pc".to_string(), linker_flavor: LinkerFlavor::Msvc, options: base, diff --git a/compiler/rustc_target/src/spec/x86_64_rumprun_netbsd.rs b/compiler/rustc_target/src/spec/x86_64_rumprun_netbsd.rs index 378bd05bc711..d2fdb68b7df1 100644 --- a/compiler/rustc_target/src/spec/x86_64_rumprun_netbsd.rs +++ b/compiler/rustc_target/src/spec/x86_64_rumprun_netbsd.rs @@ -19,7 +19,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_env: String::new(), target_vendor: "rumprun".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "__mcount".to_string(), ..base }, diff --git a/compiler/rustc_target/src/spec/x86_64_sun_solaris.rs b/compiler/rustc_target/src/spec/x86_64_sun_solaris.rs index 7d020ad509e4..4c703cedf1d1 100644 --- a/compiler/rustc_target/src/spec/x86_64_sun_solaris.rs +++ b/compiler/rustc_target/src/spec/x86_64_sun_solaris.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_env: String::new(), target_vendor: "sun".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_cloudabi.rs b/compiler/rustc_target/src/spec/x86_64_unknown_cloudabi.rs index cc91c1e035dd..38b1e3b1f0dd 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_cloudabi.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_cloudabi.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_dragonfly.rs b/compiler/rustc_target/src/spec/x86_64_unknown_dragonfly.rs index 451bf187d575..e9b041de5987 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_dragonfly.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_dragonfly.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_freebsd.rs b/compiler/rustc_target/src/spec/x86_64_unknown_freebsd.rs index 9ecdba134616..60ceead7f59a 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_freebsd.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_haiku.rs b/compiler/rustc_target/src/spec/x86_64_unknown_haiku.rs index bedc4073f368..bb9f8990c7c3 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_haiku.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_haiku.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_hermit.rs b/compiler/rustc_target/src/spec/x86_64_unknown_hermit.rs index be1865f7664b..0a6dda5da711 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_hermit.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_hermit.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: base, diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_hermit_kernel.rs b/compiler/rustc_target/src/spec/x86_64_unknown_hermit_kernel.rs index 9eed950a9688..74371f408621 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_hermit_kernel.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_hermit_kernel.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: base, diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_illumos.rs b/compiler/rustc_target/src/spec/x86_64_unknown_illumos.rs index 15e7e965e2d8..fe647a9c861c 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_illumos.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_illumos.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_l4re_uclibc.rs b/compiler/rustc_target/src/spec/x86_64_unknown_l4re_uclibc.rs index a857c0873bac..99a690461b6a 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_l4re_uclibc.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_l4re_uclibc.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_env: "uclibc".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Ld, options: base, diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs index bbb63805059e..cbb143d72e78 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnux32.rs b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnux32.rs index 6a5b3faf98be..1027d69ba7e8 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnux32.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnux32.rs @@ -18,7 +18,6 @@ pub fn target() -> Target { i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_env: "gnu".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/x86_64_unknown_linux_musl.rs index e44d28b16410..0c0200e6544d 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_linux_musl.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_env: "musl".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_netbsd.rs b/compiler/rustc_target/src/spec/x86_64_unknown_netbsd.rs index c5c6570a94dc..23e4a6dac011 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_netbsd.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "__mcount".to_string(), ..base }, diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_openbsd.rs b/compiler/rustc_target/src/spec/x86_64_unknown_openbsd.rs index 872523c9ceaf..41bf0a22017e 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_openbsd.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_env: String::new(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_redox.rs b/compiler/rustc_target/src/spec/x86_64_unknown_redox.rs index bec51a4b9f98..aa1a1db9e832 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_redox.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_redox.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_env: "relibc".to_string(), target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs b/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs index 7907247dba38..6fe0a9dcc054 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs @@ -33,7 +33,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), - target_env: "".to_string(), target_vendor: "unknown".to_string(), arch: "x86_64".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Link), diff --git a/compiler/rustc_target/src/spec/x86_64_uwp_windows_gnu.rs b/compiler/rustc_target/src/spec/x86_64_uwp_windows_gnu.rs index f7c88068eaf7..b3f7e1d1ae67 100644 --- a/compiler/rustc_target/src/spec/x86_64_uwp_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/x86_64_uwp_windows_gnu.rs @@ -17,7 +17,6 @@ pub fn target() -> Target { data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_env: "gnu".to_string(), target_vendor: "uwp".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, diff --git a/compiler/rustc_target/src/spec/x86_64_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/x86_64_uwp_windows_msvc.rs index 2c74b7a71419..bab3e6d1118c 100644 --- a/compiler/rustc_target/src/spec/x86_64_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/x86_64_uwp_windows_msvc.rs @@ -12,7 +12,6 @@ pub fn target() -> Target { data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_env: "msvc".to_string(), target_vendor: "uwp".to_string(), linker_flavor: LinkerFlavor::Msvc, options: base, diff --git a/compiler/rustc_target/src/spec/x86_64_wrs_vxworks.rs b/compiler/rustc_target/src/spec/x86_64_wrs_vxworks.rs index 942395bedd0a..f604772cb98e 100644 --- a/compiler/rustc_target/src/spec/x86_64_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/x86_64_wrs_vxworks.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_env: "gnu".to_string(), target_vendor: "wrs".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, From b294cc71a2244fb11dad0b1b22e9f27d4b8fba47 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Thu, 8 Oct 2020 22:10:13 +0300 Subject: [PATCH 5/7] rustc_target: Move `target_vendor` from `Target` to `TargetOptions` --- .../src/spec/aarch64_apple_darwin.rs | 1 - .../rustc_target/src/spec/aarch64_apple_ios.rs | 1 - .../rustc_target/src/spec/aarch64_apple_tvos.rs | 1 - .../rustc_target/src/spec/aarch64_fuchsia.rs | 1 - .../src/spec/aarch64_linux_android.rs | 1 - .../src/spec/aarch64_pc_windows_msvc.rs | 1 - .../src/spec/aarch64_unknown_cloudabi.rs | 1 - .../src/spec/aarch64_unknown_freebsd.rs | 1 - .../src/spec/aarch64_unknown_hermit.rs | 1 - .../src/spec/aarch64_unknown_linux_gnu.rs | 1 - .../src/spec/aarch64_unknown_linux_musl.rs | 1 - .../src/spec/aarch64_unknown_netbsd.rs | 1 - .../src/spec/aarch64_unknown_none.rs | 2 +- .../src/spec/aarch64_unknown_none_softfloat.rs | 2 +- .../src/spec/aarch64_unknown_openbsd.rs | 1 - .../src/spec/aarch64_unknown_redox.rs | 1 - .../src/spec/aarch64_uwp_windows_msvc.rs | 1 - .../rustc_target/src/spec/aarch64_wrs_vxworks.rs | 1 - compiler/rustc_target/src/spec/apple_base.rs | 1 + .../src/spec/arm_linux_androideabi.rs | 1 - .../src/spec/arm_unknown_linux_gnueabi.rs | 1 - .../src/spec/arm_unknown_linux_gnueabihf.rs | 1 - .../src/spec/arm_unknown_linux_musleabi.rs | 1 - .../src/spec/arm_unknown_linux_musleabihf.rs | 1 - .../rustc_target/src/spec/armebv7r_none_eabi.rs | 2 +- .../src/spec/armebv7r_none_eabihf.rs | 2 +- .../src/spec/armv4t_unknown_linux_gnueabi.rs | 1 - .../src/spec/armv5te_unknown_linux_gnueabi.rs | 1 - .../src/spec/armv5te_unknown_linux_musleabi.rs | 1 - .../src/spec/armv6_unknown_freebsd.rs | 1 - .../src/spec/armv6_unknown_netbsd_eabihf.rs | 1 - .../rustc_target/src/spec/armv7_apple_ios.rs | 1 - .../src/spec/armv7_linux_androideabi.rs | 1 - .../src/spec/armv7_unknown_cloudabi_eabihf.rs | 1 - .../src/spec/armv7_unknown_freebsd.rs | 1 - .../src/spec/armv7_unknown_linux_gnueabi.rs | 1 - .../src/spec/armv7_unknown_linux_gnueabihf.rs | 1 - .../src/spec/armv7_unknown_linux_musleabi.rs | 1 - .../src/spec/armv7_unknown_linux_musleabihf.rs | 1 - .../src/spec/armv7_unknown_netbsd_eabihf.rs | 1 - .../src/spec/armv7_wrs_vxworks_eabihf.rs | 1 - .../rustc_target/src/spec/armv7a_none_eabi.rs | 2 +- .../rustc_target/src/spec/armv7a_none_eabihf.rs | 2 +- .../rustc_target/src/spec/armv7r_none_eabi.rs | 2 +- .../rustc_target/src/spec/armv7r_none_eabihf.rs | 2 +- .../rustc_target/src/spec/armv7s_apple_ios.rs | 1 - compiler/rustc_target/src/spec/avr_gnu_base.rs | 1 - compiler/rustc_target/src/spec/fuchsia_base.rs | 1 + .../src/spec/hexagon_unknown_linux_musl.rs | 1 - compiler/rustc_target/src/spec/i386_apple_ios.rs | 1 - .../rustc_target/src/spec/i686_apple_darwin.rs | 1 - .../rustc_target/src/spec/i686_linux_android.rs | 1 - .../rustc_target/src/spec/i686_pc_windows_gnu.rs | 1 - .../src/spec/i686_pc_windows_msvc.rs | 1 - .../src/spec/i686_unknown_cloudabi.rs | 1 - .../src/spec/i686_unknown_freebsd.rs | 1 - .../rustc_target/src/spec/i686_unknown_haiku.rs | 1 - .../src/spec/i686_unknown_linux_gnu.rs | 1 - .../src/spec/i686_unknown_linux_musl.rs | 1 - .../rustc_target/src/spec/i686_unknown_netbsd.rs | 1 - .../src/spec/i686_unknown_openbsd.rs | 1 - .../rustc_target/src/spec/i686_unknown_uefi.rs | 1 - .../src/spec/i686_uwp_windows_gnu.rs | 1 - .../src/spec/i686_uwp_windows_msvc.rs | 1 - .../rustc_target/src/spec/i686_wrs_vxworks.rs | 1 - .../src/spec/mips64_unknown_linux_gnuabi64.rs | 1 - .../src/spec/mips64_unknown_linux_muslabi64.rs | 1 - .../src/spec/mips64el_unknown_linux_gnuabi64.rs | 1 - .../src/spec/mips64el_unknown_linux_muslabi64.rs | 1 - .../src/spec/mips_unknown_linux_gnu.rs | 1 - .../src/spec/mips_unknown_linux_musl.rs | 1 - .../src/spec/mips_unknown_linux_uclibc.rs | 1 - .../rustc_target/src/spec/mipsel_sony_psp.rs | 2 +- .../src/spec/mipsel_unknown_linux_gnu.rs | 1 - .../src/spec/mipsel_unknown_linux_musl.rs | 1 - .../src/spec/mipsel_unknown_linux_uclibc.rs | 1 - .../src/spec/mipsisa32r6_unknown_linux_gnu.rs | 1 - .../src/spec/mipsisa32r6el_unknown_linux_gnu.rs | 1 - .../spec/mipsisa64r6_unknown_linux_gnuabi64.rs | 1 - .../spec/mipsisa64r6el_unknown_linux_gnuabi64.rs | 1 - compiler/rustc_target/src/spec/mod.rs | 16 +++++----------- .../rustc_target/src/spec/msp430_none_elf.rs | 2 +- .../rustc_target/src/spec/nvptx64_nvidia_cuda.rs | 3 +-- .../src/spec/powerpc64_unknown_freebsd.rs | 1 - .../src/spec/powerpc64_unknown_linux_gnu.rs | 1 - .../src/spec/powerpc64_unknown_linux_musl.rs | 1 - .../src/spec/powerpc64_wrs_vxworks.rs | 1 - .../src/spec/powerpc64le_unknown_linux_gnu.rs | 1 - .../src/spec/powerpc64le_unknown_linux_musl.rs | 1 - .../src/spec/powerpc_unknown_linux_gnu.rs | 1 - .../src/spec/powerpc_unknown_linux_gnuspe.rs | 1 - .../src/spec/powerpc_unknown_linux_musl.rs | 1 - .../src/spec/powerpc_unknown_netbsd.rs | 1 - .../rustc_target/src/spec/powerpc_wrs_vxworks.rs | 1 - .../src/spec/powerpc_wrs_vxworks_spe.rs | 1 - .../src/spec/riscv32gc_unknown_linux_gnu.rs | 1 - .../src/spec/riscv32i_unknown_none_elf.rs | 1 - .../src/spec/riscv32imac_unknown_none_elf.rs | 1 - .../src/spec/riscv32imc_unknown_none_elf.rs | 1 - .../src/spec/riscv64gc_unknown_linux_gnu.rs | 1 - .../src/spec/riscv64gc_unknown_none_elf.rs | 1 - .../src/spec/riscv64imac_unknown_none_elf.rs | 1 - .../src/spec/s390x_unknown_linux_gnu.rs | 1 - compiler/rustc_target/src/spec/solaris_base.rs | 1 + .../src/spec/sparc64_unknown_linux_gnu.rs | 1 - .../src/spec/sparc64_unknown_netbsd.rs | 1 - .../src/spec/sparc64_unknown_openbsd.rs | 1 - .../src/spec/sparc_unknown_linux_gnu.rs | 1 - .../rustc_target/src/spec/sparcv9_sun_solaris.rs | 1 - compiler/rustc_target/src/spec/thumb_base.rs | 1 + .../rustc_target/src/spec/thumbv4t_none_eabi.rs | 1 - .../rustc_target/src/spec/thumbv6m_none_eabi.rs | 1 - .../src/spec/thumbv7a_pc_windows_msvc.rs | 1 - .../src/spec/thumbv7a_uwp_windows_msvc.rs | 1 - .../rustc_target/src/spec/thumbv7em_none_eabi.rs | 1 - .../src/spec/thumbv7em_none_eabihf.rs | 1 - .../rustc_target/src/spec/thumbv7m_none_eabi.rs | 1 - .../src/spec/thumbv7neon_linux_androideabi.rs | 1 - .../spec/thumbv7neon_unknown_linux_gnueabihf.rs | 1 - .../spec/thumbv7neon_unknown_linux_musleabihf.rs | 1 - .../src/spec/thumbv8m_base_none_eabi.rs | 1 - .../src/spec/thumbv8m_main_none_eabi.rs | 1 - .../src/spec/thumbv8m_main_none_eabihf.rs | 1 - compiler/rustc_target/src/spec/vxworks_base.rs | 1 + .../src/spec/wasm32_unknown_emscripten.rs | 1 - .../src/spec/wasm32_unknown_unknown.rs | 1 - compiler/rustc_target/src/spec/wasm32_wasi.rs | 2 +- .../rustc_target/src/spec/windows_gnu_base.rs | 1 + .../rustc_target/src/spec/windows_msvc_base.rs | 1 + .../src/spec/windows_uwp_gnu_base.rs | 1 + .../src/spec/windows_uwp_msvc_base.rs | 1 + .../rustc_target/src/spec/x86_64_apple_darwin.rs | 1 - .../rustc_target/src/spec/x86_64_apple_ios.rs | 1 - .../src/spec/x86_64_apple_ios_macabi.rs | 1 - .../rustc_target/src/spec/x86_64_apple_tvos.rs | 1 - .../src/spec/x86_64_fortanix_unknown_sgx.rs | 2 +- compiler/rustc_target/src/spec/x86_64_fuchsia.rs | 1 - .../src/spec/x86_64_linux_android.rs | 1 - .../rustc_target/src/spec/x86_64_linux_kernel.rs | 1 - .../src/spec/x86_64_pc_windows_gnu.rs | 1 - .../src/spec/x86_64_pc_windows_msvc.rs | 1 - .../src/spec/x86_64_rumprun_netbsd.rs | 2 +- .../rustc_target/src/spec/x86_64_sun_solaris.rs | 1 - .../src/spec/x86_64_unknown_cloudabi.rs | 1 - .../src/spec/x86_64_unknown_dragonfly.rs | 1 - .../src/spec/x86_64_unknown_freebsd.rs | 1 - .../src/spec/x86_64_unknown_haiku.rs | 1 - .../src/spec/x86_64_unknown_hermit.rs | 1 - .../src/spec/x86_64_unknown_hermit_kernel.rs | 1 - .../src/spec/x86_64_unknown_illumos.rs | 1 - .../src/spec/x86_64_unknown_l4re_uclibc.rs | 1 - .../src/spec/x86_64_unknown_linux_gnu.rs | 1 - .../src/spec/x86_64_unknown_linux_gnux32.rs | 1 - .../src/spec/x86_64_unknown_linux_musl.rs | 1 - .../src/spec/x86_64_unknown_netbsd.rs | 1 - .../src/spec/x86_64_unknown_openbsd.rs | 1 - .../src/spec/x86_64_unknown_redox.rs | 1 - .../rustc_target/src/spec/x86_64_unknown_uefi.rs | 1 - .../src/spec/x86_64_uwp_windows_gnu.rs | 1 - .../src/spec/x86_64_uwp_windows_msvc.rs | 1 - .../rustc_target/src/spec/x86_64_wrs_vxworks.rs | 1 - 161 files changed, 28 insertions(+), 163 deletions(-) diff --git a/compiler/rustc_target/src/spec/aarch64_apple_darwin.rs b/compiler/rustc_target/src/spec/aarch64_apple_darwin.rs index e538e7389fa5..7e7975a1dcb7 100644 --- a/compiler/rustc_target/src/spec/aarch64_apple_darwin.rs +++ b/compiler/rustc_target/src/spec/aarch64_apple_darwin.rs @@ -19,7 +19,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".to_string(), arch: arch.to_string(), - target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "\u{1}mcount".to_string(), ..base }, } diff --git a/compiler/rustc_target/src/spec/aarch64_apple_ios.rs b/compiler/rustc_target/src/spec/aarch64_apple_ios.rs index 43716b08d104..ce1e653e7d95 100644 --- a/compiler/rustc_target/src/spec/aarch64_apple_ios.rs +++ b/compiler/rustc_target/src/spec/aarch64_apple_ios.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { features: "+neon,+fp-armv8,+apple-a7".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_apple_tvos.rs b/compiler/rustc_target/src/spec/aarch64_apple_tvos.rs index 3085df7176d6..c0949a474094 100644 --- a/compiler/rustc_target/src/spec/aarch64_apple_tvos.rs +++ b/compiler/rustc_target/src/spec/aarch64_apple_tvos.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { features: "+neon,+fp-armv8,+apple-a7".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_fuchsia.rs b/compiler/rustc_target/src/spec/aarch64_fuchsia.rs index ac2b5ca74a0e..736a69843735 100644 --- a/compiler/rustc_target/src/spec/aarch64_fuchsia.rs +++ b/compiler/rustc_target/src/spec/aarch64_fuchsia.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, } diff --git a/compiler/rustc_target/src/spec/aarch64_linux_android.rs b/compiler/rustc_target/src/spec/aarch64_linux_android.rs index 92f470332cc8..e2cf79769fc4 100644 --- a/compiler/rustc_target/src/spec/aarch64_linux_android.rs +++ b/compiler/rustc_target/src/spec/aarch64_linux_android.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, } diff --git a/compiler/rustc_target/src/spec/aarch64_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/aarch64_pc_windows_msvc.rs index 634ac5a5a2b8..0ccac19e9718 100644 --- a/compiler/rustc_target/src/spec/aarch64_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/aarch64_pc_windows_msvc.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_vendor: "pc".to_string(), linker_flavor: LinkerFlavor::Msvc, options: base, } diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_cloudabi.rs b/compiler/rustc_target/src/spec/aarch64_unknown_cloudabi.rs index 630db3d9bac0..bf6e205640d8 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_cloudabi.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_cloudabi.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_freebsd.rs b/compiler/rustc_target/src/spec/aarch64_unknown_freebsd.rs index 15ee649822db..19b1d247480d 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_freebsd.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, } diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs b/compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs index 97dc416d6723..7a7ff49bf3bc 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: base, } diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs index 4d13c8c0e1e1..c7f6f5ae9a62 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/aarch64_unknown_linux_musl.rs index cda03a0707bf..52f25ae14e19 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_linux_musl.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_netbsd.rs b/compiler/rustc_target/src/spec/aarch64_unknown_netbsd.rs index 6564b3a49b76..0968cf51a8cc 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_netbsd.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "__mcount".to_string(), ..base }, } diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_none.rs b/compiler/rustc_target/src/spec/aarch64_unknown_none.rs index 9ae126555eaa..1b89f8a02b33 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_none.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_none.rs @@ -10,6 +10,7 @@ pub fn target() -> Target { let opts = TargetOptions { + target_vendor: String::new(), linker: Some("rust-lld".to_owned()), features: "+strict-align,+neon,+fp-armv8".to_string(), executables: true, @@ -24,7 +25,6 @@ pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-none".to_string(), pointer_width: 64, - target_vendor: String::new(), data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_none_softfloat.rs b/compiler/rustc_target/src/spec/aarch64_unknown_none_softfloat.rs index 341242b65dbf..2880be34c870 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_none_softfloat.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_none_softfloat.rs @@ -10,6 +10,7 @@ pub fn target() -> Target { let opts = TargetOptions { + target_vendor: String::new(), linker: Some("rust-lld".to_owned()), features: "+strict-align,-neon,-fp-armv8".to_string(), executables: true, @@ -24,7 +25,6 @@ pub fn target() -> Target { Target { llvm_target: "aarch64-unknown-none".to_string(), pointer_width: 64, - target_vendor: String::new(), data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_openbsd.rs b/compiler/rustc_target/src/spec/aarch64_unknown_openbsd.rs index daae49b4d58f..443e75b11e24 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_openbsd.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_redox.rs b/compiler/rustc_target/src/spec/aarch64_unknown_redox.rs index b009b0a22ea1..0f049b47972d 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_redox.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_redox.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/aarch64_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/aarch64_uwp_windows_msvc.rs index 16a808c9c2cd..4bcacc6e2250 100644 --- a/compiler/rustc_target/src/spec/aarch64_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/aarch64_uwp_windows_msvc.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_vendor: "uwp".to_string(), linker_flavor: LinkerFlavor::Msvc, options: base, } diff --git a/compiler/rustc_target/src/spec/aarch64_wrs_vxworks.rs b/compiler/rustc_target/src/spec/aarch64_wrs_vxworks.rs index b82785fec6f9..73323d39f832 100644 --- a/compiler/rustc_target/src/spec/aarch64_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/aarch64_wrs_vxworks.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - target_vendor: "wrs".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, } diff --git a/compiler/rustc_target/src/spec/apple_base.rs b/compiler/rustc_target/src/spec/apple_base.rs index 9532ff4bf50f..045d9967f305 100644 --- a/compiler/rustc_target/src/spec/apple_base.rs +++ b/compiler/rustc_target/src/spec/apple_base.rs @@ -18,6 +18,7 @@ pub fn opts(os: &str) -> TargetOptions { TargetOptions { target_os: os.to_string(), + target_vendor: "apple".to_string(), // macOS has -dead_strip, which doesn't rely on function_sections function_sections: false, dynamic_linking: true, diff --git a/compiler/rustc_target/src/spec/arm_linux_androideabi.rs b/compiler/rustc_target/src/spec/arm_linux_androideabi.rs index e2dcd77107fd..86edbfce1faf 100644 --- a/compiler/rustc_target/src/spec/arm_linux_androideabi.rs +++ b/compiler/rustc_target/src/spec/arm_linux_androideabi.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, } diff --git a/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabi.rs index cdd2083f5023..85e62f0c06d5 100644 --- a/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabi.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabihf.rs b/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabihf.rs index 18d66bd5e360..170d7b53466e 100644 --- a/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabihf.rs +++ b/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabihf.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/arm_unknown_linux_musleabi.rs b/compiler/rustc_target/src/spec/arm_unknown_linux_musleabi.rs index d9fad6e7b1e4..592505f2afe8 100644 --- a/compiler/rustc_target/src/spec/arm_unknown_linux_musleabi.rs +++ b/compiler/rustc_target/src/spec/arm_unknown_linux_musleabi.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), diff --git a/compiler/rustc_target/src/spec/arm_unknown_linux_musleabihf.rs b/compiler/rustc_target/src/spec/arm_unknown_linux_musleabihf.rs index 8c8632fa3753..18e165d1fc69 100644 --- a/compiler/rustc_target/src/spec/arm_unknown_linux_musleabihf.rs +++ b/compiler/rustc_target/src/spec/arm_unknown_linux_musleabihf.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), diff --git a/compiler/rustc_target/src/spec/armebv7r_none_eabi.rs b/compiler/rustc_target/src/spec/armebv7r_none_eabi.rs index 5a880173a12a..bbee5c022d1e 100644 --- a/compiler/rustc_target/src/spec/armebv7r_none_eabi.rs +++ b/compiler/rustc_target/src/spec/armebv7r_none_eabi.rs @@ -9,11 +9,11 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: "".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { target_endian: "big".to_string(), + target_vendor: String::new(), executables: true, linker: Some("rust-lld".to_owned()), relocation_model: RelocModel::Static, diff --git a/compiler/rustc_target/src/spec/armebv7r_none_eabihf.rs b/compiler/rustc_target/src/spec/armebv7r_none_eabihf.rs index b9440ff9ee7b..800739366e8e 100644 --- a/compiler/rustc_target/src/spec/armebv7r_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/armebv7r_none_eabihf.rs @@ -9,11 +9,11 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { target_endian: "big".to_string(), + target_vendor: String::new(), executables: true, linker: Some("rust-lld".to_owned()), relocation_model: RelocModel::Static, diff --git a/compiler/rustc_target/src/spec/armv4t_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/armv4t_unknown_linux_gnueabi.rs index b96d95f1a2d9..3632d8e093c4 100644 --- a/compiler/rustc_target/src/spec/armv4t_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/armv4t_unknown_linux_gnueabi.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/armv5te_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/armv5te_unknown_linux_gnueabi.rs index f1571cf04164..0843e0ce9a54 100644 --- a/compiler/rustc_target/src/spec/armv5te_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/armv5te_unknown_linux_gnueabi.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/armv5te_unknown_linux_musleabi.rs b/compiler/rustc_target/src/spec/armv5te_unknown_linux_musleabi.rs index df50a0e25b78..307ce75fbd25 100644 --- a/compiler/rustc_target/src/spec/armv5te_unknown_linux_musleabi.rs +++ b/compiler/rustc_target/src/spec/armv5te_unknown_linux_musleabi.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/armv6_unknown_freebsd.rs b/compiler/rustc_target/src/spec/armv6_unknown_freebsd.rs index 5e67a02f7e4c..8e13deca8c08 100644 --- a/compiler/rustc_target/src/spec/armv6_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/armv6_unknown_freebsd.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/armv6_unknown_netbsd_eabihf.rs b/compiler/rustc_target/src/spec/armv6_unknown_netbsd_eabihf.rs index 53b0f57fbcad..141108b79833 100644 --- a/compiler/rustc_target/src/spec/armv6_unknown_netbsd_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv6_unknown_netbsd_eabihf.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/armv7_apple_ios.rs b/compiler/rustc_target/src/spec/armv7_apple_ios.rs index ed3324737521..333201263f2a 100644 --- a/compiler/rustc_target/src/spec/armv7_apple_ios.rs +++ b/compiler/rustc_target/src/spec/armv7_apple_ios.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { 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".to_string(), arch: "arm".to_string(), - target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { features: "+v7,+vfp3,+neon".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7_linux_androideabi.rs b/compiler/rustc_target/src/spec/armv7_linux_androideabi.rs index 8e0d1f61349d..4326474dca5a 100644 --- a/compiler/rustc_target/src/spec/armv7_linux_androideabi.rs +++ b/compiler/rustc_target/src/spec/armv7_linux_androideabi.rs @@ -19,7 +19,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, } diff --git a/compiler/rustc_target/src/spec/armv7_unknown_cloudabi_eabihf.rs b/compiler/rustc_target/src/spec/armv7_unknown_cloudabi_eabihf.rs index 21f7615577bb..f10fb829f197 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_cloudabi_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_cloudabi_eabihf.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "\u{1}mcount".to_string(), ..base }, } diff --git a/compiler/rustc_target/src/spec/armv7_unknown_freebsd.rs b/compiler/rustc_target/src/spec/armv7_unknown_freebsd.rs index 17455ef48fb9..4d4c20e1eabb 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_freebsd.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabi.rs index c0b2dded55bb..3895ff11cdcf 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabi.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabihf.rs b/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabihf.rs index da1a9281e4c7..fc20c7b8ab8c 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabihf.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabihf.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabi.rs b/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabi.rs index a3a7ce53d901..ace6e30d5098 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabi.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabi.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabihf.rs b/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabihf.rs index 2cb3163dbb4c..3c10024cd26b 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabihf.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabihf.rs @@ -12,7 +12,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, // Most of these settings are copied from the armv7_unknown_linux_gnueabihf diff --git a/compiler/rustc_target/src/spec/armv7_unknown_netbsd_eabihf.rs b/compiler/rustc_target/src/spec/armv7_unknown_netbsd_eabihf.rs index 43a4176f0d7c..236cf391bd5a 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_netbsd_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_netbsd_eabihf.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/armv7_wrs_vxworks_eabihf.rs b/compiler/rustc_target/src/spec/armv7_wrs_vxworks_eabihf.rs index c44feff582e3..ac375b98fbc0 100644 --- a/compiler/rustc_target/src/spec/armv7_wrs_vxworks_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv7_wrs_vxworks_eabihf.rs @@ -7,7 +7,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: "wrs".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { // Info about features at https://wiki.debian.org/ArmHardFloatPort diff --git a/compiler/rustc_target/src/spec/armv7a_none_eabi.rs b/compiler/rustc_target/src/spec/armv7a_none_eabi.rs index 9da962957c33..395475ba34ff 100644 --- a/compiler/rustc_target/src/spec/armv7a_none_eabi.rs +++ b/compiler/rustc_target/src/spec/armv7a_none_eabi.rs @@ -21,6 +21,7 @@ pub fn target() -> Target { let opts = TargetOptions { + target_vendor: String::new(), linker: Some("rust-lld".to_owned()), features: "+v7,+thumb2,+soft-float,-neon,+strict-align".to_string(), executables: true, @@ -35,7 +36,6 @@ pub fn target() -> Target { Target { llvm_target: "armv7a-none-eabi".to_string(), pointer_width: 32, - target_vendor: String::new(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/armv7a_none_eabihf.rs b/compiler/rustc_target/src/spec/armv7a_none_eabihf.rs index 6bb51792c30a..f62261b7abf2 100644 --- a/compiler/rustc_target/src/spec/armv7a_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv7a_none_eabihf.rs @@ -9,6 +9,7 @@ pub fn target() -> Target { let opts = TargetOptions { + target_vendor: String::new(), linker: Some("rust-lld".to_owned()), features: "+v7,+vfp3,-d32,+thumb2,-neon,+strict-align".to_string(), executables: true, @@ -23,7 +24,6 @@ pub fn target() -> Target { Target { llvm_target: "armv7a-none-eabihf".to_string(), pointer_width: 32, - target_vendor: String::new(), data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/armv7r_none_eabi.rs b/compiler/rustc_target/src/spec/armv7r_none_eabi.rs index c49502c04389..293df321e238 100644 --- a/compiler/rustc_target/src/spec/armv7r_none_eabi.rs +++ b/compiler/rustc_target/src/spec/armv7r_none_eabi.rs @@ -9,10 +9,10 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: "".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { + target_vendor: String::new(), executables: true, linker: Some("rust-lld".to_owned()), relocation_model: RelocModel::Static, diff --git a/compiler/rustc_target/src/spec/armv7r_none_eabihf.rs b/compiler/rustc_target/src/spec/armv7r_none_eabihf.rs index fb59c7fa2cb8..c0858e59c658 100644 --- a/compiler/rustc_target/src/spec/armv7r_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv7r_none_eabihf.rs @@ -9,10 +9,10 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: "".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { + target_vendor: String::new(), executables: true, linker: Some("rust-lld".to_owned()), relocation_model: RelocModel::Static, diff --git a/compiler/rustc_target/src/spec/armv7s_apple_ios.rs b/compiler/rustc_target/src/spec/armv7s_apple_ios.rs index 9f88e7f1d324..729cb196c9f9 100644 --- a/compiler/rustc_target/src/spec/armv7s_apple_ios.rs +++ b/compiler/rustc_target/src/spec/armv7s_apple_ios.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { 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".to_string(), arch: "arm".to_string(), - target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { features: "+v7,+vfp4,+neon".to_string(), diff --git a/compiler/rustc_target/src/spec/avr_gnu_base.rs b/compiler/rustc_target/src/spec/avr_gnu_base.rs index 5152e2536cb7..d95f9b6aa589 100644 --- a/compiler/rustc_target/src/spec/avr_gnu_base.rs +++ b/compiler/rustc_target/src/spec/avr_gnu_base.rs @@ -10,7 +10,6 @@ pub fn target(target_cpu: String) -> Target { llvm_target: "avr-unknown-unknown".to_string(), pointer_width: 16, linker_flavor: LinkerFlavor::Gcc, - target_vendor: "unknown".to_string(), options: TargetOptions { target_c_int_width: "16".to_string(), target_os: "unknown".to_string(), diff --git a/compiler/rustc_target/src/spec/fuchsia_base.rs b/compiler/rustc_target/src/spec/fuchsia_base.rs index ffd06170d332..12e3ad54a786 100644 --- a/compiler/rustc_target/src/spec/fuchsia_base.rs +++ b/compiler/rustc_target/src/spec/fuchsia_base.rs @@ -21,6 +21,7 @@ pub fn opts() -> TargetOptions { TargetOptions { target_os: "fuchsia".to_string(), + target_vendor: String::new(), linker: Some("rust-lld".to_owned()), lld_flavor: LldFlavor::Ld, dynamic_linking: true, diff --git a/compiler/rustc_target/src/spec/hexagon_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/hexagon_unknown_linux_musl.rs index e4de6cac0dc2..87e7c0ddf118 100644 --- a/compiler/rustc_target/src/spec/hexagon_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/hexagon_unknown_linux_musl.rs @@ -28,7 +28,6 @@ pub fn target() -> Target { ) .to_string(), arch: "hexagon".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/i386_apple_ios.rs b/compiler/rustc_target/src/spec/i386_apple_ios.rs index c73eb938494f..6d38f42387b3 100644 --- a/compiler/rustc_target/src/spec/i386_apple_ios.rs +++ b/compiler/rustc_target/src/spec/i386_apple_ios.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { f64:32:64-f80:128-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { max_atomic_width: Some(64), stack_probes: true, ..base }, } diff --git a/compiler/rustc_target/src/spec/i686_apple_darwin.rs b/compiler/rustc_target/src/spec/i686_apple_darwin.rs index 58d28d924c85..21552c3db86e 100644 --- a/compiler/rustc_target/src/spec/i686_apple_darwin.rs +++ b/compiler/rustc_target/src/spec/i686_apple_darwin.rs @@ -22,7 +22,6 @@ pub fn target() -> Target { f64:32:64-f80:128-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "\u{1}mcount".to_string(), ..base }, } diff --git a/compiler/rustc_target/src/spec/i686_linux_android.rs b/compiler/rustc_target/src/spec/i686_linux_android.rs index 41eab781123d..71bb0f1b2a85 100644 --- a/compiler/rustc_target/src/spec/i686_linux_android.rs +++ b/compiler/rustc_target/src/spec/i686_linux_android.rs @@ -20,7 +20,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs b/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs index ce8b8596b4d2..9422f8072981 100644 --- a/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs @@ -23,7 +23,6 @@ pub fn target() -> Target { i64:64-f80:32-n8:16:32-a:0:32-S32" .to_string(), arch: "x86".to_string(), - target_vendor: "pc".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/i686_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/i686_pc_windows_msvc.rs index f2a8a6cb3942..93abf06dddc9 100644 --- a/compiler/rustc_target/src/spec/i686_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/i686_pc_windows_msvc.rs @@ -27,7 +27,6 @@ pub fn target() -> Target { i64:64-f80:32-n8:16:32-a:0:32-S32" .to_string(), arch: "x86".to_string(), - target_vendor: "pc".to_string(), linker_flavor: LinkerFlavor::Msvc, options: base, } diff --git a/compiler/rustc_target/src/spec/i686_unknown_cloudabi.rs b/compiler/rustc_target/src/spec/i686_unknown_cloudabi.rs index 03c77c7f005b..a0e6792ca6ca 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_cloudabi.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_cloudabi.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/i686_unknown_freebsd.rs b/compiler/rustc_target/src/spec/i686_unknown_freebsd.rs index db90fa9e4780..baed186ffa33 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_freebsd.rs @@ -16,7 +16,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/i686_unknown_haiku.rs b/compiler/rustc_target/src/spec/i686_unknown_haiku.rs index be513954710f..4f382ee85bbd 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_haiku.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_haiku.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs index 0bfa621997fa..51d61375db9c 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/i686_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/i686_unknown_linux_musl.rs index 9ae4303913b2..7853f4415f16 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_linux_musl.rs @@ -29,7 +29,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/i686_unknown_netbsd.rs b/compiler/rustc_target/src/spec/i686_unknown_netbsd.rs index ac94b8000e3d..8171f4abb801 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_netbsd.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "__mcount".to_string(), ..base }, } diff --git a/compiler/rustc_target/src/spec/i686_unknown_openbsd.rs b/compiler/rustc_target/src/spec/i686_unknown_openbsd.rs index a64da65f4ff8..2b9d7a519e7e 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_openbsd.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/i686_unknown_uefi.rs b/compiler/rustc_target/src/spec/i686_unknown_uefi.rs index ea82139dfa89..4d66e47613fd 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_uefi.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_uefi.rs @@ -82,7 +82,6 @@ pub fn target() -> Target { data_layout: "e-m:x-p:32:32-p270:32:32-p271:32:32-p272:64:64-\ i64:64-f80:32-n8:16:32-a:0:32-S32" .to_string(), - target_vendor: "unknown".to_string(), arch: "x86".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Link), diff --git a/compiler/rustc_target/src/spec/i686_uwp_windows_gnu.rs b/compiler/rustc_target/src/spec/i686_uwp_windows_gnu.rs index 41e8167c740a..2ba642d2cb4b 100644 --- a/compiler/rustc_target/src/spec/i686_uwp_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/i686_uwp_windows_gnu.rs @@ -22,7 +22,6 @@ pub fn target() -> Target { i64:64-f80:32-n8:16:32-a:0:32-S32" .to_string(), arch: "x86".to_string(), - target_vendor: "uwp".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/i686_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/i686_uwp_windows_msvc.rs index bad6812e570c..7bc9f126a586 100644 --- a/compiler/rustc_target/src/spec/i686_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/i686_uwp_windows_msvc.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { i64:64-f80:32-n8:16:32-a:0:32-S32" .to_string(), arch: "x86".to_string(), - target_vendor: "uwp".to_string(), linker_flavor: LinkerFlavor::Msvc, options: base, } diff --git a/compiler/rustc_target/src/spec/i686_wrs_vxworks.rs b/compiler/rustc_target/src/spec/i686_wrs_vxworks.rs index e3182f293bad..9a28176fb6e5 100644 --- a/compiler/rustc_target/src/spec/i686_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/i686_wrs_vxworks.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - target_vendor: "wrs".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs index 5c514302f7b7..39d3374effd6 100644 --- a/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), diff --git a/compiler/rustc_target/src/spec/mips64_unknown_linux_muslabi64.rs b/compiler/rustc_target/src/spec/mips64_unknown_linux_muslabi64.rs index 4e445693ee93..fec51e026eff 100644 --- a/compiler/rustc_target/src/spec/mips64_unknown_linux_muslabi64.rs +++ b/compiler/rustc_target/src/spec/mips64_unknown_linux_muslabi64.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), diff --git a/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs index e9d12331c9cc..9fffb5e60d8e 100644 --- a/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { // NOTE(mips64r2) matches C toolchain diff --git a/compiler/rustc_target/src/spec/mips64el_unknown_linux_muslabi64.rs b/compiler/rustc_target/src/spec/mips64el_unknown_linux_muslabi64.rs index b7175982219a..82b695571d36 100644 --- a/compiler/rustc_target/src/spec/mips64el_unknown_linux_muslabi64.rs +++ b/compiler/rustc_target/src/spec/mips64el_unknown_linux_muslabi64.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "_mcount".to_string(), ..base }, } diff --git a/compiler/rustc_target/src/spec/mips_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/mips_unknown_linux_gnu.rs index de8968016df7..83ad3d052017 100644 --- a/compiler/rustc_target/src/spec/mips_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/mips_unknown_linux_gnu.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), diff --git a/compiler/rustc_target/src/spec/mips_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/mips_unknown_linux_musl.rs index 2b8aba5a1444..b9d0471c1d28 100644 --- a/compiler/rustc_target/src/spec/mips_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/mips_unknown_linux_musl.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), diff --git a/compiler/rustc_target/src/spec/mips_unknown_linux_uclibc.rs b/compiler/rustc_target/src/spec/mips_unknown_linux_uclibc.rs index 49b563ccf043..b17e4e945ee6 100644 --- a/compiler/rustc_target/src/spec/mips_unknown_linux_uclibc.rs +++ b/compiler/rustc_target/src/spec/mips_unknown_linux_uclibc.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), diff --git a/compiler/rustc_target/src/spec/mipsel_sony_psp.rs b/compiler/rustc_target/src/spec/mipsel_sony_psp.rs index 37c561c21971..1c7c4c71fa6b 100644 --- a/compiler/rustc_target/src/spec/mipsel_sony_psp.rs +++ b/compiler/rustc_target/src/spec/mipsel_sony_psp.rs @@ -13,11 +13,11 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - target_vendor: "sony".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { target_os: "psp".to_string(), + target_vendor: "sony".to_string(), cpu: "mips2".to_string(), executables: true, linker: Some("rust-lld".to_owned()), diff --git a/compiler/rustc_target/src/spec/mipsel_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/mipsel_unknown_linux_gnu.rs index ac9840335396..1c7a01cfef9e 100644 --- a/compiler/rustc_target/src/spec/mipsel_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/mipsel_unknown_linux_gnu.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/mipsel_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/mipsel_unknown_linux_musl.rs index 4b98eccc837d..65c70a98f897 100644 --- a/compiler/rustc_target/src/spec/mipsel_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/mipsel_unknown_linux_musl.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "_mcount".to_string(), ..base }, } diff --git a/compiler/rustc_target/src/spec/mipsel_unknown_linux_uclibc.rs b/compiler/rustc_target/src/spec/mipsel_unknown_linux_uclibc.rs index 2914a6c48916..96911da1a24a 100644 --- a/compiler/rustc_target/src/spec/mipsel_unknown_linux_uclibc.rs +++ b/compiler/rustc_target/src/spec/mipsel_unknown_linux_uclibc.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/mipsisa32r6_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/mipsisa32r6_unknown_linux_gnu.rs index a5be34f310cf..4eb3d3e70e70 100644 --- a/compiler/rustc_target/src/spec/mipsisa32r6_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/mipsisa32r6_unknown_linux_gnu.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), diff --git a/compiler/rustc_target/src/spec/mipsisa32r6el_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/mipsisa32r6el_unknown_linux_gnu.rs index bd606b2de3cd..3345f147ac41 100644 --- a/compiler/rustc_target/src/spec/mipsisa32r6el_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/mipsisa32r6el_unknown_linux_gnu.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/mipsisa64r6_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/mipsisa64r6_unknown_linux_gnuabi64.rs index d5371048f6d3..5614bcc275f4 100644 --- a/compiler/rustc_target/src/spec/mipsisa64r6_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/mipsisa64r6_unknown_linux_gnuabi64.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), diff --git a/compiler/rustc_target/src/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs index cecc82bbadd5..158014c49337 100644 --- a/compiler/rustc_target/src/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { // NOTE(mips64r6) matches C toolchain diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index 0173328df84c..9a72f2bd97e2 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -668,8 +668,6 @@ pub struct Target { pub llvm_target: String, /// Number of bits in a pointer. Influences the `target_pointer_width` `cfg` variable. pub pointer_width: u32, - /// Vendor name to use for conditional compilation. - pub target_vendor: String, /// Architecture to use for ABI considerations. Valid options include: "x86", /// "x86_64", "arm", "aarch64", "mips", "powerpc", "powerpc64", and others. pub arch: String, @@ -709,6 +707,8 @@ pub struct TargetOptions { pub target_os: String, /// Environment name to use for conditional compilation. Defaults to "". pub target_env: String, + /// Vendor name to use for conditional compilation. Defaults to "unknown". + pub target_vendor: String, /// Linker to invoke pub linker: Option, @@ -992,6 +992,7 @@ fn default() -> TargetOptions { target_c_int_width: "32".to_string(), target_os: "none".to_string(), target_env: String::new(), + target_vendor: "unknown".to_string(), linker: option_env!("CFG_DEFAULT_LINKER").map(|s| s.to_string()), lld_flavor: LldFlavor::Ld, pre_link_args: LinkArgs::new(), @@ -1153,13 +1154,6 @@ pub fn from_json(obj: Json) -> Result { .ok_or_else(|| format!("Field {} in target specification is required", name)) }; - let get_opt_field = |name: &str, default: &str| { - obj.find(name) - .and_then(|s| s.as_string()) - .map(|s| s.to_string()) - .unwrap_or_else(|| default.to_string()) - }; - let mut base = Target { llvm_target: get_req_field("llvm-target")?, pointer_width: get_req_field("target-pointer-width")? @@ -1167,7 +1161,6 @@ pub fn from_json(obj: Json) -> Result { .map_err(|_| "target-pointer-width must be an integer".to_string())?, data_layout: get_req_field("data-layout")?, arch: get_req_field("arch")?, - target_vendor: get_opt_field("vendor", "unknown"), linker_flavor: LinkerFlavor::from_str(&*get_req_field("linker-flavor")?) .ok_or_else(|| format!("linker flavor must be {}", LinkerFlavor::one_of()))?, options: Default::default(), @@ -1416,6 +1409,7 @@ macro_rules! key { key!(target_c_int_width); key!(target_os = "os"); key!(target_env = "env"); + key!(target_vendor = "vendor"); key!(linker, optional); key!(lld_flavor, LldFlavor)?; key!(pre_link_objects, link_objects); @@ -1645,7 +1639,6 @@ macro_rules! target_option_val { target_val!(llvm_target); d.insert("target-pointer-width".to_string(), self.pointer_width.to_string().to_json()); target_val!(arch); - target_val!(target_vendor, "vendor"); target_val!(data_layout); target_val!(linker_flavor); @@ -1654,6 +1647,7 @@ macro_rules! target_option_val { target_option_val!(target_c_int_width); target_option_val!(target_os, "os"); target_option_val!(target_env, "env"); + target_option_val!(target_vendor, "vendor"); target_option_val!(linker); target_option_val!(lld_flavor); target_option_val!(pre_link_objects); diff --git a/compiler/rustc_target/src/spec/msp430_none_elf.rs b/compiler/rustc_target/src/spec/msp430_none_elf.rs index 83fb5da9cd0c..6f5e39eb8f10 100644 --- a/compiler/rustc_target/src/spec/msp430_none_elf.rs +++ b/compiler/rustc_target/src/spec/msp430_none_elf.rs @@ -6,11 +6,11 @@ pub fn target() -> Target { pointer_width: 16, data_layout: "e-m:e-p:16:16-i32:16-i64:16-f32:16-f64:16-a:8-n8:16-S16".to_string(), arch: "msp430".to_string(), - target_vendor: String::new(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_c_int_width: "16".to_string(), + target_vendor: String::new(), executables: true, // The LLVM backend currently can't generate object files. To diff --git a/compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs b/compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs index 5fb344c28d08..d284380195b3 100644 --- a/compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs +++ b/compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs @@ -7,14 +7,13 @@ pub fn target() -> Target { data_layout: "e-i64:64-i128:128-v16:16-v32:32-n16:32:64".to_string(), llvm_target: "nvptx64-nvidia-cuda".to_string(), - target_vendor: "nvidia".to_string(), - linker_flavor: LinkerFlavor::PtxLinker, pointer_width: 64, options: TargetOptions { target_os: "cuda".to_string(), + target_vendor: "nvidia".to_string(), // The linker can be installed from `crates.io`. linker: Some("rust-ptx-linker".to_string()), diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_freebsd.rs b/compiler/rustc_target/src/spec/powerpc64_unknown_freebsd.rs index 7764fab7e5ba..0329f63fccba 100644 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/powerpc64_unknown_freebsd.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs index 5d6a15ee8266..b88f9b7b58ef 100644 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_musl.rs index 96aa5152478b..e4ebc7acf014 100644 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_musl.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), diff --git a/compiler/rustc_target/src/spec/powerpc64_wrs_vxworks.rs b/compiler/rustc_target/src/spec/powerpc64_wrs_vxworks.rs index ee1d6c118e4e..4f44d34cb91f 100644 --- a/compiler/rustc_target/src/spec/powerpc64_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/powerpc64_wrs_vxworks.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), - target_vendor: "wrs".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), ..base }, } diff --git a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs index 6cd6630539ec..98cce4f701ef 100644 --- a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "_mcount".to_string(), ..base }, } diff --git a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_musl.rs index 2f4a7d80fc88..8c3bbd9740b4 100644 --- a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_musl.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "_mcount".to_string(), ..base }, } diff --git a/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnu.rs index 043ab54a3abf..3ef7e68c2f29 100644 --- a/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnu.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), diff --git a/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnuspe.rs b/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnuspe.rs index a6f633f4dc3b..4adc11c98596 100644 --- a/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnuspe.rs +++ b/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnuspe.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), diff --git a/compiler/rustc_target/src/spec/powerpc_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc_unknown_linux_musl.rs index ff80222676a4..0e96997b4872 100644 --- a/compiler/rustc_target/src/spec/powerpc_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/powerpc_unknown_linux_musl.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), diff --git a/compiler/rustc_target/src/spec/powerpc_unknown_netbsd.rs b/compiler/rustc_target/src/spec/powerpc_unknown_netbsd.rs index 09816f230ff6..c4c8c1a10231 100644 --- a/compiler/rustc_target/src/spec/powerpc_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/powerpc_unknown_netbsd.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), diff --git a/compiler/rustc_target/src/spec/powerpc_wrs_vxworks.rs b/compiler/rustc_target/src/spec/powerpc_wrs_vxworks.rs index 7f8db38dbce1..95cf49a17641 100644 --- a/compiler/rustc_target/src/spec/powerpc_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/powerpc_wrs_vxworks.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), - target_vendor: "wrs".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), diff --git a/compiler/rustc_target/src/spec/powerpc_wrs_vxworks_spe.rs b/compiler/rustc_target/src/spec/powerpc_wrs_vxworks_spe.rs index 93e97f0d1cb5..2ef8d0ad4e8c 100644 --- a/compiler/rustc_target/src/spec/powerpc_wrs_vxworks_spe.rs +++ b/compiler/rustc_target/src/spec/powerpc_wrs_vxworks_spe.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), - target_vendor: "wrs".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), diff --git a/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs index 84ccf0528400..050c95eeb11b 100644 --- a/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(), arch: "riscv32".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { unsupported_abis: super::riscv_base::unsupported_abis(), diff --git a/compiler/rustc_target/src/spec/riscv32i_unknown_none_elf.rs b/compiler/rustc_target/src/spec/riscv32i_unknown_none_elf.rs index fd300348067d..3f42c52db917 100644 --- a/compiler/rustc_target/src/spec/riscv32i_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/riscv32i_unknown_none_elf.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(), llvm_target: "riscv32".to_string(), pointer_width: 32, - target_vendor: "unknown".to_string(), arch: "riscv32".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/riscv32imac_unknown_none_elf.rs b/compiler/rustc_target/src/spec/riscv32imac_unknown_none_elf.rs index 29426e65c43d..adeb085593f4 100644 --- a/compiler/rustc_target/src/spec/riscv32imac_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/riscv32imac_unknown_none_elf.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(), llvm_target: "riscv32".to_string(), pointer_width: 32, - target_vendor: "unknown".to_string(), arch: "riscv32".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/riscv32imc_unknown_none_elf.rs b/compiler/rustc_target/src/spec/riscv32imc_unknown_none_elf.rs index 394c5d52cadf..81f1cf36ad99 100644 --- a/compiler/rustc_target/src/spec/riscv32imc_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/riscv32imc_unknown_none_elf.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(), llvm_target: "riscv32".to_string(), pointer_width: 32, - target_vendor: "unknown".to_string(), arch: "riscv32".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_gnu.rs index fc5439b86696..f43bc376f632 100644 --- a/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_gnu.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".to_string(), arch: "riscv64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { unsupported_abis: super::riscv_base::unsupported_abis(), diff --git a/compiler/rustc_target/src/spec/riscv64gc_unknown_none_elf.rs b/compiler/rustc_target/src/spec/riscv64gc_unknown_none_elf.rs index 3d68a722024c..d9e5dae0cb5c 100644 --- a/compiler/rustc_target/src/spec/riscv64gc_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/riscv64gc_unknown_none_elf.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".to_string(), llvm_target: "riscv64".to_string(), pointer_width: 64, - target_vendor: "unknown".to_string(), arch: "riscv64".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/riscv64imac_unknown_none_elf.rs b/compiler/rustc_target/src/spec/riscv64imac_unknown_none_elf.rs index be306ef12bf1..eb45fccfacc9 100644 --- a/compiler/rustc_target/src/spec/riscv64imac_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/riscv64imac_unknown_none_elf.rs @@ -6,7 +6,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".to_string(), llvm_target: "riscv64".to_string(), pointer_width: 64, - target_vendor: "unknown".to_string(), arch: "riscv64".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), diff --git a/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs index 11ce9e24ef0e..04e7db75759c 100644 --- a/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs @@ -17,7 +17,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-a:8:16-n32:64".to_string(), arch: "s390x".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/solaris_base.rs b/compiler/rustc_target/src/spec/solaris_base.rs index 0374de200184..1454d83e9361 100644 --- a/compiler/rustc_target/src/spec/solaris_base.rs +++ b/compiler/rustc_target/src/spec/solaris_base.rs @@ -3,6 +3,7 @@ pub fn opts() -> TargetOptions { TargetOptions { target_os: "solaris".to_string(), + target_vendor: "sun".to_string(), dynamic_linking: true, executables: true, has_rpath: true, diff --git a/compiler/rustc_target/src/spec/sparc64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/sparc64_unknown_linux_gnu.rs index 29cd3d729eac..3d938c28bbe2 100644 --- a/compiler/rustc_target/src/spec/sparc64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/sparc64_unknown_linux_gnu.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64-S128".to_string(), arch: "sparc64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/sparc64_unknown_netbsd.rs b/compiler/rustc_target/src/spec/sparc64_unknown_netbsd.rs index c183f989cc04..5fb5aaeccbb4 100644 --- a/compiler/rustc_target/src/spec/sparc64_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/sparc64_unknown_netbsd.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64-S128".to_string(), arch: "sparc64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), diff --git a/compiler/rustc_target/src/spec/sparc64_unknown_openbsd.rs b/compiler/rustc_target/src/spec/sparc64_unknown_openbsd.rs index 4edf8c92fdf0..a7cdd9615306 100644 --- a/compiler/rustc_target/src/spec/sparc64_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/sparc64_unknown_openbsd.rs @@ -12,7 +12,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64-S128".to_string(), arch: "sparc64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs index d40630e90039..b19a163455a6 100644 --- a/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs @@ -12,7 +12,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-f128:64-n32-S64".to_string(), arch: "sparc".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs b/compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs index 77127dc17030..3fb94212c3c3 100644 --- a/compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs +++ b/compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs @@ -17,7 +17,6 @@ pub fn target() -> Target { // differentiation from the sparc64, we could, but that would probably // just be confusing. arch: "sparc64".to_string(), - target_vendor: "sun".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/thumb_base.rs b/compiler/rustc_target/src/spec/thumb_base.rs index 2f7d15d5856f..446e09dc7249 100644 --- a/compiler/rustc_target/src/spec/thumb_base.rs +++ b/compiler/rustc_target/src/spec/thumb_base.rs @@ -32,6 +32,7 @@ pub fn opts() -> TargetOptions { // See rust-lang/rfcs#1645 for a discussion about these defaults TargetOptions { + target_vendor: String::new(), executables: true, // In most cases, LLD is good enough linker: Some("rust-lld".to_string()), diff --git a/compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs index 536aa3497e3d..a128a7a46828 100644 --- a/compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { Target { llvm_target: "thumbv4t-none-eabi".to_string(), pointer_width: 32, - target_vendor: "".to_string(), arch: "arm".to_string(), /* Data layout args are '-' separated: * little endian diff --git a/compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs index 2db9fb56646b..d7c9ca96105f 100644 --- a/compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/thumbv7a_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/thumbv7a_pc_windows_msvc.rs index 5f17a3767919..538b617b9d18 100644 --- a/compiler/rustc_target/src/spec/thumbv7a_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/thumbv7a_pc_windows_msvc.rs @@ -26,7 +26,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:w-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: "pc".to_string(), linker_flavor: LinkerFlavor::Msvc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/thumbv7a_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/thumbv7a_uwp_windows_msvc.rs index 35ba73f1ad5b..1ff154fb60c5 100644 --- a/compiler/rustc_target/src/spec/thumbv7a_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/thumbv7a_uwp_windows_msvc.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:w-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: "uwp".to_string(), linker_flavor: LinkerFlavor::Msvc, options: TargetOptions { features: "+vfp3,+neon".to_string(), diff --git a/compiler/rustc_target/src/spec/thumbv7em_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv7em_none_eabi.rs index 3fd7ddc36f78..4769320f08f5 100644 --- a/compiler/rustc_target/src/spec/thumbv7em_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv7em_none_eabi.rs @@ -17,7 +17,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { max_atomic_width: Some(32), ..super::thumb_base::opts() }, diff --git a/compiler/rustc_target/src/spec/thumbv7em_none_eabihf.rs b/compiler/rustc_target/src/spec/thumbv7em_none_eabihf.rs index cc06fcdb1e06..faee53e357c8 100644 --- a/compiler/rustc_target/src/spec/thumbv7em_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/thumbv7em_none_eabihf.rs @@ -16,7 +16,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/thumbv7m_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv7m_none_eabi.rs index 986a6fae0a58..c25773066e4f 100644 --- a/compiler/rustc_target/src/spec/thumbv7m_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv7m_none_eabi.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { max_atomic_width: Some(32), ..super::thumb_base::opts() }, diff --git a/compiler/rustc_target/src/spec/thumbv7neon_linux_androideabi.rs b/compiler/rustc_target/src/spec/thumbv7neon_linux_androideabi.rs index b03a6045cafc..156582048bda 100644 --- a/compiler/rustc_target/src/spec/thumbv7neon_linux_androideabi.rs +++ b/compiler/rustc_target/src/spec/thumbv7neon_linux_androideabi.rs @@ -19,7 +19,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, } diff --git a/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_gnueabihf.rs b/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_gnueabihf.rs index 26ac3adfb466..a0ae97710344 100644 --- a/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_gnueabihf.rs +++ b/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_gnueabihf.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_musleabihf.rs b/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_musleabihf.rs index f74d8121bdea..68dcff02d010 100644 --- a/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_musleabihf.rs +++ b/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_musleabihf.rs @@ -16,7 +16,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, // Most of these settings are copied from the thumbv7neon_unknown_linux_gnueabihf diff --git a/compiler/rustc_target/src/spec/thumbv8m_base_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv8m_base_none_eabi.rs index d2b4b064742f..7f6a41bf38cf 100644 --- a/compiler/rustc_target/src/spec/thumbv8m_base_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv8m_base_none_eabi.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/thumbv8m_main_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv8m_main_none_eabi.rs index 2a5f9bd679c7..98cdbb8d40d1 100644 --- a/compiler/rustc_target/src/spec/thumbv8m_main_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv8m_main_none_eabi.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { max_atomic_width: Some(32), ..super::thumb_base::opts() }, diff --git a/compiler/rustc_target/src/spec/thumbv8m_main_none_eabihf.rs b/compiler/rustc_target/src/spec/thumbv8m_main_none_eabihf.rs index 1c10786a2abf..d9c338767145 100644 --- a/compiler/rustc_target/src/spec/thumbv8m_main_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/thumbv8m_main_none_eabihf.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { diff --git a/compiler/rustc_target/src/spec/vxworks_base.rs b/compiler/rustc_target/src/spec/vxworks_base.rs index a2e89fafa8f3..e8044e4dc1a9 100644 --- a/compiler/rustc_target/src/spec/vxworks_base.rs +++ b/compiler/rustc_target/src/spec/vxworks_base.rs @@ -19,6 +19,7 @@ pub fn opts() -> TargetOptions { TargetOptions { target_os: "vxworks".to_string(), target_env: "gnu".to_string(), + target_vendor: "wrs".to_string(), linker: Some("wr-c++".to_string()), exe_suffix: ".vxe".to_string(), dynamic_linking: true, diff --git a/compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs b/compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs index 3e962de5cc10..39a36c834d30 100644 --- a/compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs +++ b/compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs @@ -32,7 +32,6 @@ pub fn target() -> Target { Target { llvm_target: "wasm32-unknown-emscripten".to_string(), pointer_width: 32, - target_vendor: "unknown".to_string(), data_layout: "e-m:e-p:32:32-i64:64-n32:64-S128".to_string(), arch: "wasm32".to_string(), linker_flavor: LinkerFlavor::Em, diff --git a/compiler/rustc_target/src/spec/wasm32_unknown_unknown.rs b/compiler/rustc_target/src/spec/wasm32_unknown_unknown.rs index c375896b3bff..e54ed661a01a 100644 --- a/compiler/rustc_target/src/spec/wasm32_unknown_unknown.rs +++ b/compiler/rustc_target/src/spec/wasm32_unknown_unknown.rs @@ -34,7 +34,6 @@ pub fn target() -> Target { Target { llvm_target: "wasm32-unknown-unknown".to_string(), pointer_width: 32, - target_vendor: "unknown".to_string(), data_layout: "e-m:e-p:32:32-i64:64-n32:64-S128".to_string(), arch: "wasm32".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Wasm), diff --git a/compiler/rustc_target/src/spec/wasm32_wasi.rs b/compiler/rustc_target/src/spec/wasm32_wasi.rs index a33ecee9c9ef..978f3993fb4e 100644 --- a/compiler/rustc_target/src/spec/wasm32_wasi.rs +++ b/compiler/rustc_target/src/spec/wasm32_wasi.rs @@ -79,6 +79,7 @@ pub fn target() -> Target { let mut options = wasm32_base::options(); options.target_os = "wasi".to_string(); + options.target_vendor = String::new(); options .pre_link_args .entry(LinkerFlavor::Gcc) @@ -108,7 +109,6 @@ pub fn target() -> Target { Target { llvm_target: "wasm32-wasi".to_string(), pointer_width: 32, - target_vendor: String::new(), data_layout: "e-m:e-p:32:32-i64:64-n32:64-S128".to_string(), arch: "wasm32".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Wasm), diff --git a/compiler/rustc_target/src/spec/windows_gnu_base.rs b/compiler/rustc_target/src/spec/windows_gnu_base.rs index f930fe6b8ab7..37188a59eb5b 100644 --- a/compiler/rustc_target/src/spec/windows_gnu_base.rs +++ b/compiler/rustc_target/src/spec/windows_gnu_base.rs @@ -64,6 +64,7 @@ pub fn opts() -> TargetOptions { TargetOptions { target_os: "windows".to_string(), target_env: "gnu".to_string(), + target_vendor: "pc".to_string(), // FIXME(#13846) this should be enabled for windows function_sections: false, linker: Some("gcc".to_string()), diff --git a/compiler/rustc_target/src/spec/windows_msvc_base.rs b/compiler/rustc_target/src/spec/windows_msvc_base.rs index 7dfe5eb42bbf..c11016238678 100644 --- a/compiler/rustc_target/src/spec/windows_msvc_base.rs +++ b/compiler/rustc_target/src/spec/windows_msvc_base.rs @@ -6,6 +6,7 @@ pub fn opts() -> TargetOptions { TargetOptions { target_os: "windows".to_string(), target_env: "msvc".to_string(), + target_vendor: "pc".to_string(), dynamic_linking: true, dll_prefix: String::new(), dll_suffix: ".dll".to_string(), diff --git a/compiler/rustc_target/src/spec/windows_uwp_gnu_base.rs b/compiler/rustc_target/src/spec/windows_uwp_gnu_base.rs index fcb2af0005f2..225b94c37558 100644 --- a/compiler/rustc_target/src/spec/windows_uwp_gnu_base.rs +++ b/compiler/rustc_target/src/spec/windows_uwp_gnu_base.rs @@ -25,6 +25,7 @@ pub fn opts() -> TargetOptions { late_link_args.insert(LinkerFlavor::Lld(LldFlavor::Ld), mingw_libs); TargetOptions { + target_vendor: "uwp".to_string(), executables: false, limit_rdylib_exports: false, late_link_args, diff --git a/compiler/rustc_target/src/spec/windows_uwp_msvc_base.rs b/compiler/rustc_target/src/spec/windows_uwp_msvc_base.rs index 04ffa1a0addb..380d685dacfc 100644 --- a/compiler/rustc_target/src/spec/windows_uwp_msvc_base.rs +++ b/compiler/rustc_target/src/spec/windows_uwp_msvc_base.rs @@ -3,6 +3,7 @@ pub fn opts() -> TargetOptions { let mut opts = super::windows_msvc_base::opts(); + opts.target_vendor = "uwp".to_string(); let pre_link_args_msvc = vec!["/APPCONTAINER".to_string(), "mincore.lib".to_string()]; opts.pre_link_args.get_mut(&LinkerFlavor::Msvc).unwrap().extend(pre_link_args_msvc.clone()); opts.pre_link_args diff --git a/compiler/rustc_target/src/spec/x86_64_apple_darwin.rs b/compiler/rustc_target/src/spec/x86_64_apple_darwin.rs index f515396c3429..6349fafa05e5 100644 --- a/compiler/rustc_target/src/spec/x86_64_apple_darwin.rs +++ b/compiler/rustc_target/src/spec/x86_64_apple_darwin.rs @@ -24,7 +24,6 @@ pub fn target() -> Target { data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: arch.to_string(), - target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "\u{1}mcount".to_string(), ..base }, } diff --git a/compiler/rustc_target/src/spec/x86_64_apple_ios.rs b/compiler/rustc_target/src/spec/x86_64_apple_ios.rs index afeb8708e832..13c3c8afff43 100644 --- a/compiler/rustc_target/src/spec/x86_64_apple_ios.rs +++ b/compiler/rustc_target/src/spec/x86_64_apple_ios.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { max_atomic_width: Some(64), stack_probes: true, ..base }, } diff --git a/compiler/rustc_target/src/spec/x86_64_apple_ios_macabi.rs b/compiler/rustc_target/src/spec/x86_64_apple_ios_macabi.rs index 319eef7d8065..84b10ba026d7 100644 --- a/compiler/rustc_target/src/spec/x86_64_apple_ios_macabi.rs +++ b/compiler/rustc_target/src/spec/x86_64_apple_ios_macabi.rs @@ -9,7 +9,6 @@ pub fn target() -> Target { data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { max_atomic_width: Some(64), stack_probes: true, ..base }, } diff --git a/compiler/rustc_target/src/spec/x86_64_apple_tvos.rs b/compiler/rustc_target/src/spec/x86_64_apple_tvos.rs index a96bb2319297..a8fc0c2826ed 100644 --- a/compiler/rustc_target/src/spec/x86_64_apple_tvos.rs +++ b/compiler/rustc_target/src/spec/x86_64_apple_tvos.rs @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:o-i64:64-f80:128-n8:16:32:64-S128".to_string(), arch: "x86_64".to_string(), - target_vendor: "apple".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { max_atomic_width: Some(64), stack_probes: true, ..base }, } diff --git a/compiler/rustc_target/src/spec/x86_64_fortanix_unknown_sgx.rs b/compiler/rustc_target/src/spec/x86_64_fortanix_unknown_sgx.rs index 2badd3a7fd47..2919910c596b 100644 --- a/compiler/rustc_target/src/spec/x86_64_fortanix_unknown_sgx.rs +++ b/compiler/rustc_target/src/spec/x86_64_fortanix_unknown_sgx.rs @@ -57,6 +57,7 @@ pub fn target() -> Target { let opts = TargetOptions { target_os: "unknown".into(), target_env: "sgx".into(), + target_vendor: "fortanix".into(), dynamic_linking: false, executables: true, linker_is_gnu: true, @@ -79,7 +80,6 @@ pub fn target() -> Target { Target { llvm_target: "x86_64-elf".into(), pointer_width: 64, - target_vendor: "fortanix".into(), data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .into(), arch: "x86_64".into(), diff --git a/compiler/rustc_target/src/spec/x86_64_fuchsia.rs b/compiler/rustc_target/src/spec/x86_64_fuchsia.rs index 3a2fe0e09a77..673b61f86eb9 100644 --- a/compiler/rustc_target/src/spec/x86_64_fuchsia.rs +++ b/compiler/rustc_target/src/spec/x86_64_fuchsia.rs @@ -12,7 +12,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_vendor: String::new(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: base, } diff --git a/compiler/rustc_target/src/spec/x86_64_linux_android.rs b/compiler/rustc_target/src/spec/x86_64_linux_android.rs index dd240f9f94c7..965802e7d32a 100644 --- a/compiler/rustc_target/src/spec/x86_64_linux_android.rs +++ b/compiler/rustc_target/src/spec/x86_64_linux_android.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/x86_64_linux_kernel.rs b/compiler/rustc_target/src/spec/x86_64_linux_kernel.rs index 539dd3007d7a..f0572931118d 100644 --- a/compiler/rustc_target/src/spec/x86_64_linux_kernel.rs +++ b/compiler/rustc_target/src/spec/x86_64_linux_kernel.rs @@ -19,7 +19,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), - target_vendor: "unknown".to_string(), arch: "x86_64".to_string(), linker_flavor: LinkerFlavor::Gcc, diff --git a/compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs b/compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs index 17b5ac7f1682..6af05b1047e2 100644 --- a/compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs @@ -18,7 +18,6 @@ pub fn target() -> Target { data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_vendor: "pc".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/x86_64_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/x86_64_pc_windows_msvc.rs index 099d5c5efa48..f56f9e5e90a3 100644 --- a/compiler/rustc_target/src/spec/x86_64_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/x86_64_pc_windows_msvc.rs @@ -12,7 +12,6 @@ pub fn target() -> Target { data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_vendor: "pc".to_string(), linker_flavor: LinkerFlavor::Msvc, options: base, } diff --git a/compiler/rustc_target/src/spec/x86_64_rumprun_netbsd.rs b/compiler/rustc_target/src/spec/x86_64_rumprun_netbsd.rs index d2fdb68b7df1..a93a365443b3 100644 --- a/compiler/rustc_target/src/spec/x86_64_rumprun_netbsd.rs +++ b/compiler/rustc_target/src/spec/x86_64_rumprun_netbsd.rs @@ -2,6 +2,7 @@ pub fn target() -> Target { let mut base = super::netbsd_base::opts(); + base.target_vendor = "rumprun".to_string(); base.cpu = "x86-64".to_string(); base.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap().push("-m64".to_string()); base.linker = Some("x86_64-rumprun-netbsd-gcc".to_string()); @@ -19,7 +20,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_vendor: "rumprun".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "__mcount".to_string(), ..base }, } diff --git a/compiler/rustc_target/src/spec/x86_64_sun_solaris.rs b/compiler/rustc_target/src/spec/x86_64_sun_solaris.rs index 4c703cedf1d1..69f6c27a6041 100644 --- a/compiler/rustc_target/src/spec/x86_64_sun_solaris.rs +++ b/compiler/rustc_target/src/spec/x86_64_sun_solaris.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_vendor: "sun".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_cloudabi.rs b/compiler/rustc_target/src/spec/x86_64_unknown_cloudabi.rs index 38b1e3b1f0dd..01fc78b389f6 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_cloudabi.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_cloudabi.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_dragonfly.rs b/compiler/rustc_target/src/spec/x86_64_unknown_dragonfly.rs index e9b041de5987..3b5d12461e48 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_dragonfly.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_dragonfly.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_freebsd.rs b/compiler/rustc_target/src/spec/x86_64_unknown_freebsd.rs index 60ceead7f59a..14518870b9f6 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_freebsd.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_haiku.rs b/compiler/rustc_target/src/spec/x86_64_unknown_haiku.rs index bb9f8990c7c3..9706ffb345c7 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_haiku.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_haiku.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_hermit.rs b/compiler/rustc_target/src/spec/x86_64_unknown_hermit.rs index 0a6dda5da711..77d2cd1e434e 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_hermit.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_hermit.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: base, } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_hermit_kernel.rs b/compiler/rustc_target/src/spec/x86_64_unknown_hermit_kernel.rs index 74371f408621..d1e9ac28517f 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_hermit_kernel.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_hermit_kernel.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: base, } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_illumos.rs b/compiler/rustc_target/src/spec/x86_64_unknown_illumos.rs index fe647a9c861c..73238c87ac96 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_illumos.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_illumos.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_l4re_uclibc.rs b/compiler/rustc_target/src/spec/x86_64_unknown_l4re_uclibc.rs index 99a690461b6a..0eeced2479c1 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_l4re_uclibc.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_l4re_uclibc.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Ld, options: base, } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs index cbb143d72e78..2423a905eb02 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnux32.rs b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnux32.rs index 1027d69ba7e8..ef1a736c82dd 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnux32.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnux32.rs @@ -18,7 +18,6 @@ pub fn target() -> Target { i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/x86_64_unknown_linux_musl.rs index 0c0200e6544d..eccf85deb0f2 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_linux_musl.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_netbsd.rs b/compiler/rustc_target/src/spec/x86_64_unknown_netbsd.rs index 23e4a6dac011..4920b7929d99 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_netbsd.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "__mcount".to_string(), ..base }, } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_openbsd.rs b/compiler/rustc_target/src/spec/x86_64_unknown_openbsd.rs index 41bf0a22017e..26d81128d7c5 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_openbsd.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_redox.rs b/compiler/rustc_target/src/spec/x86_64_unknown_redox.rs index aa1a1db9e832..a66c10cec149 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_redox.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_redox.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_vendor: "unknown".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs b/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs index 6fe0a9dcc054..0d7d6b79a461 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs @@ -33,7 +33,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), - target_vendor: "unknown".to_string(), arch: "x86_64".to_string(), linker_flavor: LinkerFlavor::Lld(LldFlavor::Link), diff --git a/compiler/rustc_target/src/spec/x86_64_uwp_windows_gnu.rs b/compiler/rustc_target/src/spec/x86_64_uwp_windows_gnu.rs index b3f7e1d1ae67..2c2ca693b958 100644 --- a/compiler/rustc_target/src/spec/x86_64_uwp_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/x86_64_uwp_windows_gnu.rs @@ -17,7 +17,6 @@ pub fn target() -> Target { data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_vendor: "uwp".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/x86_64_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/x86_64_uwp_windows_msvc.rs index bab3e6d1118c..1290b3c8e7a0 100644 --- a/compiler/rustc_target/src/spec/x86_64_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/x86_64_uwp_windows_msvc.rs @@ -12,7 +12,6 @@ pub fn target() -> Target { data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_vendor: "uwp".to_string(), linker_flavor: LinkerFlavor::Msvc, options: base, } diff --git a/compiler/rustc_target/src/spec/x86_64_wrs_vxworks.rs b/compiler/rustc_target/src/spec/x86_64_wrs_vxworks.rs index f604772cb98e..9339d465ad85 100644 --- a/compiler/rustc_target/src/spec/x86_64_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/x86_64_wrs_vxworks.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - target_vendor: "wrs".to_string(), linker_flavor: LinkerFlavor::Gcc, options: base, } From d41fe05d1ae5622af64289487845adc2132d1b77 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Thu, 8 Oct 2020 22:22:28 +0300 Subject: [PATCH 6/7] rustc_target: Move `linker_flavor` from `Target` to `TargetOptions` --- .../src/spec/aarch64_apple_darwin.rs | 1 - .../src/spec/aarch64_apple_ios.rs | 3 +-- .../src/spec/aarch64_apple_tvos.rs | 3 +-- .../rustc_target/src/spec/aarch64_fuchsia.rs | 3 +-- .../src/spec/aarch64_linux_android.rs | 3 +-- .../src/spec/aarch64_pc_windows_msvc.rs | 3 +-- .../src/spec/aarch64_unknown_cloudabi.rs | 3 +-- .../src/spec/aarch64_unknown_freebsd.rs | 3 +-- .../src/spec/aarch64_unknown_hermit.rs | 3 +-- .../src/spec/aarch64_unknown_linux_gnu.rs | 3 +-- .../src/spec/aarch64_unknown_linux_musl.rs | 3 +-- .../src/spec/aarch64_unknown_netbsd.rs | 3 +-- .../src/spec/aarch64_unknown_none.rs | 2 +- .../spec/aarch64_unknown_none_softfloat.rs | 2 +- .../src/spec/aarch64_unknown_openbsd.rs | 3 +-- .../src/spec/aarch64_unknown_redox.rs | 3 +-- .../src/spec/aarch64_uwp_windows_msvc.rs | 3 +-- .../src/spec/aarch64_wrs_vxworks.rs | 3 +-- .../src/spec/arm_linux_androideabi.rs | 3 +-- .../src/spec/arm_unknown_linux_gnueabi.rs | 3 +-- .../src/spec/arm_unknown_linux_gnueabihf.rs | 3 +-- .../src/spec/arm_unknown_linux_musleabi.rs | 3 +-- .../src/spec/arm_unknown_linux_musleabihf.rs | 3 +-- .../src/spec/armebv7r_none_eabi.rs | 2 +- .../src/spec/armebv7r_none_eabihf.rs | 2 +- .../src/spec/armv4t_unknown_linux_gnueabi.rs | 3 +-- .../src/spec/armv5te_unknown_linux_gnueabi.rs | 3 +-- .../spec/armv5te_unknown_linux_musleabi.rs | 3 +-- .../src/spec/armv6_unknown_freebsd.rs | 3 +-- .../src/spec/armv6_unknown_netbsd_eabihf.rs | 3 +-- .../rustc_target/src/spec/armv7_apple_ios.rs | 3 +-- .../src/spec/armv7_linux_androideabi.rs | 1 - .../src/spec/armv7_unknown_cloudabi_eabihf.rs | 3 +-- .../src/spec/armv7_unknown_freebsd.rs | 3 +-- .../src/spec/armv7_unknown_linux_gnueabi.rs | 3 +-- .../src/spec/armv7_unknown_linux_gnueabihf.rs | 3 +-- .../src/spec/armv7_unknown_linux_musleabi.rs | 3 +-- .../spec/armv7_unknown_linux_musleabihf.rs | 3 +-- .../src/spec/armv7_unknown_netbsd_eabihf.rs | 3 +-- .../src/spec/armv7_wrs_vxworks_eabihf.rs | 3 +-- .../rustc_target/src/spec/armv7a_none_eabi.rs | 2 +- .../src/spec/armv7a_none_eabihf.rs | 2 +- .../rustc_target/src/spec/armv7r_none_eabi.rs | 2 +- .../src/spec/armv7r_none_eabihf.rs | 2 +- .../rustc_target/src/spec/armv7s_apple_ios.rs | 3 +-- .../rustc_target/src/spec/avr_gnu_base.rs | 1 - .../rustc_target/src/spec/fuchsia_base.rs | 1 + compiler/rustc_target/src/spec/hermit_base.rs | 1 + .../src/spec/hermit_kernel_base.rs | 1 + .../src/spec/hexagon_unknown_linux_musl.rs | 3 +-- .../rustc_target/src/spec/i386_apple_ios.rs | 3 +-- .../src/spec/i686_apple_darwin.rs | 1 - .../src/spec/i686_linux_android.rs | 3 +-- .../src/spec/i686_pc_windows_gnu.rs | 1 - .../src/spec/i686_pc_windows_msvc.rs | 1 - .../src/spec/i686_unknown_cloudabi.rs | 1 - .../src/spec/i686_unknown_freebsd.rs | 1 - .../src/spec/i686_unknown_haiku.rs | 1 - .../src/spec/i686_unknown_linux_gnu.rs | 1 - .../src/spec/i686_unknown_linux_musl.rs | 1 - .../src/spec/i686_unknown_netbsd.rs | 1 - .../src/spec/i686_unknown_openbsd.rs | 1 - .../src/spec/i686_unknown_uefi.rs | 3 +-- .../src/spec/i686_uwp_windows_gnu.rs | 1 - .../src/spec/i686_uwp_windows_msvc.rs | 3 +-- .../rustc_target/src/spec/i686_wrs_vxworks.rs | 1 - compiler/rustc_target/src/spec/l4re_base.rs | 1 + .../src/spec/mips64_unknown_linux_gnuabi64.rs | 3 +-- .../spec/mips64_unknown_linux_muslabi64.rs | 3 +-- .../spec/mips64el_unknown_linux_gnuabi64.rs | 3 +-- .../spec/mips64el_unknown_linux_muslabi64.rs | 3 +-- .../src/spec/mips_unknown_linux_gnu.rs | 3 +-- .../src/spec/mips_unknown_linux_musl.rs | 3 +-- .../src/spec/mips_unknown_linux_uclibc.rs | 3 +-- .../rustc_target/src/spec/mipsel_sony_psp.rs | 2 +- .../src/spec/mipsel_unknown_linux_gnu.rs | 3 +-- .../src/spec/mipsel_unknown_linux_musl.rs | 3 +-- .../src/spec/mipsel_unknown_linux_uclibc.rs | 3 +-- .../src/spec/mipsisa32r6_unknown_linux_gnu.rs | 3 +-- .../spec/mipsisa32r6el_unknown_linux_gnu.rs | 3 +-- .../mipsisa64r6_unknown_linux_gnuabi64.rs | 3 +-- .../mipsisa64r6el_unknown_linux_gnuabi64.rs | 3 +-- compiler/rustc_target/src/spec/mod.rs | 24 ++++++++++--------- .../rustc_target/src/spec/msp430_none_elf.rs | 3 +-- compiler/rustc_target/src/spec/msvc_base.rs | 1 + .../src/spec/nvptx64_nvidia_cuda.rs | 4 +--- .../src/spec/powerpc64_unknown_freebsd.rs | 1 - .../src/spec/powerpc64_unknown_linux_gnu.rs | 1 - .../src/spec/powerpc64_unknown_linux_musl.rs | 1 - .../src/spec/powerpc64_wrs_vxworks.rs | 1 - .../src/spec/powerpc64le_unknown_linux_gnu.rs | 1 - .../spec/powerpc64le_unknown_linux_musl.rs | 1 - .../src/spec/powerpc_unknown_linux_gnu.rs | 1 - .../src/spec/powerpc_unknown_linux_gnuspe.rs | 1 - .../src/spec/powerpc_unknown_linux_musl.rs | 1 - .../src/spec/powerpc_unknown_netbsd.rs | 1 - .../src/spec/powerpc_wrs_vxworks.rs | 1 - .../src/spec/powerpc_wrs_vxworks_spe.rs | 1 - .../src/spec/riscv32gc_unknown_linux_gnu.rs | 3 +-- .../src/spec/riscv32i_unknown_none_elf.rs | 2 +- .../src/spec/riscv32imac_unknown_none_elf.rs | 2 +- .../src/spec/riscv32imc_unknown_none_elf.rs | 2 +- .../src/spec/riscv64gc_unknown_linux_gnu.rs | 3 +-- .../src/spec/riscv64gc_unknown_none_elf.rs | 2 +- .../src/spec/riscv64imac_unknown_none_elf.rs | 2 +- .../src/spec/s390x_unknown_linux_gnu.rs | 3 +-- .../src/spec/sparc64_unknown_linux_gnu.rs | 3 +-- .../src/spec/sparc64_unknown_netbsd.rs | 1 - .../src/spec/sparc64_unknown_openbsd.rs | 1 - .../src/spec/sparc_unknown_linux_gnu.rs | 1 - .../src/spec/sparcv9_sun_solaris.rs | 1 - compiler/rustc_target/src/spec/thumb_base.rs | 3 ++- .../src/spec/thumbv4t_none_eabi.rs | 2 +- .../src/spec/thumbv6m_none_eabi.rs | 3 +-- .../src/spec/thumbv7a_pc_windows_msvc.rs | 1 - .../src/spec/thumbv7a_uwp_windows_msvc.rs | 3 +-- .../src/spec/thumbv7em_none_eabi.rs | 3 +-- .../src/spec/thumbv7em_none_eabihf.rs | 3 +-- .../src/spec/thumbv7m_none_eabi.rs | 3 +-- .../src/spec/thumbv7neon_linux_androideabi.rs | 1 - .../thumbv7neon_unknown_linux_gnueabihf.rs | 3 +-- .../thumbv7neon_unknown_linux_musleabihf.rs | 3 +-- .../src/spec/thumbv8m_base_none_eabi.rs | 3 +-- .../src/spec/thumbv8m_main_none_eabi.rs | 3 +-- .../src/spec/thumbv8m_main_none_eabihf.rs | 3 +-- .../rustc_target/src/spec/uefi_msvc_base.rs | 1 + .../src/spec/wasm32_unknown_emscripten.rs | 2 +- .../src/spec/wasm32_unknown_unknown.rs | 2 +- compiler/rustc_target/src/spec/wasm32_wasi.rs | 2 +- .../src/spec/x86_64_apple_darwin.rs | 1 - .../rustc_target/src/spec/x86_64_apple_ios.rs | 3 +-- .../src/spec/x86_64_apple_ios_macabi.rs | 3 +-- .../src/spec/x86_64_apple_tvos.rs | 3 +-- .../src/spec/x86_64_fortanix_unknown_sgx.rs | 2 +- .../rustc_target/src/spec/x86_64_fuchsia.rs | 3 +-- .../src/spec/x86_64_linux_android.rs | 1 - .../src/spec/x86_64_linux_kernel.rs | 1 - .../src/spec/x86_64_pc_windows_gnu.rs | 1 - .../src/spec/x86_64_pc_windows_msvc.rs | 3 +-- .../src/spec/x86_64_rumprun_netbsd.rs | 1 - .../src/spec/x86_64_sun_solaris.rs | 1 - .../src/spec/x86_64_unknown_cloudabi.rs | 1 - .../src/spec/x86_64_unknown_dragonfly.rs | 1 - .../src/spec/x86_64_unknown_freebsd.rs | 1 - .../src/spec/x86_64_unknown_haiku.rs | 1 - .../src/spec/x86_64_unknown_hermit.rs | 3 +-- .../src/spec/x86_64_unknown_hermit_kernel.rs | 3 +-- .../src/spec/x86_64_unknown_illumos.rs | 1 - .../src/spec/x86_64_unknown_l4re_uclibc.rs | 3 +-- .../src/spec/x86_64_unknown_linux_gnu.rs | 1 - .../src/spec/x86_64_unknown_linux_gnux32.rs | 1 - .../src/spec/x86_64_unknown_linux_musl.rs | 1 - .../src/spec/x86_64_unknown_netbsd.rs | 1 - .../src/spec/x86_64_unknown_openbsd.rs | 1 - .../src/spec/x86_64_unknown_redox.rs | 1 - .../src/spec/x86_64_unknown_uefi.rs | 3 +-- .../src/spec/x86_64_uwp_windows_gnu.rs | 1 - .../src/spec/x86_64_uwp_windows_msvc.rs | 3 +-- .../src/spec/x86_64_wrs_vxworks.rs | 1 - 159 files changed, 120 insertions(+), 244 deletions(-) diff --git a/compiler/rustc_target/src/spec/aarch64_apple_darwin.rs b/compiler/rustc_target/src/spec/aarch64_apple_darwin.rs index 7e7975a1dcb7..098651614d0c 100644 --- a/compiler/rustc_target/src/spec/aarch64_apple_darwin.rs +++ b/compiler/rustc_target/src/spec/aarch64_apple_darwin.rs @@ -19,7 +19,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".to_string(), arch: arch.to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "\u{1}mcount".to_string(), ..base }, } } diff --git a/compiler/rustc_target/src/spec/aarch64_apple_ios.rs b/compiler/rustc_target/src/spec/aarch64_apple_ios.rs index ce1e653e7d95..2218c6c6da7a 100644 --- a/compiler/rustc_target/src/spec/aarch64_apple_ios.rs +++ b/compiler/rustc_target/src/spec/aarch64_apple_ios.rs @@ -1,5 +1,5 @@ use super::apple_sdk_base::{opts, Arch}; -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let base = opts("ios", Arch::Arm64); @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { features: "+neon,+fp-armv8,+apple-a7".to_string(), eliminate_frame_pointer: false, diff --git a/compiler/rustc_target/src/spec/aarch64_apple_tvos.rs b/compiler/rustc_target/src/spec/aarch64_apple_tvos.rs index c0949a474094..a83de77dc2a9 100644 --- a/compiler/rustc_target/src/spec/aarch64_apple_tvos.rs +++ b/compiler/rustc_target/src/spec/aarch64_apple_tvos.rs @@ -1,5 +1,5 @@ use super::apple_sdk_base::{opts, Arch}; -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let base = opts("tvos", Arch::Arm64); @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:o-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { features: "+neon,+fp-armv8,+apple-a7".to_string(), eliminate_frame_pointer: false, diff --git a/compiler/rustc_target/src/spec/aarch64_fuchsia.rs b/compiler/rustc_target/src/spec/aarch64_fuchsia.rs index 736a69843735..1252741f9797 100644 --- a/compiler/rustc_target/src/spec/aarch64_fuchsia.rs +++ b/compiler/rustc_target/src/spec/aarch64_fuchsia.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, LldFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let mut base = super::fuchsia_base::opts(); @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, } } diff --git a/compiler/rustc_target/src/spec/aarch64_linux_android.rs b/compiler/rustc_target/src/spec/aarch64_linux_android.rs index e2cf79769fc4..fa6108df206b 100644 --- a/compiler/rustc_target/src/spec/aarch64_linux_android.rs +++ b/compiler/rustc_target/src/spec/aarch64_linux_android.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; // See https://developer.android.com/ndk/guides/abis.html#arm64-v8a // for target ABI requirements. @@ -14,7 +14,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, } } diff --git a/compiler/rustc_target/src/spec/aarch64_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/aarch64_pc_windows_msvc.rs index 0ccac19e9718..1369d9d07985 100644 --- a/compiler/rustc_target/src/spec/aarch64_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/aarch64_pc_windows_msvc.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target}; +use crate::spec::Target; pub fn target() -> Target { let mut base = super::windows_msvc_base::opts(); @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - linker_flavor: LinkerFlavor::Msvc, options: base, } } diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_cloudabi.rs b/compiler/rustc_target/src/spec/aarch64_unknown_cloudabi.rs index bf6e205640d8..67f69b40e55c 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_cloudabi.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_cloudabi.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target}; +use crate::spec::Target; pub fn target() -> Target { let mut base = super::cloudabi_base::opts(); @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_freebsd.rs b/compiler/rustc_target/src/spec/aarch64_unknown_freebsd.rs index 19b1d247480d..d48389d4a35c 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_freebsd.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let mut base = super::freebsd_base::opts(); @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, } } diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs b/compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs index 7a7ff49bf3bc..44beb2f6ad8d 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, LldFlavor, Target}; +use crate::spec::Target; pub fn target() -> Target { let mut base = super::hermit_base::opts(); @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: base, } } diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs index c7f6f5ae9a62..9d9698a440dc 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let mut base = super::linux_base::opts(); @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), target_mcount: "\u{1}_mcount".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/aarch64_unknown_linux_musl.rs index 52f25ae14e19..2dd703b66ffd 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_linux_musl.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let mut base = super::linux_musl_base::opts(); @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), target_mcount: "\u{1}_mcount".to_string(), diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_netbsd.rs b/compiler/rustc_target/src/spec/aarch64_unknown_netbsd.rs index 0968cf51a8cc..81e383ca5f19 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_netbsd.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let mut base = super::netbsd_base::opts(); @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "__mcount".to_string(), ..base }, } } diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_none.rs b/compiler/rustc_target/src/spec/aarch64_unknown_none.rs index 1b89f8a02b33..1088807f2c29 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_none.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_none.rs @@ -11,6 +11,7 @@ pub fn target() -> Target { let opts = TargetOptions { target_vendor: String::new(), + linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), linker: Some("rust-lld".to_owned()), features: "+strict-align,+neon,+fp-armv8".to_string(), executables: true, @@ -27,7 +28,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: opts, } } diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_none_softfloat.rs b/compiler/rustc_target/src/spec/aarch64_unknown_none_softfloat.rs index 2880be34c870..044c9fa1de8c 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_none_softfloat.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_none_softfloat.rs @@ -11,6 +11,7 @@ pub fn target() -> Target { let opts = TargetOptions { target_vendor: String::new(), + linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), linker: Some("rust-lld".to_owned()), features: "+strict-align,-neon,-fp-armv8".to_string(), executables: true, @@ -27,7 +28,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: opts, } } diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_openbsd.rs b/compiler/rustc_target/src/spec/aarch64_unknown_openbsd.rs index 443e75b11e24..83ba1ecd1d3e 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_openbsd.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target}; +use crate::spec::Target; pub fn target() -> Target { let mut base = super::openbsd_base::opts(); @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/aarch64_unknown_redox.rs b/compiler/rustc_target/src/spec/aarch64_unknown_redox.rs index 0f049b47972d..b9c9325831d8 100644 --- a/compiler/rustc_target/src/spec/aarch64_unknown_redox.rs +++ b/compiler/rustc_target/src/spec/aarch64_unknown_redox.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target}; +use crate::spec::Target; pub fn target() -> Target { let mut base = super::redox_base::opts(); @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/aarch64_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/aarch64_uwp_windows_msvc.rs index 4bcacc6e2250..e0a81df2b0de 100644 --- a/compiler/rustc_target/src/spec/aarch64_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/aarch64_uwp_windows_msvc.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target}; +use crate::spec::Target; pub fn target() -> Target { let mut base = super::windows_uwp_msvc_base::opts(); @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:w-p:64:64-i32:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - linker_flavor: LinkerFlavor::Msvc, options: base, } } diff --git a/compiler/rustc_target/src/spec/aarch64_wrs_vxworks.rs b/compiler/rustc_target/src/spec/aarch64_wrs_vxworks.rs index 73323d39f832..beb8ce30cc93 100644 --- a/compiler/rustc_target/src/spec/aarch64_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/aarch64_wrs_vxworks.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let mut base = super::vxworks_base::opts(); @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".to_string(), arch: "aarch64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, } } diff --git a/compiler/rustc_target/src/spec/arm_linux_androideabi.rs b/compiler/rustc_target/src/spec/arm_linux_androideabi.rs index 86edbfce1faf..43537569e7d4 100644 --- a/compiler/rustc_target/src/spec/arm_linux_androideabi.rs +++ b/compiler/rustc_target/src/spec/arm_linux_androideabi.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let mut base = super::android_base::opts(); @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, } } diff --git a/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabi.rs index 85e62f0c06d5..dca0b1ec2e4f 100644 --- a/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabi.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let mut base = super::linux_base::opts(); @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { features: "+strict-align,+v6".to_string(), diff --git a/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabihf.rs b/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabihf.rs index 170d7b53466e..ee71ae619723 100644 --- a/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabihf.rs +++ b/compiler/rustc_target/src/spec/arm_unknown_linux_gnueabihf.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let mut base = super::linux_base::opts(); @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { features: "+strict-align,+v6,+vfp2,-d32".to_string(), diff --git a/compiler/rustc_target/src/spec/arm_unknown_linux_musleabi.rs b/compiler/rustc_target/src/spec/arm_unknown_linux_musleabi.rs index 592505f2afe8..6938a0436020 100644 --- a/compiler/rustc_target/src/spec/arm_unknown_linux_musleabi.rs +++ b/compiler/rustc_target/src/spec/arm_unknown_linux_musleabi.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let mut base = super::linux_musl_base::opts(); @@ -15,7 +15,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), target_mcount: "\u{1}mcount".to_string(), diff --git a/compiler/rustc_target/src/spec/arm_unknown_linux_musleabihf.rs b/compiler/rustc_target/src/spec/arm_unknown_linux_musleabihf.rs index 18e165d1fc69..4adf3a338930 100644 --- a/compiler/rustc_target/src/spec/arm_unknown_linux_musleabihf.rs +++ b/compiler/rustc_target/src/spec/arm_unknown_linux_musleabihf.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let mut base = super::linux_musl_base::opts(); @@ -15,7 +15,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), target_mcount: "\u{1}mcount".to_string(), diff --git a/compiler/rustc_target/src/spec/armebv7r_none_eabi.rs b/compiler/rustc_target/src/spec/armebv7r_none_eabi.rs index bbee5c022d1e..7bfa5baecb5d 100644 --- a/compiler/rustc_target/src/spec/armebv7r_none_eabi.rs +++ b/compiler/rustc_target/src/spec/armebv7r_none_eabi.rs @@ -9,11 +9,11 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { target_endian: "big".to_string(), target_vendor: String::new(), + linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), executables: true, linker: Some("rust-lld".to_owned()), relocation_model: RelocModel::Static, diff --git a/compiler/rustc_target/src/spec/armebv7r_none_eabihf.rs b/compiler/rustc_target/src/spec/armebv7r_none_eabihf.rs index 800739366e8e..7afc933a28ff 100644 --- a/compiler/rustc_target/src/spec/armebv7r_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/armebv7r_none_eabihf.rs @@ -9,11 +9,11 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { target_endian: "big".to_string(), target_vendor: String::new(), + linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), executables: true, linker: Some("rust-lld".to_owned()), relocation_model: RelocModel::Static, diff --git a/compiler/rustc_target/src/spec/armv4t_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/armv4t_unknown_linux_gnueabi.rs index 3632d8e093c4..c58fa7407b40 100644 --- a/compiler/rustc_target/src/spec/armv4t_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/armv4t_unknown_linux_gnueabi.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let base = super::linux_base::opts(); @@ -7,7 +7,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { features: "+soft-float,+strict-align".to_string(), diff --git a/compiler/rustc_target/src/spec/armv5te_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/armv5te_unknown_linux_gnueabi.rs index 0843e0ce9a54..049a031398a8 100644 --- a/compiler/rustc_target/src/spec/armv5te_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/armv5te_unknown_linux_gnueabi.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let base = super::linux_base::opts(); @@ -7,7 +7,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { features: "+soft-float,+strict-align".to_string(), diff --git a/compiler/rustc_target/src/spec/armv5te_unknown_linux_musleabi.rs b/compiler/rustc_target/src/spec/armv5te_unknown_linux_musleabi.rs index 307ce75fbd25..77cf8bb76d30 100644 --- a/compiler/rustc_target/src/spec/armv5te_unknown_linux_musleabi.rs +++ b/compiler/rustc_target/src/spec/armv5te_unknown_linux_musleabi.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let base = super::linux_musl_base::opts(); @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { features: "+soft-float,+strict-align".to_string(), diff --git a/compiler/rustc_target/src/spec/armv6_unknown_freebsd.rs b/compiler/rustc_target/src/spec/armv6_unknown_freebsd.rs index 8e13deca8c08..981d615f6843 100644 --- a/compiler/rustc_target/src/spec/armv6_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/armv6_unknown_freebsd.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let base = super::freebsd_base::opts(); @@ -7,7 +7,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_env: "gnueabihf".to_string(), diff --git a/compiler/rustc_target/src/spec/armv6_unknown_netbsd_eabihf.rs b/compiler/rustc_target/src/spec/armv6_unknown_netbsd_eabihf.rs index 141108b79833..8417a8f2801a 100644 --- a/compiler/rustc_target/src/spec/armv6_unknown_netbsd_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv6_unknown_netbsd_eabihf.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let mut base = super::netbsd_base::opts(); @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_env: "eabihf".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7_apple_ios.rs b/compiler/rustc_target/src/spec/armv7_apple_ios.rs index 333201263f2a..051a394657cb 100644 --- a/compiler/rustc_target/src/spec/armv7_apple_ios.rs +++ b/compiler/rustc_target/src/spec/armv7_apple_ios.rs @@ -1,5 +1,5 @@ use super::apple_sdk_base::{opts, Arch}; -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let base = opts("ios", Arch::Armv7); @@ -8,7 +8,6 @@ pub fn target() -> Target { 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".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { features: "+v7,+vfp3,+neon".to_string(), max_atomic_width: Some(64), diff --git a/compiler/rustc_target/src/spec/armv7_linux_androideabi.rs b/compiler/rustc_target/src/spec/armv7_linux_androideabi.rs index 4326474dca5a..9aa378a8018f 100644 --- a/compiler/rustc_target/src/spec/armv7_linux_androideabi.rs +++ b/compiler/rustc_target/src/spec/armv7_linux_androideabi.rs @@ -19,7 +19,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, } } diff --git a/compiler/rustc_target/src/spec/armv7_unknown_cloudabi_eabihf.rs b/compiler/rustc_target/src/spec/armv7_unknown_cloudabi_eabihf.rs index f10fb829f197..921640d0aa60 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_cloudabi_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_cloudabi_eabihf.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let mut base = super::cloudabi_base::opts(); @@ -13,7 +13,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "\u{1}mcount".to_string(), ..base }, } } diff --git a/compiler/rustc_target/src/spec/armv7_unknown_freebsd.rs b/compiler/rustc_target/src/spec/armv7_unknown_freebsd.rs index 4d4c20e1eabb..88d5c86cfab0 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_freebsd.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let base = super::freebsd_base::opts(); @@ -7,7 +7,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_env: "gnueabihf".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabi.rs b/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabi.rs index 3895ff11cdcf..2a31bf4e332d 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabi.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabi.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; // This target is for glibc Linux on ARMv7 without thumb-mode, NEON or // hardfloat. @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { features: "+v7,+thumb2,+soft-float,-neon".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabihf.rs b/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabihf.rs index fc20c7b8ab8c..d04400b79dfc 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabihf.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_linux_gnueabihf.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; // This target is for glibc Linux on ARMv7 without NEON or // thumb-mode. See the thumbv7neon variant for enabling both. @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { // Info about features at https://wiki.debian.org/ArmHardFloatPort diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabi.rs b/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabi.rs index ace6e30d5098..ebbbd61fc11b 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabi.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabi.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; // This target is for musl Linux on ARMv7 without thumb-mode, NEON or // hardfloat. @@ -15,7 +15,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { features: "+v7,+thumb2,+soft-float,-neon".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabihf.rs b/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabihf.rs index 3c10024cd26b..ee603aa0684a 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabihf.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_linux_musleabihf.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; // This target is for musl Linux on ARMv7 without thumb-mode or NEON. @@ -12,7 +12,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Gcc, // Most of these settings are copied from the armv7_unknown_linux_gnueabihf // target. diff --git a/compiler/rustc_target/src/spec/armv7_unknown_netbsd_eabihf.rs b/compiler/rustc_target/src/spec/armv7_unknown_netbsd_eabihf.rs index 236cf391bd5a..09c531ebc8af 100644 --- a/compiler/rustc_target/src/spec/armv7_unknown_netbsd_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv7_unknown_netbsd_eabihf.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let base = super::netbsd_base::opts(); @@ -7,7 +7,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_env: "eabihf".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7_wrs_vxworks_eabihf.rs b/compiler/rustc_target/src/spec/armv7_wrs_vxworks_eabihf.rs index ac375b98fbc0..6a43054067fe 100644 --- a/compiler/rustc_target/src/spec/armv7_wrs_vxworks_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv7_wrs_vxworks_eabihf.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let base = super::vxworks_base::opts(); @@ -7,7 +7,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { // Info about features at https://wiki.debian.org/ArmHardFloatPort features: "+v7,+vfp3,-d32,+thumb2,-neon".to_string(), diff --git a/compiler/rustc_target/src/spec/armv7a_none_eabi.rs b/compiler/rustc_target/src/spec/armv7a_none_eabi.rs index 395475ba34ff..b6b34e275628 100644 --- a/compiler/rustc_target/src/spec/armv7a_none_eabi.rs +++ b/compiler/rustc_target/src/spec/armv7a_none_eabi.rs @@ -22,6 +22,7 @@ pub fn target() -> Target { let opts = TargetOptions { target_vendor: String::new(), + linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), linker: Some("rust-lld".to_owned()), features: "+v7,+thumb2,+soft-float,-neon,+strict-align".to_string(), executables: true, @@ -38,7 +39,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: opts, } } diff --git a/compiler/rustc_target/src/spec/armv7a_none_eabihf.rs b/compiler/rustc_target/src/spec/armv7a_none_eabihf.rs index f62261b7abf2..8b9df361844d 100644 --- a/compiler/rustc_target/src/spec/armv7a_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv7a_none_eabihf.rs @@ -10,6 +10,7 @@ pub fn target() -> Target { let opts = TargetOptions { target_vendor: String::new(), + linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), linker: Some("rust-lld".to_owned()), features: "+v7,+vfp3,-d32,+thumb2,-neon,+strict-align".to_string(), executables: true, @@ -26,7 +27,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: opts, } } diff --git a/compiler/rustc_target/src/spec/armv7r_none_eabi.rs b/compiler/rustc_target/src/spec/armv7r_none_eabi.rs index 293df321e238..fdd74d276198 100644 --- a/compiler/rustc_target/src/spec/armv7r_none_eabi.rs +++ b/compiler/rustc_target/src/spec/armv7r_none_eabi.rs @@ -9,10 +9,10 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { target_vendor: String::new(), + linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), executables: true, linker: Some("rust-lld".to_owned()), relocation_model: RelocModel::Static, diff --git a/compiler/rustc_target/src/spec/armv7r_none_eabihf.rs b/compiler/rustc_target/src/spec/armv7r_none_eabihf.rs index c0858e59c658..7baafea90b9a 100644 --- a/compiler/rustc_target/src/spec/armv7r_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/armv7r_none_eabihf.rs @@ -9,10 +9,10 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { target_vendor: String::new(), + linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), executables: true, linker: Some("rust-lld".to_owned()), relocation_model: RelocModel::Static, diff --git a/compiler/rustc_target/src/spec/armv7s_apple_ios.rs b/compiler/rustc_target/src/spec/armv7s_apple_ios.rs index 729cb196c9f9..be74136a2d67 100644 --- a/compiler/rustc_target/src/spec/armv7s_apple_ios.rs +++ b/compiler/rustc_target/src/spec/armv7s_apple_ios.rs @@ -1,5 +1,5 @@ use super::apple_sdk_base::{opts, Arch}; -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let base = opts("ios", Arch::Armv7s); @@ -8,7 +8,6 @@ pub fn target() -> Target { 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".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { features: "+v7,+vfp4,+neon".to_string(), max_atomic_width: Some(64), diff --git a/compiler/rustc_target/src/spec/avr_gnu_base.rs b/compiler/rustc_target/src/spec/avr_gnu_base.rs index d95f9b6aa589..268af87cfe91 100644 --- a/compiler/rustc_target/src/spec/avr_gnu_base.rs +++ b/compiler/rustc_target/src/spec/avr_gnu_base.rs @@ -9,7 +9,6 @@ pub fn target(target_cpu: String) -> Target { data_layout: "e-P1-p:16:8-i8:8-i16:8-i32:8-i64:8-f32:8-f64:8-n8-a:8".to_string(), llvm_target: "avr-unknown-unknown".to_string(), pointer_width: 16, - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_c_int_width: "16".to_string(), target_os: "unknown".to_string(), diff --git a/compiler/rustc_target/src/spec/fuchsia_base.rs b/compiler/rustc_target/src/spec/fuchsia_base.rs index 12e3ad54a786..97998eed8862 100644 --- a/compiler/rustc_target/src/spec/fuchsia_base.rs +++ b/compiler/rustc_target/src/spec/fuchsia_base.rs @@ -22,6 +22,7 @@ pub fn opts() -> TargetOptions { TargetOptions { target_os: "fuchsia".to_string(), target_vendor: String::new(), + linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), linker: Some("rust-lld".to_owned()), lld_flavor: LldFlavor::Ld, dynamic_linking: true, diff --git a/compiler/rustc_target/src/spec/hermit_base.rs b/compiler/rustc_target/src/spec/hermit_base.rs index e2d194afa18a..2953646afd03 100644 --- a/compiler/rustc_target/src/spec/hermit_base.rs +++ b/compiler/rustc_target/src/spec/hermit_base.rs @@ -10,6 +10,7 @@ pub fn opts() -> TargetOptions { TargetOptions { target_os: "hermit".to_string(), + linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), linker: Some("rust-lld".to_owned()), executables: true, has_elf_tls: true, diff --git a/compiler/rustc_target/src/spec/hermit_kernel_base.rs b/compiler/rustc_target/src/spec/hermit_kernel_base.rs index e20df9d15aae..7d06cbd62f59 100644 --- a/compiler/rustc_target/src/spec/hermit_kernel_base.rs +++ b/compiler/rustc_target/src/spec/hermit_kernel_base.rs @@ -10,6 +10,7 @@ pub fn opts() -> TargetOptions { TargetOptions { target_os: "hermit".to_string(), + linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), disable_redzone: true, linker: Some("rust-lld".to_owned()), executables: true, diff --git a/compiler/rustc_target/src/spec/hexagon_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/hexagon_unknown_linux_musl.rs index 87e7c0ddf118..73d5e2057f95 100644 --- a/compiler/rustc_target/src/spec/hexagon_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/hexagon_unknown_linux_musl.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkArgs, LinkerFlavor, Target}; +use crate::spec::{LinkArgs, Target}; pub fn target() -> Target { let mut base = super::linux_musl_base::opts(); @@ -28,7 +28,6 @@ pub fn target() -> Target { ) .to_string(), arch: "hexagon".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/i386_apple_ios.rs b/compiler/rustc_target/src/spec/i386_apple_ios.rs index 6d38f42387b3..302306ee5799 100644 --- a/compiler/rustc_target/src/spec/i386_apple_ios.rs +++ b/compiler/rustc_target/src/spec/i386_apple_ios.rs @@ -1,5 +1,5 @@ use super::apple_sdk_base::{opts, Arch}; -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let base = opts("ios", Arch::I386); @@ -10,7 +10,6 @@ pub fn target() -> Target { f64:32:64-f80:128-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { max_atomic_width: Some(64), stack_probes: true, ..base }, } } diff --git a/compiler/rustc_target/src/spec/i686_apple_darwin.rs b/compiler/rustc_target/src/spec/i686_apple_darwin.rs index 21552c3db86e..ac295aa3587c 100644 --- a/compiler/rustc_target/src/spec/i686_apple_darwin.rs +++ b/compiler/rustc_target/src/spec/i686_apple_darwin.rs @@ -22,7 +22,6 @@ pub fn target() -> Target { f64:32:64-f80:128-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "\u{1}mcount".to_string(), ..base }, } } diff --git a/compiler/rustc_target/src/spec/i686_linux_android.rs b/compiler/rustc_target/src/spec/i686_linux_android.rs index 71bb0f1b2a85..52059b930d13 100644 --- a/compiler/rustc_target/src/spec/i686_linux_android.rs +++ b/compiler/rustc_target/src/spec/i686_linux_android.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target}; +use crate::spec::Target; // See https://developer.android.com/ndk/guides/abis.html#x86 // for target ABI requirements. @@ -20,7 +20,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs b/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs index 9422f8072981..4979a5b3bc84 100644 --- a/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/i686_pc_windows_gnu.rs @@ -23,7 +23,6 @@ pub fn target() -> Target { i64:64-f80:32-n8:16:32-a:0:32-S32" .to_string(), arch: "x86".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/i686_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/i686_pc_windows_msvc.rs index 93abf06dddc9..e7a5643eaaa2 100644 --- a/compiler/rustc_target/src/spec/i686_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/i686_pc_windows_msvc.rs @@ -27,7 +27,6 @@ pub fn target() -> Target { i64:64-f80:32-n8:16:32-a:0:32-S32" .to_string(), arch: "x86".to_string(), - linker_flavor: LinkerFlavor::Msvc, options: base, } } diff --git a/compiler/rustc_target/src/spec/i686_unknown_cloudabi.rs b/compiler/rustc_target/src/spec/i686_unknown_cloudabi.rs index a0e6792ca6ca..0cdb9f9de56c 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_cloudabi.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_cloudabi.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/i686_unknown_freebsd.rs b/compiler/rustc_target/src/spec/i686_unknown_freebsd.rs index baed186ffa33..fc1c8607d654 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_freebsd.rs @@ -16,7 +16,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/i686_unknown_haiku.rs b/compiler/rustc_target/src/spec/i686_unknown_haiku.rs index 4f382ee85bbd..22c8ba547531 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_haiku.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_haiku.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs index 51d61375db9c..62b02d841c21 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_linux_gnu.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/i686_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/i686_unknown_linux_musl.rs index 7853f4415f16..1673b2a18024 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_linux_musl.rs @@ -29,7 +29,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/i686_unknown_netbsd.rs b/compiler/rustc_target/src/spec/i686_unknown_netbsd.rs index 8171f4abb801..2568fabfb050 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_netbsd.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "__mcount".to_string(), ..base }, } } diff --git a/compiler/rustc_target/src/spec/i686_unknown_openbsd.rs b/compiler/rustc_target/src/spec/i686_unknown_openbsd.rs index 2b9d7a519e7e..87642efdee8f 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_openbsd.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/i686_unknown_uefi.rs b/compiler/rustc_target/src/spec/i686_unknown_uefi.rs index 4d66e47613fd..5af3a6b41e2c 100644 --- a/compiler/rustc_target/src/spec/i686_unknown_uefi.rs +++ b/compiler/rustc_target/src/spec/i686_unknown_uefi.rs @@ -5,7 +5,7 @@ // The cdecl ABI is used. It differs from the stdcall or fastcall ABI. // "i686-unknown-windows" is used to get the minimal subset of windows-specific features. -use crate::spec::{LinkerFlavor, LldFlavor, Target}; +use crate::spec::Target; pub fn target() -> Target { let mut base = super::uefi_msvc_base::opts(); @@ -83,7 +83,6 @@ pub fn target() -> Target { i64:64-f80:32-n8:16:32-a:0:32-S32" .to_string(), arch: "x86".to_string(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Link), options: base, } diff --git a/compiler/rustc_target/src/spec/i686_uwp_windows_gnu.rs b/compiler/rustc_target/src/spec/i686_uwp_windows_gnu.rs index 2ba642d2cb4b..a3de93efb782 100644 --- a/compiler/rustc_target/src/spec/i686_uwp_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/i686_uwp_windows_gnu.rs @@ -22,7 +22,6 @@ pub fn target() -> Target { i64:64-f80:32-n8:16:32-a:0:32-S32" .to_string(), arch: "x86".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/i686_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/i686_uwp_windows_msvc.rs index 7bc9f126a586..ce6200be81fd 100644 --- a/compiler/rustc_target/src/spec/i686_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/i686_uwp_windows_msvc.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target}; +use crate::spec::Target; pub fn target() -> Target { let mut base = super::windows_uwp_msvc_base::opts(); @@ -13,7 +13,6 @@ pub fn target() -> Target { i64:64-f80:32-n8:16:32-a:0:32-S32" .to_string(), arch: "x86".to_string(), - linker_flavor: LinkerFlavor::Msvc, options: base, } } diff --git a/compiler/rustc_target/src/spec/i686_wrs_vxworks.rs b/compiler/rustc_target/src/spec/i686_wrs_vxworks.rs index 9a28176fb6e5..c0825358cabb 100644 --- a/compiler/rustc_target/src/spec/i686_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/i686_wrs_vxworks.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { f64:32:64-f80:32-n8:16:32-S128" .to_string(), arch: "x86".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/l4re_base.rs b/compiler/rustc_target/src/spec/l4re_base.rs index cc81b0dabbf7..6d1e610d0e96 100644 --- a/compiler/rustc_target/src/spec/l4re_base.rs +++ b/compiler/rustc_target/src/spec/l4re_base.rs @@ -19,6 +19,7 @@ pub fn opts() -> TargetOptions { TargetOptions { target_os: "l4re".to_string(), target_env: "uclibc".to_string(), + linker_flavor: LinkerFlavor::Ld, executables: true, has_elf_tls: false, panic_strategy: PanicStrategy::Abort, diff --git a/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs index 39d3374effd6..f0a266a63af9 100644 --- a/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/mips64_unknown_linux_gnuabi64.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { Target { @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), // NOTE(mips64r2) matches C toolchain diff --git a/compiler/rustc_target/src/spec/mips64_unknown_linux_muslabi64.rs b/compiler/rustc_target/src/spec/mips64_unknown_linux_muslabi64.rs index fec51e026eff..805a965bc0fe 100644 --- a/compiler/rustc_target/src/spec/mips64_unknown_linux_muslabi64.rs +++ b/compiler/rustc_target/src/spec/mips64_unknown_linux_muslabi64.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let mut base = super::linux_musl_base::opts(); @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), target_mcount: "_mcount".to_string(), diff --git a/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs index 9fffb5e60d8e..f47b058bd082 100644 --- a/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/mips64el_unknown_linux_gnuabi64.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { Target { @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { // NOTE(mips64r2) matches C toolchain cpu: "mips64r2".to_string(), diff --git a/compiler/rustc_target/src/spec/mips64el_unknown_linux_muslabi64.rs b/compiler/rustc_target/src/spec/mips64el_unknown_linux_muslabi64.rs index 82b695571d36..5c985eb842ca 100644 --- a/compiler/rustc_target/src/spec/mips64el_unknown_linux_muslabi64.rs +++ b/compiler/rustc_target/src/spec/mips64el_unknown_linux_muslabi64.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let mut base = super::linux_musl_base::opts(); @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "_mcount".to_string(), ..base }, } } diff --git a/compiler/rustc_target/src/spec/mips_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/mips_unknown_linux_gnu.rs index 83ad3d052017..1fc668613641 100644 --- a/compiler/rustc_target/src/spec/mips_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/mips_unknown_linux_gnu.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { Target { @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), cpu: "mips32r2".to_string(), diff --git a/compiler/rustc_target/src/spec/mips_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/mips_unknown_linux_musl.rs index b9d0471c1d28..ed03f5d990ed 100644 --- a/compiler/rustc_target/src/spec/mips_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/mips_unknown_linux_musl.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let mut base = super::linux_musl_base::opts(); @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), target_mcount: "_mcount".to_string(), diff --git a/compiler/rustc_target/src/spec/mips_unknown_linux_uclibc.rs b/compiler/rustc_target/src/spec/mips_unknown_linux_uclibc.rs index b17e4e945ee6..fa1d789bfa8c 100644 --- a/compiler/rustc_target/src/spec/mips_unknown_linux_uclibc.rs +++ b/compiler/rustc_target/src/spec/mips_unknown_linux_uclibc.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { Target { @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), cpu: "mips32r2".to_string(), diff --git a/compiler/rustc_target/src/spec/mipsel_sony_psp.rs b/compiler/rustc_target/src/spec/mipsel_sony_psp.rs index 1c7c4c71fa6b..3f426e2e5fe6 100644 --- a/compiler/rustc_target/src/spec/mipsel_sony_psp.rs +++ b/compiler/rustc_target/src/spec/mipsel_sony_psp.rs @@ -13,11 +13,11 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { target_os: "psp".to_string(), target_vendor: "sony".to_string(), + linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), cpu: "mips2".to_string(), executables: true, linker: Some("rust-lld".to_owned()), diff --git a/compiler/rustc_target/src/spec/mipsel_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/mipsel_unknown_linux_gnu.rs index 1c7a01cfef9e..16fbab58140f 100644 --- a/compiler/rustc_target/src/spec/mipsel_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/mipsel_unknown_linux_gnu.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { Target { @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { cpu: "mips32r2".to_string(), diff --git a/compiler/rustc_target/src/spec/mipsel_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/mipsel_unknown_linux_musl.rs index 65c70a98f897..d1b603cd9de2 100644 --- a/compiler/rustc_target/src/spec/mipsel_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/mipsel_unknown_linux_musl.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let mut base = super::linux_musl_base::opts(); @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "_mcount".to_string(), ..base }, } } diff --git a/compiler/rustc_target/src/spec/mipsel_unknown_linux_uclibc.rs b/compiler/rustc_target/src/spec/mipsel_unknown_linux_uclibc.rs index 96911da1a24a..a09f7ad01210 100644 --- a/compiler/rustc_target/src/spec/mipsel_unknown_linux_uclibc.rs +++ b/compiler/rustc_target/src/spec/mipsel_unknown_linux_uclibc.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { Target { @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { cpu: "mips32r2".to_string(), diff --git a/compiler/rustc_target/src/spec/mipsisa32r6_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/mipsisa32r6_unknown_linux_gnu.rs index 4eb3d3e70e70..417ee6e043be 100644 --- a/compiler/rustc_target/src/spec/mipsisa32r6_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/mipsisa32r6_unknown_linux_gnu.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { Target { @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), cpu: "mips32r6".to_string(), diff --git a/compiler/rustc_target/src/spec/mipsisa32r6el_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/mipsisa32r6el_unknown_linux_gnu.rs index 3345f147ac41..cf273c6ab2bb 100644 --- a/compiler/rustc_target/src/spec/mipsisa32r6el_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/mipsisa32r6el_unknown_linux_gnu.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { Target { @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { cpu: "mips32r6".to_string(), diff --git a/compiler/rustc_target/src/spec/mipsisa64r6_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/mipsisa64r6_unknown_linux_gnuabi64.rs index 5614bcc275f4..1d82395f5360 100644 --- a/compiler/rustc_target/src/spec/mipsisa64r6_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/mipsisa64r6_unknown_linux_gnuabi64.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { Target { @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), // NOTE(mips64r6) matches C toolchain diff --git a/compiler/rustc_target/src/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs b/compiler/rustc_target/src/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs index 158014c49337..aadd36235bf9 100644 --- a/compiler/rustc_target/src/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs +++ b/compiler/rustc_target/src/spec/mipsisa64r6el_unknown_linux_gnuabi64.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { Target { @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i8:8:32-i16:16:32-i64:64-n32:64-S128".to_string(), arch: "mips64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { // NOTE(mips64r6) matches C toolchain cpu: "mips64r6".to_string(), diff --git a/compiler/rustc_target/src/spec/mod.rs b/compiler/rustc_target/src/spec/mod.rs index 9a72f2bd97e2..895114b026e3 100644 --- a/compiler/rustc_target/src/spec/mod.rs +++ b/compiler/rustc_target/src/spec/mod.rs @@ -673,9 +673,6 @@ pub struct Target { pub arch: String, /// [Data layout](http://llvm.org/docs/LangRef.html#data-layout) to pass to LLVM. pub data_layout: String, - /// Default linker flavor used if `-C linker-flavor` or `-C linker` are not passed - /// on the command line. - pub linker_flavor: LinkerFlavor, /// Optional settings with defaults. pub options: TargetOptions, } @@ -709,6 +706,9 @@ pub struct TargetOptions { pub target_env: String, /// Vendor name to use for conditional compilation. Defaults to "unknown". pub target_vendor: String, + /// Default linker flavor used if `-C linker-flavor` or `-C linker` are not passed + /// on the command line. Defaults to `LinkerFlavor::Gcc`. + pub linker_flavor: LinkerFlavor, /// Linker to invoke pub linker: Option, @@ -993,6 +993,7 @@ fn default() -> TargetOptions { target_os: "none".to_string(), target_env: String::new(), target_vendor: "unknown".to_string(), + linker_flavor: LinkerFlavor::Gcc, linker: option_env!("CFG_DEFAULT_LINKER").map(|s| s.to_string()), lld_flavor: LldFlavor::Ld, pre_link_args: LinkArgs::new(), @@ -1161,8 +1162,6 @@ pub fn from_json(obj: Json) -> Result { .map_err(|_| "target-pointer-width must be an integer".to_string())?, data_layout: get_req_field("data-layout")?, arch: get_req_field("arch")?, - linker_flavor: LinkerFlavor::from_str(&*get_req_field("linker-flavor")?) - .ok_or_else(|| format!("linker flavor must be {}", LinkerFlavor::one_of()))?, options: Default::default(), }; @@ -1314,11 +1313,13 @@ macro_rules! key { } ); ($key_name:ident, LinkerFlavor) => ( { let name = (stringify!($key_name)).replace("_", "-"); - obj.find(&name[..]).and_then(|o| o.as_string().map(|s| { - LinkerFlavor::from_str(&s).ok_or_else(|| { - Err(format!("'{}' is not a valid value for linker-flavor. \ - Use 'em', 'gcc', 'ld' or 'msvc.", s)) - }) + obj.find(&name[..]).and_then(|o| o.as_string().and_then(|s| { + match LinkerFlavor::from_str(s) { + Some(linker_flavor) => base.options.$key_name = linker_flavor, + _ => return Some(Err(format!("'{}' is not a valid value for linker-flavor. \ + Use {}", s, LinkerFlavor::one_of()))), + } + Some(Ok(())) })).unwrap_or(Ok(())) } ); ($key_name:ident, crt_objects_fallback) => ( { @@ -1410,6 +1411,7 @@ macro_rules! key { key!(target_os = "os"); key!(target_env = "env"); key!(target_vendor = "vendor"); + key!(linker_flavor, LinkerFlavor)?; key!(linker, optional); key!(lld_flavor, LldFlavor)?; key!(pre_link_objects, link_objects); @@ -1640,7 +1642,6 @@ macro_rules! target_option_val { d.insert("target-pointer-width".to_string(), self.pointer_width.to_string().to_json()); target_val!(arch); target_val!(data_layout); - target_val!(linker_flavor); target_option_val!(is_builtin); target_option_val!(target_endian); @@ -1648,6 +1649,7 @@ macro_rules! target_option_val { target_option_val!(target_os, "os"); target_option_val!(target_env, "env"); target_option_val!(target_vendor, "vendor"); + target_option_val!(linker_flavor); target_option_val!(linker); target_option_val!(lld_flavor); target_option_val!(pre_link_objects); diff --git a/compiler/rustc_target/src/spec/msp430_none_elf.rs b/compiler/rustc_target/src/spec/msp430_none_elf.rs index 6f5e39eb8f10..48b6d1be9ceb 100644 --- a/compiler/rustc_target/src/spec/msp430_none_elf.rs +++ b/compiler/rustc_target/src/spec/msp430_none_elf.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, PanicStrategy, RelocModel, Target, TargetOptions}; +use crate::spec::{PanicStrategy, RelocModel, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 16, data_layout: "e-m:e-p:16:16-i32:16-i64:16-f32:16-f64:16-a:8-n8:16-S16".to_string(), arch: "msp430".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_c_int_width: "16".to_string(), diff --git a/compiler/rustc_target/src/spec/msvc_base.rs b/compiler/rustc_target/src/spec/msvc_base.rs index f57ef87cf129..8cd6735a8c1e 100644 --- a/compiler/rustc_target/src/spec/msvc_base.rs +++ b/compiler/rustc_target/src/spec/msvc_base.rs @@ -18,6 +18,7 @@ pub fn opts() -> TargetOptions { pre_link_args.insert(LinkerFlavor::Lld(LldFlavor::Link), pre_link_args_msvc); TargetOptions { + linker_flavor: LinkerFlavor::Msvc, executables: true, is_like_windows: true, is_like_msvc: true, diff --git a/compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs b/compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs index d284380195b3..f759724445e2 100644 --- a/compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs +++ b/compiler/rustc_target/src/spec/nvptx64_nvidia_cuda.rs @@ -6,14 +6,12 @@ pub fn target() -> Target { arch: "nvptx64".to_string(), data_layout: "e-i64:64-i128:128-v16:16-v32:32-n16:32:64".to_string(), llvm_target: "nvptx64-nvidia-cuda".to_string(), - - linker_flavor: LinkerFlavor::PtxLinker, - pointer_width: 64, options: TargetOptions { target_os: "cuda".to_string(), target_vendor: "nvidia".to_string(), + linker_flavor: LinkerFlavor::PtxLinker, // The linker can be installed from `crates.io`. linker: Some("rust-ptx-linker".to_string()), diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_freebsd.rs b/compiler/rustc_target/src/spec/powerpc64_unknown_freebsd.rs index 0329f63fccba..3d20f15b3915 100644 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/powerpc64_unknown_freebsd.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), target_mcount: "_mcount".to_string(), diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs index b88f9b7b58ef..e52643eb8932 100644 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), target_mcount: "_mcount".to_string(), diff --git a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_musl.rs index e4ebc7acf014..315192929ac0 100644 --- a/compiler/rustc_target/src/spec/powerpc64_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/powerpc64_unknown_linux_musl.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), target_mcount: "_mcount".to_string(), diff --git a/compiler/rustc_target/src/spec/powerpc64_wrs_vxworks.rs b/compiler/rustc_target/src/spec/powerpc64_wrs_vxworks.rs index 4f44d34cb91f..a31256761a42 100644 --- a/compiler/rustc_target/src/spec/powerpc64_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/powerpc64_wrs_vxworks.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), ..base }, } } diff --git a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs index 98cce4f701ef..4cf296c3fa78 100644 --- a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_gnu.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "_mcount".to_string(), ..base }, } } diff --git a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_musl.rs index 8c3bbd9740b4..41756028cbef 100644 --- a/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/powerpc64le_unknown_linux_musl.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-i64:64-n32:64".to_string(), arch: "powerpc64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "_mcount".to_string(), ..base }, } } diff --git a/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnu.rs index 3ef7e68c2f29..f3ec02c10d20 100644 --- a/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnu.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), target_mcount: "_mcount".to_string(), diff --git a/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnuspe.rs b/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnuspe.rs index 4adc11c98596..4e3ffca0a087 100644 --- a/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnuspe.rs +++ b/compiler/rustc_target/src/spec/powerpc_unknown_linux_gnuspe.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), target_mcount: "_mcount".to_string(), diff --git a/compiler/rustc_target/src/spec/powerpc_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/powerpc_unknown_linux_musl.rs index 0e96997b4872..1d5c19b54204 100644 --- a/compiler/rustc_target/src/spec/powerpc_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/powerpc_unknown_linux_musl.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), target_mcount: "_mcount".to_string(), diff --git a/compiler/rustc_target/src/spec/powerpc_unknown_netbsd.rs b/compiler/rustc_target/src/spec/powerpc_unknown_netbsd.rs index c4c8c1a10231..4d7eb8d01004 100644 --- a/compiler/rustc_target/src/spec/powerpc_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/powerpc_unknown_netbsd.rs @@ -10,7 +10,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), target_mcount: "__mcount".to_string(), diff --git a/compiler/rustc_target/src/spec/powerpc_wrs_vxworks.rs b/compiler/rustc_target/src/spec/powerpc_wrs_vxworks.rs index 95cf49a17641..dc6a4e28a3dc 100644 --- a/compiler/rustc_target/src/spec/powerpc_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/powerpc_wrs_vxworks.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), features: "+secure-plt".to_string(), diff --git a/compiler/rustc_target/src/spec/powerpc_wrs_vxworks_spe.rs b/compiler/rustc_target/src/spec/powerpc_wrs_vxworks_spe.rs index 2ef8d0ad4e8c..1ce3fa21918e 100644 --- a/compiler/rustc_target/src/spec/powerpc_wrs_vxworks_spe.rs +++ b/compiler/rustc_target/src/spec/powerpc_wrs_vxworks_spe.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-n32".to_string(), arch: "powerpc".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), // feature msync would disable instruction 'fsync' which is not supported by fsl_p1p2 diff --git a/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs index 050c95eeb11b..f9405d9dfb63 100644 --- a/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/riscv32gc_unknown_linux_gnu.rs @@ -1,4 +1,4 @@ -use crate::spec::{CodeModel, LinkerFlavor, Target, TargetOptions}; +use crate::spec::{CodeModel, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-i64:64-n32-S128".to_string(), arch: "riscv32".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { unsupported_abis: super::riscv_base::unsupported_abis(), code_model: Some(CodeModel::Medium), diff --git a/compiler/rustc_target/src/spec/riscv32i_unknown_none_elf.rs b/compiler/rustc_target/src/spec/riscv32i_unknown_none_elf.rs index 3f42c52db917..a31a08a8cf93 100644 --- a/compiler/rustc_target/src/spec/riscv32i_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/riscv32i_unknown_none_elf.rs @@ -7,9 +7,9 @@ pub fn target() -> Target { llvm_target: "riscv32".to_string(), pointer_width: 32, arch: "riscv32".to_string(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { + linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), linker: Some("rust-lld".to_string()), cpu: "generic-rv32".to_string(), max_atomic_width: Some(0), diff --git a/compiler/rustc_target/src/spec/riscv32imac_unknown_none_elf.rs b/compiler/rustc_target/src/spec/riscv32imac_unknown_none_elf.rs index adeb085593f4..2ee53fdc4016 100644 --- a/compiler/rustc_target/src/spec/riscv32imac_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/riscv32imac_unknown_none_elf.rs @@ -7,9 +7,9 @@ pub fn target() -> Target { llvm_target: "riscv32".to_string(), pointer_width: 32, arch: "riscv32".to_string(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { + linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), linker: Some("rust-lld".to_string()), cpu: "generic-rv32".to_string(), max_atomic_width: Some(32), diff --git a/compiler/rustc_target/src/spec/riscv32imc_unknown_none_elf.rs b/compiler/rustc_target/src/spec/riscv32imc_unknown_none_elf.rs index 81f1cf36ad99..89d760e082f1 100644 --- a/compiler/rustc_target/src/spec/riscv32imc_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/riscv32imc_unknown_none_elf.rs @@ -7,9 +7,9 @@ pub fn target() -> Target { llvm_target: "riscv32".to_string(), pointer_width: 32, arch: "riscv32".to_string(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { + linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), linker: Some("rust-lld".to_string()), cpu: "generic-rv32".to_string(), max_atomic_width: Some(0), diff --git a/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_gnu.rs index f43bc376f632..3b7ff47a5400 100644 --- a/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/riscv64gc_unknown_linux_gnu.rs @@ -1,4 +1,4 @@ -use crate::spec::{CodeModel, LinkerFlavor, Target, TargetOptions}; +use crate::spec::{CodeModel, Target, TargetOptions}; pub fn target() -> Target { Target { @@ -6,7 +6,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:e-p:64:64-i64:64-i128:128-n64-S128".to_string(), arch: "riscv64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { unsupported_abis: super::riscv_base::unsupported_abis(), code_model: Some(CodeModel::Medium), diff --git a/compiler/rustc_target/src/spec/riscv64gc_unknown_none_elf.rs b/compiler/rustc_target/src/spec/riscv64gc_unknown_none_elf.rs index d9e5dae0cb5c..33a785fdfee4 100644 --- a/compiler/rustc_target/src/spec/riscv64gc_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/riscv64gc_unknown_none_elf.rs @@ -7,9 +7,9 @@ pub fn target() -> Target { llvm_target: "riscv64".to_string(), pointer_width: 64, arch: "riscv64".to_string(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { + linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), linker: Some("rust-lld".to_string()), cpu: "generic-rv64".to_string(), max_atomic_width: Some(64), diff --git a/compiler/rustc_target/src/spec/riscv64imac_unknown_none_elf.rs b/compiler/rustc_target/src/spec/riscv64imac_unknown_none_elf.rs index eb45fccfacc9..908367ee2006 100644 --- a/compiler/rustc_target/src/spec/riscv64imac_unknown_none_elf.rs +++ b/compiler/rustc_target/src/spec/riscv64imac_unknown_none_elf.rs @@ -7,9 +7,9 @@ pub fn target() -> Target { llvm_target: "riscv64".to_string(), pointer_width: 64, arch: "riscv64".to_string(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { + linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), linker: Some("rust-lld".to_string()), cpu: "generic-rv64".to_string(), max_atomic_width: Some(64), diff --git a/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs index 04e7db75759c..69b880cdb81b 100644 --- a/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/s390x_unknown_linux_gnu.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target}; +use crate::spec::Target; pub fn target() -> Target { let mut base = super::linux_base::opts(); @@ -17,7 +17,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i1:8:16-i8:8:16-i64:64-f128:64-a:8:16-n32:64".to_string(), arch: "s390x".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/sparc64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/sparc64_unknown_linux_gnu.rs index 3d938c28bbe2..f02b01a514b4 100644 --- a/compiler/rustc_target/src/spec/sparc64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/sparc64_unknown_linux_gnu.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target}; +use crate::spec::Target; pub fn target() -> Target { let mut base = super::linux_base::opts(); @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64-S128".to_string(), arch: "sparc64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/sparc64_unknown_netbsd.rs b/compiler/rustc_target/src/spec/sparc64_unknown_netbsd.rs index 5fb5aaeccbb4..de35bb8fe149 100644 --- a/compiler/rustc_target/src/spec/sparc64_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/sparc64_unknown_netbsd.rs @@ -11,7 +11,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64-S128".to_string(), arch: "sparc64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_endian: "big".to_string(), target_mcount: "__mcount".to_string(), diff --git a/compiler/rustc_target/src/spec/sparc64_unknown_openbsd.rs b/compiler/rustc_target/src/spec/sparc64_unknown_openbsd.rs index a7cdd9615306..301c91e432ca 100644 --- a/compiler/rustc_target/src/spec/sparc64_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/sparc64_unknown_openbsd.rs @@ -12,7 +12,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "E-m:e-i64:64-n32:64-S128".to_string(), arch: "sparc64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs index b19a163455a6..071175819f41 100644 --- a/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/sparc_unknown_linux_gnu.rs @@ -12,7 +12,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "E-m:e-p:32:32-i64:64-f128:64-n32-S64".to_string(), arch: "sparc".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs b/compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs index 3fb94212c3c3..e8c30dcbf850 100644 --- a/compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs +++ b/compiler/rustc_target/src/spec/sparcv9_sun_solaris.rs @@ -17,7 +17,6 @@ pub fn target() -> Target { // differentiation from the sparc64, we could, but that would probably // just be confusing. arch: "sparc64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/thumb_base.rs b/compiler/rustc_target/src/spec/thumb_base.rs index 446e09dc7249..cc955799d2f7 100644 --- a/compiler/rustc_target/src/spec/thumb_base.rs +++ b/compiler/rustc_target/src/spec/thumb_base.rs @@ -27,12 +27,13 @@ // differentiate these targets from our other `arm(v7)-*-*-gnueabi(hf)` targets in the context of // build scripts / gcc flags. -use crate::spec::{PanicStrategy, RelocModel, TargetOptions}; +use crate::spec::{LinkerFlavor, LldFlavor, PanicStrategy, RelocModel, TargetOptions}; pub fn opts() -> TargetOptions { // See rust-lang/rfcs#1645 for a discussion about these defaults TargetOptions { target_vendor: String::new(), + linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), executables: true, // In most cases, LLD is good enough linker: Some("rust-lld".to_string()), diff --git a/compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs index a128a7a46828..d87c06d49cbc 100644 --- a/compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv4t_none_eabi.rs @@ -25,8 +25,8 @@ pub fn target() -> Target { * All other elements are default */ data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), - linker_flavor: LinkerFlavor::Ld, options: TargetOptions { + linker_flavor: LinkerFlavor::Ld, linker: Some("arm-none-eabi-ld".to_string()), linker_is_gnu: true, diff --git a/compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs index d7c9ca96105f..11c8bf463487 100644 --- a/compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv6m_none_eabi.rs @@ -1,6 +1,6 @@ // Targets the Cortex-M0, Cortex-M0+ and Cortex-M1 processors (ARMv6-M architecture) -use crate::spec::{LinkerFlavor, LldFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { Target { @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { // The ARMv6-M architecture doesn't support unaligned loads/stores so we disable them diff --git a/compiler/rustc_target/src/spec/thumbv7a_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/thumbv7a_pc_windows_msvc.rs index 538b617b9d18..8131a6e2ea44 100644 --- a/compiler/rustc_target/src/spec/thumbv7a_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/thumbv7a_pc_windows_msvc.rs @@ -26,7 +26,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:w-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Msvc, options: TargetOptions { features: "+vfp3,+neon".to_string(), diff --git a/compiler/rustc_target/src/spec/thumbv7a_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/thumbv7a_uwp_windows_msvc.rs index 1ff154fb60c5..a2c1b6bb90c9 100644 --- a/compiler/rustc_target/src/spec/thumbv7a_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/thumbv7a_uwp_windows_msvc.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, PanicStrategy, Target, TargetOptions}; +use crate::spec::{PanicStrategy, Target, TargetOptions}; pub fn target() -> Target { let mut base = super::windows_uwp_msvc_base::opts(); @@ -14,7 +14,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:w-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Msvc, options: TargetOptions { features: "+vfp3,+neon".to_string(), cpu: "generic".to_string(), diff --git a/compiler/rustc_target/src/spec/thumbv7em_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv7em_none_eabi.rs index 4769320f08f5..141eb7e78b9e 100644 --- a/compiler/rustc_target/src/spec/thumbv7em_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv7em_none_eabi.rs @@ -9,7 +9,7 @@ // To opt-in to hardware accelerated floating point operations, you can use, for example, // `-C target-feature=+vfp4` or `-C target-cpu=cortex-m4`. -use crate::spec::{LinkerFlavor, LldFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { Target { @@ -17,7 +17,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { max_atomic_width: Some(32), ..super::thumb_base::opts() }, } diff --git a/compiler/rustc_target/src/spec/thumbv7em_none_eabihf.rs b/compiler/rustc_target/src/spec/thumbv7em_none_eabihf.rs index faee53e357c8..f5bd054f8598 100644 --- a/compiler/rustc_target/src/spec/thumbv7em_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/thumbv7em_none_eabihf.rs @@ -8,7 +8,7 @@ // // To opt into double precision hardware support, use the `-C target-feature=+fp64` flag. -use crate::spec::{LinkerFlavor, LldFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { Target { @@ -16,7 +16,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { // `+vfp4` is the lowest common denominator between the Cortex-M4 (vfp4-16) and the diff --git a/compiler/rustc_target/src/spec/thumbv7m_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv7m_none_eabi.rs index c25773066e4f..7af28cd9c9f9 100644 --- a/compiler/rustc_target/src/spec/thumbv7m_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv7m_none_eabi.rs @@ -1,6 +1,6 @@ // Targets the Cortex-M3 processor (ARMv7-M) -use crate::spec::{LinkerFlavor, LldFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { Target { @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { max_atomic_width: Some(32), ..super::thumb_base::opts() }, } diff --git a/compiler/rustc_target/src/spec/thumbv7neon_linux_androideabi.rs b/compiler/rustc_target/src/spec/thumbv7neon_linux_androideabi.rs index 156582048bda..41fdbc2f0a01 100644 --- a/compiler/rustc_target/src/spec/thumbv7neon_linux_androideabi.rs +++ b/compiler/rustc_target/src/spec/thumbv7neon_linux_androideabi.rs @@ -19,7 +19,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { unsupported_abis: super::arm_base::unsupported_abis(), ..base }, } } diff --git a/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_gnueabihf.rs b/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_gnueabihf.rs index a0ae97710344..561da4d15cd6 100644 --- a/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_gnueabihf.rs +++ b/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_gnueabihf.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; // This target is for glibc Linux on ARMv7 with thumb mode enabled // (for consistency with Android and Debian-based distributions) @@ -13,7 +13,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { // Info about features at https://wiki.debian.org/ArmHardFloatPort diff --git a/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_musleabihf.rs b/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_musleabihf.rs index 68dcff02d010..5b1fc74bdd06 100644 --- a/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_musleabihf.rs +++ b/compiler/rustc_target/src/spec/thumbv7neon_unknown_linux_musleabihf.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; // This target is for musl Linux on ARMv7 with thumb mode enabled // (for consistency with Android and Debian-based distributions) @@ -16,7 +16,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Gcc, // Most of these settings are copied from the thumbv7neon_unknown_linux_gnueabihf // target. diff --git a/compiler/rustc_target/src/spec/thumbv8m_base_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv8m_base_none_eabi.rs index 7f6a41bf38cf..a2200bc64e7d 100644 --- a/compiler/rustc_target/src/spec/thumbv8m_base_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv8m_base_none_eabi.rs @@ -1,6 +1,6 @@ // Targets the Cortex-M23 processor (Baseline ARMv8-M) -use crate::spec::{LinkerFlavor, LldFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { Target { @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { // ARMv8-M baseline doesn't support unaligned loads/stores so we disable them diff --git a/compiler/rustc_target/src/spec/thumbv8m_main_none_eabi.rs b/compiler/rustc_target/src/spec/thumbv8m_main_none_eabi.rs index 98cdbb8d40d1..67cdbab4860a 100644 --- a/compiler/rustc_target/src/spec/thumbv8m_main_none_eabi.rs +++ b/compiler/rustc_target/src/spec/thumbv8m_main_none_eabi.rs @@ -1,7 +1,7 @@ // Targets the Cortex-M33 processor (Armv8-M Mainline architecture profile), // without the Floating Point extension. -use crate::spec::{LinkerFlavor, LldFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { Target { @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { max_atomic_width: Some(32), ..super::thumb_base::opts() }, } diff --git a/compiler/rustc_target/src/spec/thumbv8m_main_none_eabihf.rs b/compiler/rustc_target/src/spec/thumbv8m_main_none_eabihf.rs index d9c338767145..49748f5ec6da 100644 --- a/compiler/rustc_target/src/spec/thumbv8m_main_none_eabihf.rs +++ b/compiler/rustc_target/src/spec/thumbv8m_main_none_eabihf.rs @@ -1,7 +1,7 @@ // Targets the Cortex-M33 processor (Armv8-M Mainline architecture profile), // with the Floating Point extension. -use crate::spec::{LinkerFlavor, LldFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { Target { @@ -9,7 +9,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".to_string(), arch: "arm".to_string(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { // If the Floating Point extension is implemented in the Cortex-M33 diff --git a/compiler/rustc_target/src/spec/uefi_msvc_base.rs b/compiler/rustc_target/src/spec/uefi_msvc_base.rs index 386fed19e3fb..91a39f7b9b4e 100644 --- a/compiler/rustc_target/src/spec/uefi_msvc_base.rs +++ b/compiler/rustc_target/src/spec/uefi_msvc_base.rs @@ -38,6 +38,7 @@ pub fn opts() -> TargetOptions { TargetOptions { target_os: "uefi".to_string(), + linker_flavor: LinkerFlavor::Lld(LldFlavor::Link), disable_redzone: true, exe_suffix: ".efi".to_string(), allows_weak_linkage: false, diff --git a/compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs b/compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs index 39a36c834d30..dbafe362f2ae 100644 --- a/compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs +++ b/compiler/rustc_target/src/spec/wasm32_unknown_emscripten.rs @@ -18,6 +18,7 @@ pub fn target() -> Target { let opts = TargetOptions { target_os: "emscripten".to_string(), + linker_flavor: LinkerFlavor::Em, // emcc emits two files - a .js file to instantiate the wasm and supply platform // functionality, and a .wasm file. exe_suffix: ".js".to_string(), @@ -34,7 +35,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-i64:64-n32:64-S128".to_string(), arch: "wasm32".to_string(), - linker_flavor: LinkerFlavor::Em, options: opts, } } diff --git a/compiler/rustc_target/src/spec/wasm32_unknown_unknown.rs b/compiler/rustc_target/src/spec/wasm32_unknown_unknown.rs index e54ed661a01a..4401772788b1 100644 --- a/compiler/rustc_target/src/spec/wasm32_unknown_unknown.rs +++ b/compiler/rustc_target/src/spec/wasm32_unknown_unknown.rs @@ -16,6 +16,7 @@ pub fn target() -> Target { let mut options = wasm32_base::options(); options.target_os = "unknown".to_string(); + options.linker_flavor = LinkerFlavor::Lld(LldFlavor::Wasm); let clang_args = options.pre_link_args.get_mut(&LinkerFlavor::Gcc).unwrap(); // Make sure clang uses LLD as its linker and is configured appropriately @@ -36,7 +37,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-i64:64-n32:64-S128".to_string(), arch: "wasm32".to_string(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Wasm), options, } } diff --git a/compiler/rustc_target/src/spec/wasm32_wasi.rs b/compiler/rustc_target/src/spec/wasm32_wasi.rs index 978f3993fb4e..6f5316e30f6d 100644 --- a/compiler/rustc_target/src/spec/wasm32_wasi.rs +++ b/compiler/rustc_target/src/spec/wasm32_wasi.rs @@ -80,6 +80,7 @@ pub fn target() -> Target { options.target_os = "wasi".to_string(); options.target_vendor = String::new(); + options.linker_flavor = LinkerFlavor::Lld(LldFlavor::Wasm); options .pre_link_args .entry(LinkerFlavor::Gcc) @@ -111,7 +112,6 @@ pub fn target() -> Target { pointer_width: 32, data_layout: "e-m:e-p:32:32-i64:64-n32:64-S128".to_string(), arch: "wasm32".to_string(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Wasm), options, } } diff --git a/compiler/rustc_target/src/spec/x86_64_apple_darwin.rs b/compiler/rustc_target/src/spec/x86_64_apple_darwin.rs index 6349fafa05e5..6cd4daa7a744 100644 --- a/compiler/rustc_target/src/spec/x86_64_apple_darwin.rs +++ b/compiler/rustc_target/src/spec/x86_64_apple_darwin.rs @@ -24,7 +24,6 @@ pub fn target() -> Target { data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: arch.to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "\u{1}mcount".to_string(), ..base }, } } diff --git a/compiler/rustc_target/src/spec/x86_64_apple_ios.rs b/compiler/rustc_target/src/spec/x86_64_apple_ios.rs index 13c3c8afff43..c9c7eeb72319 100644 --- a/compiler/rustc_target/src/spec/x86_64_apple_ios.rs +++ b/compiler/rustc_target/src/spec/x86_64_apple_ios.rs @@ -1,5 +1,5 @@ use super::apple_sdk_base::{opts, Arch}; -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let base = opts("ios", Arch::X86_64); @@ -9,7 +9,6 @@ pub fn target() -> Target { data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { max_atomic_width: Some(64), stack_probes: true, ..base }, } } diff --git a/compiler/rustc_target/src/spec/x86_64_apple_ios_macabi.rs b/compiler/rustc_target/src/spec/x86_64_apple_ios_macabi.rs index 84b10ba026d7..6b360e5495be 100644 --- a/compiler/rustc_target/src/spec/x86_64_apple_ios_macabi.rs +++ b/compiler/rustc_target/src/spec/x86_64_apple_ios_macabi.rs @@ -1,5 +1,5 @@ use super::apple_sdk_base::{opts, Arch}; -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let base = opts("ios", Arch::X86_64_macabi); @@ -9,7 +9,6 @@ pub fn target() -> Target { data_layout: "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { max_atomic_width: Some(64), stack_probes: true, ..base }, } } diff --git a/compiler/rustc_target/src/spec/x86_64_apple_tvos.rs b/compiler/rustc_target/src/spec/x86_64_apple_tvos.rs index a8fc0c2826ed..5b2a62a23fd8 100644 --- a/compiler/rustc_target/src/spec/x86_64_apple_tvos.rs +++ b/compiler/rustc_target/src/spec/x86_64_apple_tvos.rs @@ -1,5 +1,5 @@ use super::apple_sdk_base::{opts, Arch}; -use crate::spec::{LinkerFlavor, Target, TargetOptions}; +use crate::spec::{Target, TargetOptions}; pub fn target() -> Target { let base = opts("tvos", Arch::X86_64); @@ -8,7 +8,6 @@ pub fn target() -> Target { pointer_width: 64, data_layout: "e-m:o-i64:64-f80:128-n8:16:32:64-S128".to_string(), arch: "x86_64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { max_atomic_width: Some(64), stack_probes: true, ..base }, } } diff --git a/compiler/rustc_target/src/spec/x86_64_fortanix_unknown_sgx.rs b/compiler/rustc_target/src/spec/x86_64_fortanix_unknown_sgx.rs index 2919910c596b..550d308ed8f7 100644 --- a/compiler/rustc_target/src/spec/x86_64_fortanix_unknown_sgx.rs +++ b/compiler/rustc_target/src/spec/x86_64_fortanix_unknown_sgx.rs @@ -58,6 +58,7 @@ pub fn target() -> Target { target_os: "unknown".into(), target_env: "sgx".into(), target_vendor: "fortanix".into(), + linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), dynamic_linking: false, executables: true, linker_is_gnu: true, @@ -83,7 +84,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .into(), arch: "x86_64".into(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: opts, } } diff --git a/compiler/rustc_target/src/spec/x86_64_fuchsia.rs b/compiler/rustc_target/src/spec/x86_64_fuchsia.rs index 673b61f86eb9..6c049c2635c7 100644 --- a/compiler/rustc_target/src/spec/x86_64_fuchsia.rs +++ b/compiler/rustc_target/src/spec/x86_64_fuchsia.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, LldFlavor, Target}; +use crate::spec::Target; pub fn target() -> Target { let mut base = super::fuchsia_base::opts(); @@ -12,7 +12,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: base, } } diff --git a/compiler/rustc_target/src/spec/x86_64_linux_android.rs b/compiler/rustc_target/src/spec/x86_64_linux_android.rs index 965802e7d32a..27327160178a 100644 --- a/compiler/rustc_target/src/spec/x86_64_linux_android.rs +++ b/compiler/rustc_target/src/spec/x86_64_linux_android.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/x86_64_linux_kernel.rs b/compiler/rustc_target/src/spec/x86_64_linux_kernel.rs index f0572931118d..43e683ddbcc8 100644 --- a/compiler/rustc_target/src/spec/x86_64_linux_kernel.rs +++ b/compiler/rustc_target/src/spec/x86_64_linux_kernel.rs @@ -20,7 +20,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } diff --git a/compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs b/compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs index 6af05b1047e2..36726ab4aeda 100644 --- a/compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/x86_64_pc_windows_gnu.rs @@ -18,7 +18,6 @@ pub fn target() -> Target { data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/x86_64_pc_windows_msvc.rs b/compiler/rustc_target/src/spec/x86_64_pc_windows_msvc.rs index f56f9e5e90a3..72bbb10323c3 100644 --- a/compiler/rustc_target/src/spec/x86_64_pc_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/x86_64_pc_windows_msvc.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target}; +use crate::spec::Target; pub fn target() -> Target { let mut base = super::windows_msvc_base::opts(); @@ -12,7 +12,6 @@ pub fn target() -> Target { data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - linker_flavor: LinkerFlavor::Msvc, options: base, } } diff --git a/compiler/rustc_target/src/spec/x86_64_rumprun_netbsd.rs b/compiler/rustc_target/src/spec/x86_64_rumprun_netbsd.rs index a93a365443b3..511a45599356 100644 --- a/compiler/rustc_target/src/spec/x86_64_rumprun_netbsd.rs +++ b/compiler/rustc_target/src/spec/x86_64_rumprun_netbsd.rs @@ -20,7 +20,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "__mcount".to_string(), ..base }, } } diff --git a/compiler/rustc_target/src/spec/x86_64_sun_solaris.rs b/compiler/rustc_target/src/spec/x86_64_sun_solaris.rs index 69f6c27a6041..6ccf78402e14 100644 --- a/compiler/rustc_target/src/spec/x86_64_sun_solaris.rs +++ b/compiler/rustc_target/src/spec/x86_64_sun_solaris.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_cloudabi.rs b/compiler/rustc_target/src/spec/x86_64_unknown_cloudabi.rs index 01fc78b389f6..cf57f4ec6246 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_cloudabi.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_cloudabi.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_dragonfly.rs b/compiler/rustc_target/src/spec/x86_64_unknown_dragonfly.rs index 3b5d12461e48..30aa2909873a 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_dragonfly.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_dragonfly.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_freebsd.rs b/compiler/rustc_target/src/spec/x86_64_unknown_freebsd.rs index 14518870b9f6..ee904d762421 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_freebsd.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_freebsd.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_haiku.rs b/compiler/rustc_target/src/spec/x86_64_unknown_haiku.rs index 9706ffb345c7..ea7e068e516a 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_haiku.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_haiku.rs @@ -15,7 +15,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_hermit.rs b/compiler/rustc_target/src/spec/x86_64_unknown_hermit.rs index 77d2cd1e434e..4005aaf58b13 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_hermit.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_hermit.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, LldFlavor, Target}; +use crate::spec::Target; pub fn target() -> Target { let mut base = super::hermit_base::opts(); @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: base, } } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_hermit_kernel.rs b/compiler/rustc_target/src/spec/x86_64_unknown_hermit_kernel.rs index d1e9ac28517f..b72d529363af 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_hermit_kernel.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_hermit_kernel.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, LldFlavor, Target}; +use crate::spec::Target; pub fn target() -> Target { let mut base = super::hermit_kernel_base::opts(); @@ -15,7 +15,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: base, } } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_illumos.rs b/compiler/rustc_target/src/spec/x86_64_unknown_illumos.rs index 73238c87ac96..d3f9349d99b8 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_illumos.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_illumos.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_l4re_uclibc.rs b/compiler/rustc_target/src/spec/x86_64_unknown_l4re_uclibc.rs index 0eeced2479c1..1fbd0bb4cec2 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_l4re_uclibc.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_l4re_uclibc.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target}; +use crate::spec::Target; pub fn target() -> Target { let mut base = super::l4re_base::opts(); @@ -11,7 +11,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - linker_flavor: LinkerFlavor::Ld, options: base, } } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs index 2423a905eb02..1f368ff16119 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnu.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnux32.rs b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnux32.rs index ef1a736c82dd..375b22fd92b9 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnux32.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_linux_gnux32.rs @@ -18,7 +18,6 @@ pub fn target() -> Target { i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_linux_musl.rs b/compiler/rustc_target/src/spec/x86_64_unknown_linux_musl.rs index eccf85deb0f2..3669c10981e1 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_linux_musl.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_linux_musl.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_netbsd.rs b/compiler/rustc_target/src/spec/x86_64_unknown_netbsd.rs index 4920b7929d99..656ef90892cb 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_netbsd.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_netbsd.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: TargetOptions { target_mcount: "__mcount".to_string(), ..base }, } } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_openbsd.rs b/compiler/rustc_target/src/spec/x86_64_unknown_openbsd.rs index 26d81128d7c5..0fe01f09c2e8 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_openbsd.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_openbsd.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_redox.rs b/compiler/rustc_target/src/spec/x86_64_unknown_redox.rs index a66c10cec149..cdd445b2614b 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_redox.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_redox.rs @@ -13,7 +13,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs b/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs index 0d7d6b79a461..b7dcce5f895c 100644 --- a/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs +++ b/compiler/rustc_target/src/spec/x86_64_unknown_uefi.rs @@ -5,7 +5,7 @@ // The win64 ABI is used. It differs from the sysv64 ABI, so we must use a windows target with // LLVM. "x86_64-unknown-windows" is used to get the minimal subset of windows-specific features. -use crate::spec::{CodeModel, LinkerFlavor, LldFlavor, Target}; +use crate::spec::{CodeModel, Target}; pub fn target() -> Target { let mut base = super::uefi_msvc_base::opts(); @@ -34,7 +34,6 @@ pub fn target() -> Target { data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Link), options: base, } diff --git a/compiler/rustc_target/src/spec/x86_64_uwp_windows_gnu.rs b/compiler/rustc_target/src/spec/x86_64_uwp_windows_gnu.rs index 2c2ca693b958..57913ba0dab6 100644 --- a/compiler/rustc_target/src/spec/x86_64_uwp_windows_gnu.rs +++ b/compiler/rustc_target/src/spec/x86_64_uwp_windows_gnu.rs @@ -17,7 +17,6 @@ pub fn target() -> Target { data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } diff --git a/compiler/rustc_target/src/spec/x86_64_uwp_windows_msvc.rs b/compiler/rustc_target/src/spec/x86_64_uwp_windows_msvc.rs index 1290b3c8e7a0..27c579ed5bc6 100644 --- a/compiler/rustc_target/src/spec/x86_64_uwp_windows_msvc.rs +++ b/compiler/rustc_target/src/spec/x86_64_uwp_windows_msvc.rs @@ -1,4 +1,4 @@ -use crate::spec::{LinkerFlavor, Target}; +use crate::spec::Target; pub fn target() -> Target { let mut base = super::windows_uwp_msvc_base::opts(); @@ -12,7 +12,6 @@ pub fn target() -> Target { data_layout: "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - linker_flavor: LinkerFlavor::Msvc, options: base, } } diff --git a/compiler/rustc_target/src/spec/x86_64_wrs_vxworks.rs b/compiler/rustc_target/src/spec/x86_64_wrs_vxworks.rs index 9339d465ad85..163af6fd8e17 100644 --- a/compiler/rustc_target/src/spec/x86_64_wrs_vxworks.rs +++ b/compiler/rustc_target/src/spec/x86_64_wrs_vxworks.rs @@ -14,7 +14,6 @@ pub fn target() -> Target { data_layout: "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" .to_string(), arch: "x86_64".to_string(), - linker_flavor: LinkerFlavor::Gcc, options: base, } } From c0c0597e099a6c6b1f3b47e839a630c5bc97aab9 Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Sat, 7 Nov 2020 14:34:44 +0300 Subject: [PATCH 7/7] Update recently added targets --- compiler/rustc_target/src/spec/mipsel_unknown_none.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/compiler/rustc_target/src/spec/mipsel_unknown_none.rs b/compiler/rustc_target/src/spec/mipsel_unknown_none.rs index 1651ff9c2d6f..60c4c3bb051c 100644 --- a/compiler/rustc_target/src/spec/mipsel_unknown_none.rs +++ b/compiler/rustc_target/src/spec/mipsel_unknown_none.rs @@ -9,17 +9,13 @@ pub fn target() -> Target { Target { llvm_target: "mipsel-unknown-none".to_string(), - target_endian: "little".to_string(), pointer_width: 32, - target_c_int_width: "32".to_string(), data_layout: "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64".to_string(), arch: "mips".to_string(), - target_os: "none".to_string(), - target_env: String::new(), - target_vendor: String::new(), - linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), options: TargetOptions { + target_vendor: String::new(), + linker_flavor: LinkerFlavor::Lld(LldFlavor::Ld), cpu: "mips32r2".to_string(), features: "+mips32r2,+soft-float,+noabicalls".to_string(), max_atomic_width: Some(32),