Skip to content

Commit

Permalink
target: move base specs to spec/base
Browse files Browse the repository at this point in the history
Signed-off-by: David Wood <[email protected]>
  • Loading branch information
davidtwco committed Nov 8, 2023
1 parent 0d5ec96 commit 76aa83e
Show file tree
Hide file tree
Showing 229 changed files with 453 additions and 449 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_target/src/spec/aarch64_apple_darwin.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::apple_base::{macos_llvm_target, opts, Arch};
use crate::spec::base::apple::{macos_llvm_target, opts, Arch};
use crate::spec::{FramePointer, SanitizerSet, Target, TargetOptions};

pub fn target() -> Target {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_target/src/spec/aarch64_apple_ios.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::apple_base::{ios_llvm_target, opts, Arch};
use crate::spec::base::apple::{ios_llvm_target, opts, Arch};
use crate::spec::{FramePointer, SanitizerSet, Target, TargetOptions};

pub fn target() -> Target {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_target/src/spec/aarch64_apple_ios_macabi.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::apple_base::{opts, Arch};
use crate::spec::base::apple::{opts, Arch};
use crate::spec::{Cc, FramePointer, LinkerFlavor, Lld, SanitizerSet, Target, TargetOptions};

pub fn target() -> Target {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_target/src/spec/aarch64_apple_ios_sim.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::apple_base::{ios_sim_llvm_target, opts, Arch};
use crate::spec::base::apple::{ios_sim_llvm_target, opts, Arch};
use crate::spec::{FramePointer, SanitizerSet, Target, TargetOptions};

pub fn target() -> Target {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_target/src/spec/aarch64_apple_tvos.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::apple_base::{opts, tvos_llvm_target, Arch};
use crate::spec::base::apple::{opts, tvos_llvm_target, Arch};
use crate::spec::{FramePointer, Target, TargetOptions};

pub fn target() -> Target {
Expand Down
2 changes: 1 addition & 1 deletion compiler/rustc_target/src/spec/aarch64_apple_tvos_sim.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::apple_base::{opts, tvos_sim_llvm_target, Arch};
use crate::spec::base::apple::{opts, tvos_sim_llvm_target, Arch};
use crate::spec::{FramePointer, Target, TargetOptions};

pub fn target() -> Target {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::apple_base::{opts, watchos_sim_llvm_target, Arch};
use crate::spec::base::apple::{opts, watchos_sim_llvm_target, Arch};
use crate::spec::{FramePointer, Target, TargetOptions};

pub fn target() -> Target {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::abi::Endian;
use crate::spec::{Target, TargetOptions};
use crate::spec::{base, Target, TargetOptions};

pub fn target() -> Target {
Target {
Expand All @@ -12,7 +12,7 @@ pub fn target() -> Target {
max_atomic_width: Some(128),
mcount: "\u{1}_mcount".into(),
endian: Endian::Big,
..super::linux_gnu_base::opts()
..base::linux_gnu::opts()
},
}
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use crate::abi::Endian;
use crate::spec::{Target, TargetOptions};
use crate::spec::{base, Target, TargetOptions};

pub fn target() -> Target {
let mut base = super::linux_gnu_base::opts();
let mut base = base::linux_gnu::opts();
base.max_atomic_width = Some(128);

Target {
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_target/src/spec/aarch64_be_unknown_netbsd.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::abi::Endian;
use crate::spec::{Target, TargetOptions};
use crate::spec::{base, Target, TargetOptions};

pub fn target() -> Target {
Target {
Expand All @@ -11,7 +11,7 @@ pub fn target() -> Target {
mcount: "__mcount".into(),
max_atomic_width: Some(128),
endian: Endian::Big,
..super::netbsd_base::opts()
..base::netbsd::opts()
},
}
}
4 changes: 2 additions & 2 deletions compiler/rustc_target/src/spec/aarch64_kmc_solid_asp3.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use super::{RelocModel, Target, TargetOptions};
use super::{base, RelocModel, Target, TargetOptions};

pub fn target() -> Target {
let base = super::solid_base::opts("asp3");
let base = base::solid::opts("asp3");
Target {
llvm_target: "aarch64-unknown-none".into(),
pointer_width: 64,
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_target/src/spec/aarch64_linux_android.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::spec::{SanitizerSet, Target, TargetOptions};
use crate::spec::{base, SanitizerSet, Target, TargetOptions};

// See https://developer.android.com/ndk/guides/abis.html#arm64-v8a
// for target ABI requirements.
Expand All @@ -20,7 +20,7 @@ pub fn target() -> Target {
| SanitizerSet::SHADOWCALLSTACK
| SanitizerSet::ADDRESS,
supports_xray: true,
..super::android_base::opts()
..base::android::opts()
},
}
}
4 changes: 2 additions & 2 deletions compiler/rustc_target/src/spec/aarch64_pc_windows_gnullvm.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::spec::Target;
use crate::spec::{base, Target};

pub fn target() -> Target {
let mut base = super::windows_gnullvm_base::opts();
let mut base = base::windows_gnullvm::opts();
base.max_atomic_width = Some(128);
base.features = "+v8a,+neon,+fp-armv8".into();
base.linker = Some("aarch64-w64-mingw32-clang".into());
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_target/src/spec/aarch64_pc_windows_msvc.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::spec::Target;
use crate::spec::{base, Target};

pub fn target() -> Target {
let mut base = super::windows_msvc_base::opts();
let mut base = base::windows_msvc::opts();
base.max_atomic_width = Some(128);
base.features = "+v8a,+neon,+fp-armv8".into();

Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_target/src/spec/aarch64_unknown_freebsd.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::spec::{SanitizerSet, Target, TargetOptions};
use crate::spec::{base, SanitizerSet, Target, TargetOptions};

pub fn target() -> Target {
Target {
Expand All @@ -13,7 +13,7 @@ pub fn target() -> Target {
| SanitizerSet::CFI
| SanitizerSet::MEMORY
| SanitizerSet::THREAD,
..super::freebsd_base::opts()
..base::freebsd::opts()
},
}
}
4 changes: 2 additions & 2 deletions compiler/rustc_target/src/spec/aarch64_unknown_fuchsia.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::spec::{SanitizerSet, Target, TargetOptions};
use crate::spec::{base, SanitizerSet, Target, TargetOptions};

pub fn target() -> Target {
Target {
Expand All @@ -12,7 +12,7 @@ pub fn target() -> Target {
supported_sanitizers: SanitizerSet::ADDRESS
| SanitizerSet::CFI
| SanitizerSet::SHADOWCALLSTACK,
..super::fuchsia_base::opts()
..base::fuchsia::opts()
},
}
}
4 changes: 2 additions & 2 deletions compiler/rustc_target/src/spec/aarch64_unknown_hermit.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::spec::{Target, TargetOptions};
use crate::spec::{base, Target, TargetOptions};

pub fn target() -> Target {
Target {
Expand All @@ -9,7 +9,7 @@ pub fn target() -> Target {
options: TargetOptions {
features: "+v8a,+strict-align,+neon,+fp-armv8".into(),
max_atomic_width: Some(128),
..super::hermit_base::opts()
..base::hermit::opts()
},
}
}
4 changes: 2 additions & 2 deletions compiler/rustc_target/src/spec/aarch64_unknown_linux_gnu.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::spec::{SanitizerSet, Target, TargetOptions};
use crate::spec::{base, SanitizerSet, Target, TargetOptions};

pub fn target() -> Target {
Target {
Expand All @@ -18,7 +18,7 @@ pub fn target() -> Target {
| SanitizerSet::THREAD
| SanitizerSet::HWADDRESS,
supports_xray: true,
..super::linux_gnu_base::opts()
..base::linux_gnu::opts()
},
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::spec::{Target, TargetOptions};
use crate::spec::{base, Target, TargetOptions};

pub fn target() -> Target {
Target {
Expand All @@ -11,7 +11,7 @@ pub fn target() -> Target {
features: "+v8a,+outline-atomics".into(),
max_atomic_width: Some(128),
mcount: "\u{1}_mcount".into(),
..super::linux_gnu_base::opts()
..base::linux_gnu::opts()
},
}
}
4 changes: 2 additions & 2 deletions compiler/rustc_target/src/spec/aarch64_unknown_linux_musl.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::spec::{SanitizerSet, Target, TargetOptions};
use crate::spec::{base, SanitizerSet, Target, TargetOptions};

pub fn target() -> Target {
let mut base = super::linux_musl_base::opts();
let mut base = base::linux_musl::opts();
base.max_atomic_width = Some(128);
base.supports_xray = true;
base.features = "+v8a".into();
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_target/src/spec/aarch64_unknown_linux_ohos.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use crate::spec::{Target, TargetOptions};
use crate::spec::{base, Target, TargetOptions};

use super::SanitizerSet;

pub fn target() -> Target {
let mut base = super::linux_ohos_base::opts();
let mut base = base::linux_ohos::opts();
base.max_atomic_width = Some(128);

Target {
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_target/src/spec/aarch64_unknown_netbsd.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::spec::{Target, TargetOptions};
use crate::spec::{base, Target, TargetOptions};

pub fn target() -> Target {
Target {
Expand All @@ -10,7 +10,7 @@ pub fn target() -> Target {
features: "+v8a".into(),
mcount: "__mcount".into(),
max_atomic_width: Some(128),
..super::netbsd_base::opts()
..base::netbsd::opts()
},
}
}
5 changes: 2 additions & 3 deletions compiler/rustc_target/src/spec/aarch64_unknown_nto_qnx_710.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
use super::nto_qnx_base;
use crate::spec::{Cc, LinkerFlavor, Lld, Target, TargetOptions};
use crate::spec::{base, Cc, LinkerFlavor, Lld, Target, TargetOptions};

pub fn target() -> Target {
Target {
Expand All @@ -24,7 +23,7 @@ pub fn target() -> Target {
&["-Vgcc_ntoaarch64le_cxx"],
),
env: "nto71".into(),
..nto_qnx_base::opts()
..base::nto_qnx::opts()
},
}
}
4 changes: 2 additions & 2 deletions compiler/rustc_target/src/spec/aarch64_unknown_openbsd.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::spec::{Target, TargetOptions};
use crate::spec::{base, Target, TargetOptions};

pub fn target() -> Target {
Target {
Expand All @@ -9,7 +9,7 @@ pub fn target() -> Target {
options: TargetOptions {
features: "+v8a".into(),
max_atomic_width: Some(128),
..super::openbsd_base::opts()
..base::openbsd::opts()
},
}
}
4 changes: 2 additions & 2 deletions compiler/rustc_target/src/spec/aarch64_unknown_redox.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::spec::Target;
use crate::spec::{base, Target};

pub fn target() -> Target {
let mut base = super::redox_base::opts();
let mut base = base::redox::opts();
base.max_atomic_width = Some(128);
base.features = "+v8a".into();

Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_target/src/spec/aarch64_unknown_teeos.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::spec::Target;
use crate::spec::{base, Target};

pub fn target() -> Target {
let mut base = super::teeos_base::opts();
let mut base = base::teeos::opts();
base.features = "+strict-align,+neon,+fp-armv8".into();
base.max_atomic_width = Some(128);
base.linker = Some("aarch64-linux-gnu-ld".into());
Expand Down
5 changes: 2 additions & 3 deletions compiler/rustc_target/src/spec/aarch64_unknown_uefi.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
// This defines the aarch64 target for UEFI systems as described in the UEFI specification. See the
// uefi-base module for generic UEFI options.

use super::uefi_msvc_base;
use crate::spec::{LinkerFlavor, Lld, Target};
use crate::spec::{base, LinkerFlavor, Lld, Target};

pub fn target() -> Target {
let mut base = uefi_msvc_base::opts();
let mut base = base::uefi_msvc::opts();

base.max_atomic_width = Some(128);
base.add_pre_link_args(LinkerFlavor::Msvc(Lld::No), &["/machine:arm64"]);
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_target/src/spec/aarch64_uwp_windows_msvc.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::spec::Target;
use crate::spec::{base, Target};

pub fn target() -> Target {
let mut base = super::windows_uwp_msvc_base::opts();
let mut base = base::windows_uwp_msvc::opts();
base.max_atomic_width = Some(128);
base.features = "+v8a".into();

Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_target/src/spec/aarch64_wrs_vxworks.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::spec::{Target, TargetOptions};
use crate::spec::{base, Target, TargetOptions};

pub fn target() -> Target {
Target {
Expand All @@ -9,7 +9,7 @@ pub fn target() -> Target {
options: TargetOptions {
features: "+v8a".into(),
max_atomic_width: Some(128),
..super::vxworks_base::opts()
..base::vxworks::opts()
},
}
}
2 changes: 1 addition & 1 deletion compiler/rustc_target/src/spec/arm64_32_apple_watchos.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use super::apple_base::{opts, Arch};
use crate::spec::base::apple::{opts, Arch};
use crate::spec::{Target, TargetOptions};

pub fn target() -> Target {
Expand Down
4 changes: 2 additions & 2 deletions compiler/rustc_target/src/spec/arm_linux_androideabi.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::spec::{SanitizerSet, Target, TargetOptions};
use crate::spec::{base, SanitizerSet, Target, TargetOptions};

pub fn target() -> Target {
Target {
Expand All @@ -12,7 +12,7 @@ pub fn target() -> Target {
features: "+strict-align,+v5te".into(),
supported_sanitizers: SanitizerSet::ADDRESS,
max_atomic_width: Some(32),
..super::android_base::opts()
..base::android::opts()
},
}
}
4 changes: 2 additions & 2 deletions compiler/rustc_target/src/spec/arm_unknown_linux_gnueabi.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::spec::{Target, TargetOptions};
use crate::spec::{base, Target, TargetOptions};

pub fn target() -> Target {
Target {
Expand All @@ -12,7 +12,7 @@ pub fn target() -> Target {
max_atomic_width: Some(64),
mcount: "\u{1}__gnu_mcount_nc".into(),
llvm_mcount_intrinsic: Some("llvm.arm.gnu.eabi.mcount".into()),
..super::linux_gnu_base::opts()
..base::linux_gnu::opts()
},
}
}
4 changes: 2 additions & 2 deletions compiler/rustc_target/src/spec/arm_unknown_linux_gnueabihf.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::spec::{Target, TargetOptions};
use crate::spec::{base, Target, TargetOptions};

pub fn target() -> Target {
Target {
Expand All @@ -12,7 +12,7 @@ pub fn target() -> Target {
max_atomic_width: Some(64),
mcount: "\u{1}__gnu_mcount_nc".into(),
llvm_mcount_intrinsic: Some("llvm.arm.gnu.eabi.mcount".into()),
..super::linux_gnu_base::opts()
..base::linux_gnu::opts()
},
}
}
4 changes: 2 additions & 2 deletions compiler/rustc_target/src/spec/arm_unknown_linux_musleabi.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::spec::{Target, TargetOptions};
use crate::spec::{base, Target, TargetOptions};

pub fn target() -> Target {
Target {
Expand All @@ -16,7 +16,7 @@ pub fn target() -> Target {
features: "+strict-align,+v6".into(),
max_atomic_width: Some(64),
mcount: "\u{1}mcount".into(),
..super::linux_musl_base::opts()
..base::linux_musl::opts()
},
}
}
Loading

0 comments on commit 76aa83e

Please sign in to comment.