Add warn(unreachable_pub)
to rustc_target
.
This commit is contained in:
parent
89deb3c742
commit
0fb3a509cf
@ -6,7 +6,7 @@ use crate::abi::{HasDataLayout, TyAbiInterface};
|
||||
///
|
||||
/// Corresponds to Clang's `AArch64ABIInfo::ABIKind`.
|
||||
#[derive(Copy, Clone, PartialEq)]
|
||||
pub enum AbiKind {
|
||||
pub(crate) enum AbiKind {
|
||||
AAPCS,
|
||||
DarwinPCS,
|
||||
Win64,
|
||||
@ -109,7 +109,7 @@ where
|
||||
arg.make_indirect();
|
||||
}
|
||||
|
||||
pub fn compute_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>, kind: AbiKind)
|
||||
pub(crate) fn compute_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>, kind: AbiKind)
|
||||
where
|
||||
Ty: TyAbiInterface<'a, C> + Copy,
|
||||
C: HasDataLayout,
|
||||
|
@ -17,7 +17,7 @@ where
|
||||
arg.extend_integer_width_to(32);
|
||||
}
|
||||
|
||||
pub fn compute_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>)
|
||||
pub(crate) fn compute_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>)
|
||||
where
|
||||
Ty: TyAbiInterface<'a, C> + Copy,
|
||||
C: HasDataLayout,
|
||||
|
@ -81,7 +81,7 @@ where
|
||||
arg.cast_to(Uniform::consecutive(if align <= 4 { Reg::i32() } else { Reg::i64() }, total));
|
||||
}
|
||||
|
||||
pub fn compute_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>)
|
||||
pub(crate) fn compute_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>)
|
||||
where
|
||||
Ty: TyAbiInterface<'a, C> + Copy,
|
||||
C: HasDataLayout + HasTargetSpec,
|
||||
|
@ -44,7 +44,7 @@ fn classify_arg_ty<Ty>(arg: &mut ArgAbi<'_, Ty>) {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn compute_abi_info<Ty>(fty: &mut FnAbi<'_, Ty>) {
|
||||
pub(crate) fn compute_abi_info<Ty>(fty: &mut FnAbi<'_, Ty>) {
|
||||
if !fty.ret.is_ignore() {
|
||||
classify_ret_ty(&mut fty.ret);
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ fn classify_arg<Ty>(arg: &mut ArgAbi<'_, Ty>) {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn compute_abi_info<Ty>(fn_abi: &mut FnAbi<'_, Ty>) {
|
||||
pub(crate) fn compute_abi_info<Ty>(fn_abi: &mut FnAbi<'_, Ty>) {
|
||||
if !fn_abi.ret.is_ignore() {
|
||||
classify_ret(&mut fn_abi.ret);
|
||||
}
|
||||
|
@ -47,7 +47,7 @@ fn classify_arg<Ty>(arg: &mut ArgAbi<'_, Ty>) {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn compute_abi_info<Ty>(fn_abi: &mut FnAbi<'_, Ty>) {
|
||||
pub(crate) fn compute_abi_info<Ty>(fn_abi: &mut FnAbi<'_, Ty>) {
|
||||
if !fn_abi.ret.is_ignore() {
|
||||
classify_ret(&mut fn_abi.ret);
|
||||
}
|
||||
|
@ -16,7 +16,7 @@ fn classify_arg<Ty>(arg: &mut ArgAbi<'_, Ty>) {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn compute_abi_info<Ty>(fn_abi: &mut FnAbi<'_, Ty>) {
|
||||
pub(crate) fn compute_abi_info<Ty>(fn_abi: &mut FnAbi<'_, Ty>) {
|
||||
if !fn_abi.ret.is_ignore() {
|
||||
classify_ret(&mut fn_abi.ret);
|
||||
}
|
||||
|
@ -325,7 +325,7 @@ fn extend_integer_width<Ty>(arg: &mut ArgAbi<'_, Ty>, xlen: u64) {
|
||||
arg.extend_integer_width_to(xlen);
|
||||
}
|
||||
|
||||
pub fn compute_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>)
|
||||
pub(crate) fn compute_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>)
|
||||
where
|
||||
Ty: TyAbiInterface<'a, C> + Copy,
|
||||
C: HasDataLayout + HasTargetSpec,
|
||||
|
@ -20,7 +20,7 @@ fn classify_arg<Ty>(arg: &mut ArgAbi<'_, Ty>) {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn compute_abi_info<Ty>(fn_abi: &mut FnAbi<'_, Ty>) {
|
||||
pub(crate) fn compute_abi_info<Ty>(fn_abi: &mut FnAbi<'_, Ty>) {
|
||||
if !fn_abi.ret.is_ignore() {
|
||||
classify_ret(&mut fn_abi.ret);
|
||||
}
|
||||
|
@ -35,7 +35,7 @@ where
|
||||
*offset = offset.align_to(align) + size.align_to(align);
|
||||
}
|
||||
|
||||
pub fn compute_abi_info<Ty, C>(cx: &C, fn_abi: &mut FnAbi<'_, Ty>)
|
||||
pub(crate) fn compute_abi_info<Ty, C>(cx: &C, fn_abi: &mut FnAbi<'_, Ty>)
|
||||
where
|
||||
C: HasDataLayout,
|
||||
{
|
||||
|
@ -149,7 +149,7 @@ where
|
||||
});
|
||||
}
|
||||
|
||||
pub fn compute_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>)
|
||||
pub(crate) fn compute_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>)
|
||||
where
|
||||
Ty: TyAbiInterface<'a, C> + Copy,
|
||||
C: HasDataLayout,
|
||||
|
@ -25,7 +25,7 @@ fn classify_arg<Ty>(arg: &mut ArgAbi<'_, Ty>) {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn compute_abi_info<Ty>(fn_abi: &mut FnAbi<'_, Ty>) {
|
||||
pub(crate) fn compute_abi_info<Ty>(fn_abi: &mut FnAbi<'_, Ty>) {
|
||||
if !fn_abi.ret.is_ignore() {
|
||||
classify_ret(&mut fn_abi.ret);
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
pub fn compute_abi_info<Ty>(fn_abi: &mut FnAbi<'_, Ty>) {
|
||||
pub(crate) fn compute_abi_info<Ty>(fn_abi: &mut FnAbi<'_, Ty>) {
|
||||
if !fn_abi.ret.is_ignore() {
|
||||
classify_ret(&mut fn_abi.ret);
|
||||
}
|
||||
@ -84,7 +84,7 @@ pub fn compute_abi_info<Ty>(fn_abi: &mut FnAbi<'_, Ty>) {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn compute_ptx_kernel_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>)
|
||||
pub(crate) fn compute_ptx_kernel_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>)
|
||||
where
|
||||
Ty: TyAbiInterface<'a, C> + Copy,
|
||||
C: HasDataLayout,
|
||||
|
@ -27,7 +27,7 @@ fn classify_arg<Ty>(cx: &impl HasTargetSpec, arg: &mut ArgAbi<'_, Ty>) {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn compute_abi_info<Ty>(cx: &impl HasTargetSpec, fn_abi: &mut FnAbi<'_, Ty>) {
|
||||
pub(crate) fn compute_abi_info<Ty>(cx: &impl HasTargetSpec, fn_abi: &mut FnAbi<'_, Ty>) {
|
||||
if !fn_abi.ret.is_ignore() {
|
||||
classify_ret(&mut fn_abi.ret);
|
||||
}
|
||||
|
@ -86,7 +86,7 @@ where
|
||||
};
|
||||
}
|
||||
|
||||
pub fn compute_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>)
|
||||
pub(crate) fn compute_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>)
|
||||
where
|
||||
Ty: TyAbiInterface<'a, C> + Copy,
|
||||
C: HasDataLayout + HasTargetSpec,
|
||||
|
@ -331,7 +331,7 @@ fn extend_integer_width<Ty>(arg: &mut ArgAbi<'_, Ty>, xlen: u64) {
|
||||
arg.extend_integer_width_to(xlen);
|
||||
}
|
||||
|
||||
pub fn compute_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>)
|
||||
pub(crate) fn compute_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>)
|
||||
where
|
||||
Ty: TyAbiInterface<'a, C> + Copy,
|
||||
C: HasDataLayout + HasTargetSpec,
|
||||
|
@ -54,7 +54,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
pub fn compute_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>)
|
||||
pub(crate) fn compute_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>)
|
||||
where
|
||||
Ty: TyAbiInterface<'a, C> + Copy,
|
||||
C: HasDataLayout + HasTargetSpec,
|
||||
|
@ -35,7 +35,7 @@ where
|
||||
*offset = offset.align_to(align) + size.align_to(align);
|
||||
}
|
||||
|
||||
pub fn compute_abi_info<Ty, C>(cx: &C, fn_abi: &mut FnAbi<'_, Ty>)
|
||||
pub(crate) fn compute_abi_info<Ty, C>(cx: &C, fn_abi: &mut FnAbi<'_, Ty>)
|
||||
where
|
||||
C: HasDataLayout,
|
||||
{
|
||||
|
@ -7,7 +7,7 @@ use crate::abi::{self, HasDataLayout, Scalar, Size, TyAbiInterface, TyAndLayout}
|
||||
use crate::spec::HasTargetSpec;
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
pub struct Sdata {
|
||||
struct Sdata {
|
||||
pub prefix: [Option<Reg>; 8],
|
||||
pub prefix_index: usize,
|
||||
pub last_offset: Size,
|
||||
@ -209,7 +209,7 @@ where
|
||||
arg.cast_to(Uniform::new(Reg::i64(), total));
|
||||
}
|
||||
|
||||
pub fn compute_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>)
|
||||
pub(crate) fn compute_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>)
|
||||
where
|
||||
Ty: TyAbiInterface<'a, C> + Copy,
|
||||
C: HasDataLayout + HasTargetSpec,
|
||||
|
@ -45,7 +45,7 @@ where
|
||||
}
|
||||
|
||||
/// The purpose of this ABI is to match the C ABI (aka clang) exactly.
|
||||
pub fn compute_c_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>)
|
||||
pub(crate) fn compute_c_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>)
|
||||
where
|
||||
Ty: TyAbiInterface<'a, C> + Copy,
|
||||
C: HasDataLayout,
|
||||
@ -69,7 +69,7 @@ where
|
||||
/// This ABI is *bad*! It uses `PassMode::Direct` for `abi::Aggregate` types, which leaks LLVM
|
||||
/// implementation details into the ABI. It's just hard to fix because ABIs are hard to change.
|
||||
/// Also see <https://github.com/rust-lang/rust/issues/115666>.
|
||||
pub fn compute_wasm_abi_info<Ty>(fn_abi: &mut FnAbi<'_, Ty>) {
|
||||
pub(crate) fn compute_wasm_abi_info<Ty>(fn_abi: &mut FnAbi<'_, Ty>) {
|
||||
if !fn_abi.ret.is_ignore() {
|
||||
classify_ret_wasm_abi(&mut fn_abi.ret);
|
||||
}
|
||||
|
@ -3,12 +3,12 @@ use crate::abi::{Abi, Align, HasDataLayout, TyAbiInterface, TyAndLayout};
|
||||
use crate::spec::HasTargetSpec;
|
||||
|
||||
#[derive(PartialEq)]
|
||||
pub enum Flavor {
|
||||
pub(crate) enum Flavor {
|
||||
General,
|
||||
FastcallOrVectorcall,
|
||||
}
|
||||
|
||||
pub fn compute_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>, flavor: Flavor)
|
||||
pub(crate) fn compute_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>, flavor: Flavor)
|
||||
where
|
||||
Ty: TyAbiInterface<'a, C> + Copy,
|
||||
C: HasDataLayout + HasTargetSpec,
|
||||
|
@ -170,7 +170,7 @@ fn cast_target(cls: &[Option<Class>], size: Size) -> CastTarget {
|
||||
const MAX_INT_REGS: usize = 6; // RDI, RSI, RDX, RCX, R8, R9
|
||||
const MAX_SSE_REGS: usize = 8; // XMM0-7
|
||||
|
||||
pub fn compute_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>)
|
||||
pub(crate) fn compute_abi_info<'a, Ty, C>(cx: &C, fn_abi: &mut FnAbi<'a, Ty>)
|
||||
where
|
||||
Ty: TyAbiInterface<'a, C> + Copy,
|
||||
C: HasDataLayout,
|
||||
|
@ -4,7 +4,7 @@ use crate::spec::HasTargetSpec;
|
||||
|
||||
// Win64 ABI: https://docs.microsoft.com/en-us/cpp/build/parameter-passing
|
||||
|
||||
pub fn compute_abi_info<Ty>(cx: &impl HasTargetSpec, fn_abi: &mut FnAbi<'_, Ty>) {
|
||||
pub(crate) fn compute_abi_info<Ty>(cx: &impl HasTargetSpec, fn_abi: &mut FnAbi<'_, Ty>) {
|
||||
let fixup = |a: &mut ArgAbi<'_, Ty>| {
|
||||
match a.layout.abi {
|
||||
Abi::Uninhabited | Abi::Aggregate { sized: false } => {}
|
||||
|
@ -96,7 +96,7 @@ where
|
||||
}
|
||||
}
|
||||
|
||||
pub fn compute_abi_info<'a, Ty, C>(_cx: &C, fn_abi: &mut FnAbi<'a, Ty>)
|
||||
pub(crate) fn compute_abi_info<'a, Ty, C>(_cx: &C, fn_abi: &mut FnAbi<'a, Ty>)
|
||||
where
|
||||
Ty: TyAbiInterface<'a, C> + Copy,
|
||||
C: HasDataLayout + HasTargetSpec,
|
||||
|
@ -70,7 +70,7 @@ impl AArch64InlineAsmRegClass {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn target_reserves_x18(target: &Target) -> bool {
|
||||
pub(crate) fn target_reserves_x18(target: &Target) -> bool {
|
||||
target.os == "android" || target.os == "fuchsia" || target.is_like_osx || target.is_like_windows
|
||||
}
|
||||
|
||||
|
@ -17,6 +17,7 @@
|
||||
#![feature(let_chains)]
|
||||
#![feature(rustc_attrs)]
|
||||
#![feature(rustdoc_internals)]
|
||||
#![warn(unreachable_pub)]
|
||||
// tidy-alphabetical-end
|
||||
|
||||
use std::path::{Path, PathBuf};
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::abi::Endian;
|
||||
use crate::spec::{crt_objects, cvs, Cc, CodeModel, LinkOutputKind, LinkerFlavor, TargetOptions};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
TargetOptions {
|
||||
abi: "vec-extabi".into(),
|
||||
code_model: Some(CodeModel::Small),
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{base, SanitizerSet, TargetOptions, TlsModel};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
let mut base = base::linux::opts();
|
||||
base.os = "android".into();
|
||||
base.is_like_android = true;
|
||||
|
@ -12,7 +12,7 @@ mod tests;
|
||||
use Arch::*;
|
||||
#[allow(non_camel_case_types)]
|
||||
#[derive(Copy, Clone, PartialEq)]
|
||||
pub enum Arch {
|
||||
pub(crate) enum Arch {
|
||||
Armv7k,
|
||||
Armv7s,
|
||||
Arm64,
|
||||
@ -25,7 +25,7 @@ pub enum Arch {
|
||||
}
|
||||
|
||||
impl Arch {
|
||||
pub fn target_name(self) -> &'static str {
|
||||
fn target_name(self) -> &'static str {
|
||||
match self {
|
||||
Armv7k => "armv7k",
|
||||
Armv7s => "armv7s",
|
||||
@ -39,7 +39,7 @@ impl Arch {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn target_arch(self) -> Cow<'static, str> {
|
||||
pub(crate) fn target_arch(self) -> Cow<'static, str> {
|
||||
Cow::Borrowed(match self {
|
||||
Armv7k | Armv7s => "arm",
|
||||
Arm64 | Arm64e | Arm64_32 => "aarch64",
|
||||
@ -80,7 +80,7 @@ impl Arch {
|
||||
}
|
||||
|
||||
#[derive(Copy, Clone, PartialEq)]
|
||||
pub enum TargetAbi {
|
||||
pub(crate) enum TargetAbi {
|
||||
Normal,
|
||||
Simulator,
|
||||
MacCatalyst,
|
||||
@ -142,7 +142,7 @@ fn pre_link_args(os: &'static str, arch: Arch, abi: TargetAbi) -> LinkArgs {
|
||||
args
|
||||
}
|
||||
|
||||
pub fn opts(os: &'static str, arch: Arch, abi: TargetAbi) -> TargetOptions {
|
||||
pub(crate) fn opts(os: &'static str, arch: Arch, abi: TargetAbi) -> TargetOptions {
|
||||
TargetOptions {
|
||||
abi: abi.target_abi().into(),
|
||||
os: os.into(),
|
||||
@ -279,7 +279,7 @@ fn macos_deployment_target(arch: Arch) -> (u32, u32) {
|
||||
.unwrap_or_else(|| macos_default_deployment_target(arch))
|
||||
}
|
||||
|
||||
pub fn macos_llvm_target(arch: Arch) -> String {
|
||||
pub(crate) fn macos_llvm_target(arch: Arch) -> String {
|
||||
let (major, minor) = macos_deployment_target(arch);
|
||||
format!("{}-apple-macosx{}.{}.0", arch.target_name(), major, minor)
|
||||
}
|
||||
@ -333,7 +333,7 @@ fn ios_deployment_target(arch: Arch, abi: &str) -> (u32, u32) {
|
||||
from_set_deployment_target("IPHONEOS_DEPLOYMENT_TARGET").unwrap_or((major, minor))
|
||||
}
|
||||
|
||||
pub fn ios_llvm_target(arch: Arch) -> String {
|
||||
pub(crate) fn ios_llvm_target(arch: Arch) -> String {
|
||||
// Modern iOS tooling extracts information about deployment target
|
||||
// from LC_BUILD_VERSION. This load command will only be emitted when
|
||||
// we build with a version specific `llvm_target`, with the version
|
||||
@ -344,12 +344,12 @@ pub fn ios_llvm_target(arch: Arch) -> String {
|
||||
format!("{}-apple-ios{}.{}.0", arch.target_name(), major, minor)
|
||||
}
|
||||
|
||||
pub fn mac_catalyst_llvm_target(arch: Arch) -> String {
|
||||
pub(crate) fn mac_catalyst_llvm_target(arch: Arch) -> String {
|
||||
let (major, minor) = ios_deployment_target(arch, "macabi");
|
||||
format!("{}-apple-ios{}.{}.0-macabi", arch.target_name(), major, minor)
|
||||
}
|
||||
|
||||
pub fn ios_sim_llvm_target(arch: Arch) -> String {
|
||||
pub(crate) fn ios_sim_llvm_target(arch: Arch) -> String {
|
||||
let (major, minor) = ios_deployment_target(arch, "sim");
|
||||
format!("{}-apple-ios{}.{}.0-simulator", arch.target_name(), major, minor)
|
||||
}
|
||||
@ -360,12 +360,12 @@ fn tvos_deployment_target() -> (u32, u32) {
|
||||
from_set_deployment_target("TVOS_DEPLOYMENT_TARGET").unwrap_or((10, 0))
|
||||
}
|
||||
|
||||
pub fn tvos_llvm_target(arch: Arch) -> String {
|
||||
pub(crate) fn tvos_llvm_target(arch: Arch) -> String {
|
||||
let (major, minor) = tvos_deployment_target();
|
||||
format!("{}-apple-tvos{}.{}.0", arch.target_name(), major, minor)
|
||||
}
|
||||
|
||||
pub fn tvos_sim_llvm_target(arch: Arch) -> String {
|
||||
pub(crate) fn tvos_sim_llvm_target(arch: Arch) -> String {
|
||||
let (major, minor) = tvos_deployment_target();
|
||||
format!("{}-apple-tvos{}.{}.0-simulator", arch.target_name(), major, minor)
|
||||
}
|
||||
@ -376,12 +376,12 @@ fn watchos_deployment_target() -> (u32, u32) {
|
||||
from_set_deployment_target("WATCHOS_DEPLOYMENT_TARGET").unwrap_or((5, 0))
|
||||
}
|
||||
|
||||
pub fn watchos_llvm_target(arch: Arch) -> String {
|
||||
pub(crate) fn watchos_llvm_target(arch: Arch) -> String {
|
||||
let (major, minor) = watchos_deployment_target();
|
||||
format!("{}-apple-watchos{}.{}.0", arch.target_name(), major, minor)
|
||||
}
|
||||
|
||||
pub fn watchos_sim_llvm_target(arch: Arch) -> String {
|
||||
pub(crate) fn watchos_sim_llvm_target(arch: Arch) -> String {
|
||||
let (major, minor) = watchos_deployment_target();
|
||||
format!("{}-apple-watchos{}.{}.0-simulator", arch.target_name(), major, minor)
|
||||
}
|
||||
@ -392,12 +392,12 @@ fn visionos_deployment_target() -> (u32, u32) {
|
||||
from_set_deployment_target("XROS_DEPLOYMENT_TARGET").unwrap_or((1, 0))
|
||||
}
|
||||
|
||||
pub fn visionos_llvm_target(arch: Arch) -> String {
|
||||
pub(crate) fn visionos_llvm_target(arch: Arch) -> String {
|
||||
let (major, minor) = visionos_deployment_target();
|
||||
format!("{}-apple-visionos{}.{}.0", arch.target_name(), major, minor)
|
||||
}
|
||||
|
||||
pub fn visionos_sim_llvm_target(arch: Arch) -> String {
|
||||
pub(crate) fn visionos_sim_llvm_target(arch: Arch) -> String {
|
||||
let (major, minor) = visionos_deployment_target();
|
||||
format!("{}-apple-visionos{}.{}.0-simulator", arch.target_name(), major, minor)
|
||||
}
|
||||
|
@ -6,7 +6,7 @@ use crate::spec::{Cc, LinkerFlavor, Lld, RelocModel, Target, TargetOptions};
|
||||
///
|
||||
/// Requires GNU avr-gcc and avr-binutils on the host system.
|
||||
/// FIXME: Remove the second parameter when const string concatenation is possible.
|
||||
pub fn target(target_cpu: &'static str, mmcu: &'static str) -> Target {
|
||||
pub(crate) fn target(target_cpu: &'static str, mmcu: &'static str) -> Target {
|
||||
Target {
|
||||
arch: "avr".into(),
|
||||
metadata: crate::spec::TargetMetadata {
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::abi::Endian;
|
||||
use crate::spec::{LinkerFlavor, MergeFunctions, PanicStrategy, TargetOptions};
|
||||
|
||||
pub fn opts(endian: Endian) -> TargetOptions {
|
||||
pub(crate) fn opts(endian: Endian) -> TargetOptions {
|
||||
TargetOptions {
|
||||
allow_asm: true,
|
||||
endian,
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{cvs, RelroLevel, TargetOptions};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
TargetOptions {
|
||||
os: "dragonfly".into(),
|
||||
dynamic_linking: true,
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{cvs, RelroLevel, TargetOptions};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
TargetOptions {
|
||||
os: "freebsd".into(),
|
||||
dynamic_linking: true,
|
||||
|
@ -2,7 +2,7 @@ use crate::spec::{
|
||||
crt_objects, cvs, Cc, FramePointer, LinkOutputKind, LinkerFlavor, Lld, TargetOptions,
|
||||
};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
// This mirrors the linker options provided by clang. We presume lld for
|
||||
// now. When using clang as the linker it will supply these options for us,
|
||||
// so we only list them for ld/lld.
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{cvs, RelroLevel, TargetOptions};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
TargetOptions {
|
||||
os: "haiku".into(),
|
||||
dynamic_linking: true,
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, TargetOptions, TlsModel};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
TargetOptions {
|
||||
os: "hermit".into(),
|
||||
linker: Some("rust-lld".into()),
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{cvs, RelroLevel, TargetOptions};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
TargetOptions {
|
||||
os: "hurd".into(),
|
||||
dynamic_linking: true,
|
||||
|
@ -1,5 +1,5 @@
|
||||
use crate::spec::{base, TargetOptions};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
TargetOptions { env: "gnu".into(), ..base::hurd::opts() }
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{cvs, Cc, FramePointer, LinkerFlavor, TargetOptions};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
let late_link_args = TargetOptions::link_args(
|
||||
LinkerFlavor::Unix(Cc::Yes),
|
||||
&[
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{cvs, Cc, LinkerFlavor, PanicStrategy, RelocModel, TargetOptions};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
TargetOptions {
|
||||
os: "l4re".into(),
|
||||
env: "uclibc".into(),
|
||||
|
@ -2,7 +2,7 @@ use std::borrow::Cow;
|
||||
|
||||
use crate::spec::{cvs, RelroLevel, SplitDebuginfo, TargetOptions};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
TargetOptions {
|
||||
os: "linux".into(),
|
||||
dynamic_linking: true,
|
||||
|
@ -1,5 +1,5 @@
|
||||
use crate::spec::{base, TargetOptions};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
TargetOptions { env: "gnu".into(), ..base::linux::opts() }
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{base, crt_objects, LinkSelfContainedDefault, TargetOptions};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
let mut base = base::linux::opts();
|
||||
|
||||
base.env = "musl".into();
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{base, TargetOptions, TlsModel};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
let mut base = base::linux::opts();
|
||||
|
||||
base.env = "ohos".into();
|
||||
|
@ -1,5 +1,5 @@
|
||||
use crate::spec::{base, TargetOptions};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
TargetOptions { env: "uclibc".into(), ..base::linux::opts() }
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ use std::borrow::Cow;
|
||||
|
||||
use crate::spec::{DebuginfoKind, LinkerFlavor, Lld, SplitDebuginfo, TargetOptions};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
// Suppress the verbose logo and authorship debugging output, which would needlessly
|
||||
// clog any log files.
|
||||
let pre_link_args = TargetOptions::link_args(LinkerFlavor::Msvc(Lld::No), &["/NOLOGO"]);
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{cvs, RelroLevel, TargetOptions};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
TargetOptions {
|
||||
os: "netbsd".into(),
|
||||
dynamic_linking: true,
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{cvs, RelroLevel, TargetOptions};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
TargetOptions {
|
||||
crt_static_respected: true,
|
||||
dynamic_linking: true,
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{cvs, FramePointer, RelroLevel, TargetOptions, TlsModel};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
TargetOptions {
|
||||
os: "openbsd".into(),
|
||||
dynamic_linking: true,
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{cvs, Cc, LinkerFlavor, Lld, RelroLevel, TargetOptions};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
TargetOptions {
|
||||
os: "redox".into(),
|
||||
env: "relibc".into(),
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{cvs, Cc, LinkerFlavor, TargetOptions};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
TargetOptions {
|
||||
os: "solaris".into(),
|
||||
dynamic_linking: true,
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{FramePointer, TargetOptions};
|
||||
|
||||
pub fn opts(kernel: &str) -> TargetOptions {
|
||||
pub(crate) fn opts(kernel: &str) -> TargetOptions {
|
||||
TargetOptions {
|
||||
os: format!("solid_{kernel}").into(),
|
||||
vendor: "kmc".into(),
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{add_link_args, Cc, LinkerFlavor, Lld, PanicStrategy, RelroLevel, TargetOptions};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
let lld_args = &["-zmax-page-size=4096", "-znow", "-ztext", "--execute-only"];
|
||||
let cc_args = &["-Wl,-zmax-page-size=4096", "-Wl,-znow", "-Wl,-ztext", "-mexecute-only"];
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
use crate::spec::{Cc, FramePointer, LinkerFlavor, Lld, PanicStrategy, RelocModel, TargetOptions};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
// See rust-lang/rfcs#1645 for a discussion about these defaults
|
||||
TargetOptions {
|
||||
linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
|
||||
|
@ -11,7 +11,7 @@
|
||||
|
||||
use crate::spec::{base, LinkerFlavor, Lld, PanicStrategy, StackProbeType, TargetOptions};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
let mut base = base::msvc::opts();
|
||||
|
||||
base.add_pre_link_args(
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{cvs, PanicStrategy, RelocModel, TargetOptions};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
TargetOptions {
|
||||
os: "linux".into(),
|
||||
env: "musl".into(),
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{cvs, TargetOptions};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
TargetOptions {
|
||||
os: "vxworks".into(),
|
||||
env: "gnu".into(),
|
||||
|
@ -3,7 +3,7 @@ use crate::spec::{
|
||||
TargetOptions, TlsModel,
|
||||
};
|
||||
|
||||
pub fn options() -> TargetOptions {
|
||||
pub(crate) fn options() -> TargetOptions {
|
||||
macro_rules! args {
|
||||
($prefix:literal) => {
|
||||
&[
|
||||
|
@ -5,7 +5,7 @@ use crate::spec::{
|
||||
Lld, SplitDebuginfo, TargetOptions,
|
||||
};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
let mut pre_link_args = TargetOptions::link_args(
|
||||
LinkerFlavor::Gnu(Cc::No, Lld::No),
|
||||
&[
|
||||
|
@ -2,7 +2,7 @@ use std::borrow::Cow;
|
||||
|
||||
use crate::spec::{cvs, Cc, DebuginfoKind, LinkerFlavor, Lld, SplitDebuginfo, TargetOptions};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
// We cannot use `-nodefaultlibs` because compiler-rt has to be passed
|
||||
// as a path since it's not added to linker search path by the default.
|
||||
// There were attempts to make it behave like libgcc (so one can just use -l<name>)
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{base, cvs, TargetOptions};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
let base = base::msvc::opts();
|
||||
|
||||
TargetOptions {
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{add_link_args, base, Cc, LinkArgs, LinkerFlavor, Lld, TargetOptions};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
let base = base::windows_gnu::opts();
|
||||
|
||||
// FIXME: This should be updated for the exception machinery changes from #67502
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{base, LinkerFlavor, Lld, TargetOptions};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
let mut opts = base::windows_msvc::opts();
|
||||
|
||||
opts.abi = "uwp".into();
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::abi::Endian;
|
||||
use crate::spec::{Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, TargetOptions};
|
||||
|
||||
pub fn opts() -> TargetOptions {
|
||||
pub(crate) fn opts() -> TargetOptions {
|
||||
TargetOptions {
|
||||
os: "none".into(),
|
||||
endian: Endian::Little,
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::spec::base::apple::{macos_llvm_target, opts, Arch, TargetAbi};
|
||||
use crate::spec::{FramePointer, SanitizerSet, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
let arch = Arch::Arm64;
|
||||
let mut base = opts("macos", arch, TargetAbi::Normal);
|
||||
base.cpu = "apple-m1".into();
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::spec::base::apple::{ios_llvm_target, opts, Arch, TargetAbi};
|
||||
use crate::spec::{FramePointer, SanitizerSet, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
let arch = Arch::Arm64;
|
||||
let mut base = opts("ios", arch, TargetAbi::Normal);
|
||||
base.supported_sanitizers = SanitizerSet::ADDRESS | SanitizerSet::THREAD;
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::spec::base::apple::{mac_catalyst_llvm_target, opts, Arch, TargetAbi};
|
||||
use crate::spec::{FramePointer, SanitizerSet, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
let arch = Arch::Arm64;
|
||||
let mut base = opts("ios", arch, TargetAbi::MacCatalyst);
|
||||
base.supported_sanitizers = SanitizerSet::ADDRESS | SanitizerSet::LEAK | SanitizerSet::THREAD;
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::spec::base::apple::{ios_sim_llvm_target, opts, Arch, TargetAbi};
|
||||
use crate::spec::{FramePointer, SanitizerSet, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
let arch = Arch::Arm64;
|
||||
let mut base = opts("ios", arch, TargetAbi::Simulator);
|
||||
base.supported_sanitizers = SanitizerSet::ADDRESS | SanitizerSet::THREAD;
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::spec::base::apple::{opts, tvos_llvm_target, Arch, TargetAbi};
|
||||
use crate::spec::{FramePointer, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
let arch = Arch::Arm64;
|
||||
Target {
|
||||
llvm_target: tvos_llvm_target(arch).into(),
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::spec::base::apple::{opts, tvos_sim_llvm_target, Arch, TargetAbi};
|
||||
use crate::spec::{FramePointer, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
let arch = Arch::Arm64;
|
||||
Target {
|
||||
llvm_target: tvos_sim_llvm_target(arch).into(),
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::spec::base::apple::{opts, visionos_llvm_target, Arch, TargetAbi};
|
||||
use crate::spec::{FramePointer, SanitizerSet, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
let arch = Arch::Arm64;
|
||||
let mut base = opts("visionos", arch, TargetAbi::Normal);
|
||||
base.supported_sanitizers = SanitizerSet::ADDRESS | SanitizerSet::THREAD;
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::spec::base::apple::{opts, visionos_sim_llvm_target, Arch, TargetAbi};
|
||||
use crate::spec::{FramePointer, SanitizerSet, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
let arch = Arch::Arm64;
|
||||
let mut base = opts("visionos", arch, TargetAbi::Simulator);
|
||||
base.supported_sanitizers = SanitizerSet::ADDRESS | SanitizerSet::THREAD;
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::spec::base::apple::{opts, Arch, TargetAbi};
|
||||
use crate::spec::{Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
let base = opts("watchos", Arch::Arm64, TargetAbi::Normal);
|
||||
Target {
|
||||
llvm_target: "aarch64-apple-watchos".into(),
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::spec::base::apple::{opts, watchos_sim_llvm_target, Arch, TargetAbi};
|
||||
use crate::spec::{FramePointer, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
let arch = Arch::Arm64;
|
||||
Target {
|
||||
// Clang automatically chooses a more specific target based on
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::abi::Endian;
|
||||
use crate::spec::{base, StackProbeType, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "aarch64_be-unknown-linux-gnu".into(),
|
||||
metadata: crate::spec::TargetMetadata {
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::abi::Endian;
|
||||
use crate::spec::{base, StackProbeType, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
let mut base = base::linux_gnu::opts();
|
||||
base.max_atomic_width = Some(128);
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
use crate::abi::Endian;
|
||||
use crate::spec::{base, StackProbeType, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "aarch64_be-unknown-netbsd".into(),
|
||||
metadata: crate::spec::TargetMetadata {
|
||||
|
@ -1 +1 @@
|
||||
pub use crate::spec::targets::aarch64_unknown_fuchsia::target;
|
||||
pub(crate) use crate::spec::targets::aarch64_unknown_fuchsia::target;
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{base, RelocModel, StackProbeType, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
let base = base::solid::opts("asp3");
|
||||
Target {
|
||||
llvm_target: "aarch64-unknown-none".into(),
|
||||
|
@ -3,7 +3,7 @@ use crate::spec::{base, SanitizerSet, StackProbeType, Target, TargetOptions};
|
||||
// See https://developer.android.com/ndk/guides/abis.html#arm64-v8a
|
||||
// for target ABI requirements.
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "aarch64-linux-android".into(),
|
||||
metadata: crate::spec::TargetMetadata {
|
||||
|
@ -5,7 +5,7 @@ use crate::spec::{
|
||||
const LINKER_SCRIPT: &str = include_str!("./aarch64_nintendo_switch_freestanding_linker_script.ld");
|
||||
|
||||
/// A base target for Nintendo Switch devices using a pure LLVM toolchain.
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "aarch64-unknown-none".into(),
|
||||
metadata: crate::spec::TargetMetadata {
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{base, Target};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
let mut base = base::windows_gnullvm::opts();
|
||||
base.max_atomic_width = Some(128);
|
||||
base.features = "+v8a,+neon,+fp-armv8".into();
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{base, Target};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
let mut base = base::windows_msvc::opts();
|
||||
base.max_atomic_width = Some(128);
|
||||
base.features = "+v8a,+neon,+fp-armv8".into();
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{base, SanitizerSet, StackProbeType, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "aarch64-unknown-freebsd".into(),
|
||||
metadata: crate::spec::TargetMetadata {
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{base, SanitizerSet, StackProbeType, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "aarch64-unknown-fuchsia".into(),
|
||||
metadata: crate::spec::TargetMetadata {
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{base, StackProbeType, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "aarch64-unknown-hermit".into(),
|
||||
metadata: crate::spec::TargetMetadata {
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{base, Cc, LinkerFlavor, SanitizerSet, Target};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
let mut base = base::illumos::opts();
|
||||
base.add_pre_link_args(LinkerFlavor::Unix(Cc::Yes), &["-std=c99"]);
|
||||
base.max_atomic_width = Some(128);
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{base, SanitizerSet, StackProbeType, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "aarch64-unknown-linux-gnu".into(),
|
||||
metadata: crate::spec::TargetMetadata {
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{base, StackProbeType, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "aarch64-unknown-linux-gnu_ilp32".into(),
|
||||
metadata: crate::spec::TargetMetadata {
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{base, SanitizerSet, StackProbeType, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
let mut base = base::linux_musl::opts();
|
||||
base.max_atomic_width = Some(128);
|
||||
base.supports_xray = true;
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{base, SanitizerSet, StackProbeType, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
let mut base = base::linux_ohos::opts();
|
||||
base.max_atomic_width = Some(128);
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{base, StackProbeType, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "aarch64-unknown-netbsd".into(),
|
||||
metadata: crate::spec::TargetMetadata {
|
||||
|
@ -11,7 +11,7 @@ use crate::spec::{
|
||||
TargetOptions,
|
||||
};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
let opts = TargetOptions {
|
||||
linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
|
||||
linker: Some("rust-lld".into()),
|
||||
|
@ -10,7 +10,7 @@ use crate::spec::{
|
||||
Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, StackProbeType, Target, TargetOptions,
|
||||
};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
let opts = TargetOptions {
|
||||
abi: "softfloat".into(),
|
||||
linker_flavor: LinkerFlavor::Gnu(Cc::No, Lld::Yes),
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{base, Cc, LinkerFlavor, Lld, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
// In QNX, libc does not provide a compatible ABI between versions.
|
||||
// To distinguish between QNX versions, we needed a stable conditional compilation switch,
|
||||
// which is why we needed to implement different targets in the compiler.
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::Target;
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
let mut base = super::aarch64_unknown_nto_qnx700::target();
|
||||
base.metadata.description = Some("ARM64 QNX Neutrino 7.1 RTOS".into());
|
||||
base.options.env = "nto71".into();
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{base, StackProbeType, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "aarch64-unknown-openbsd".into(),
|
||||
metadata: crate::spec::TargetMetadata {
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{base, StackProbeType, Target};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
let mut base = base::redox::opts();
|
||||
base.max_atomic_width = Some(128);
|
||||
base.stack_probes = StackProbeType::Inline;
|
||||
|
@ -1,6 +1,6 @@
|
||||
use crate::spec::{base, StackProbeType, Target};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
let mut base = base::teeos::opts();
|
||||
base.features = "+strict-align,+neon,+fp-armv8".into();
|
||||
base.max_atomic_width = Some(128);
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
use crate::spec::{LinkSelfContainedDefault, PanicStrategy, RelroLevel, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
pub(crate) fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "aarch64-unknown-unknown-musl".into(),
|
||||
metadata: crate::spec::TargetMetadata {
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user