Rollup merge of #138949 - madsmtm:rename-to-darwin, r=WaffleLapkin
Rename `is_like_osx` to `is_like_darwin` Replace `is_like_osx` with `is_like_darwin`, which more closely describes reality (OS X is the pre-2016 name for macOS, and is by now quite outdated; Darwin is the overall name for the OS underlying Apple's macOS, iOS, etc.). ``@rustbot`` label O-apple r? compiler
This commit is contained in:
commit
66e61c78e7
24 changed files with 54 additions and 54 deletions
|
@ -78,7 +78,7 @@ pub(crate) fn target_reserves_x18(target: &Target, target_features: &FxIndexSet<
|
|||
target.os == "android"
|
||||
|| target.os == "fuchsia"
|
||||
|| target.env == "ohos"
|
||||
|| target.is_like_osx
|
||||
|| target.is_like_darwin
|
||||
|| target.is_like_windows
|
||||
|| target_features.contains(&sym::reserve_x18)
|
||||
}
|
||||
|
|
|
@ -68,7 +68,7 @@ impl ArmInlineAsmRegClass {
|
|||
|
||||
// This uses the same logic as useR7AsFramePointer in LLVM
|
||||
fn frame_pointer_is_r7(target_features: &FxIndexSet<Symbol>, target: &Target) -> bool {
|
||||
target.is_like_osx || (!target.is_like_windows && target_features.contains(&sym::thumb_mode))
|
||||
target.is_like_darwin || (!target.is_like_windows && target_features.contains(&sym::thumb_mode))
|
||||
}
|
||||
|
||||
fn frame_pointer_r11(
|
||||
|
|
|
@ -670,7 +670,7 @@ impl<'a, Ty> FnAbi<'a, Ty> {
|
|||
}
|
||||
},
|
||||
"aarch64" | "arm64ec" => {
|
||||
let kind = if cx.target_spec().is_like_osx {
|
||||
let kind = if cx.target_spec().is_like_darwin {
|
||||
aarch64::AbiKind::DarwinPCS
|
||||
} else if cx.target_spec().is_like_windows {
|
||||
aarch64::AbiKind::Win64
|
||||
|
|
|
@ -104,7 +104,7 @@ where
|
|||
let byval_align = if arg.layout.align.abi < align_4 {
|
||||
// (1.)
|
||||
align_4
|
||||
} else if t.is_like_osx && contains_vector(cx, arg.layout) {
|
||||
} else if t.is_like_darwin && contains_vector(cx, arg.layout) {
|
||||
// (3.)
|
||||
align_16
|
||||
} else {
|
||||
|
|
|
@ -115,7 +115,7 @@ pub(crate) fn base(
|
|||
function_sections: false,
|
||||
dynamic_linking: true,
|
||||
families: cvs!["unix"],
|
||||
is_like_osx: true,
|
||||
is_like_darwin: true,
|
||||
binary_format: BinaryFormat::MachO,
|
||||
// LLVM notes that macOS 10.11+ and iOS 9+ default
|
||||
// to v4, so we do the same.
|
||||
|
|
|
@ -598,7 +598,7 @@ impl Target {
|
|||
key!(families, target_families);
|
||||
key!(abi_return_struct_as_int, bool);
|
||||
key!(is_like_aix, bool);
|
||||
key!(is_like_osx, bool);
|
||||
key!(is_like_darwin, bool);
|
||||
key!(is_like_solaris, bool);
|
||||
key!(is_like_windows, bool);
|
||||
key!(is_like_msvc, bool);
|
||||
|
@ -777,7 +777,7 @@ impl ToJson for Target {
|
|||
target_option_val!(families, "target-family");
|
||||
target_option_val!(abi_return_struct_as_int);
|
||||
target_option_val!(is_like_aix);
|
||||
target_option_val!(is_like_osx);
|
||||
target_option_val!(is_like_darwin);
|
||||
target_option_val!(is_like_solaris);
|
||||
target_option_val!(is_like_windows);
|
||||
target_option_val!(is_like_msvc);
|
||||
|
|
|
@ -81,7 +81,7 @@ pub enum Lld {
|
|||
/// of classes that we call "linker flavors".
|
||||
///
|
||||
/// Technically, it's not even necessary, we can nearly always infer the flavor from linker name
|
||||
/// and target properties like `is_like_windows`/`is_like_osx`/etc. However, the PRs originally
|
||||
/// and target properties like `is_like_windows`/`is_like_darwin`/etc. However, the PRs originally
|
||||
/// introducing `-Clinker-flavor` (#40018 and friends) were aiming to reduce this kind of inference
|
||||
/// and provide something certain and explicitly specified instead, and that design goal is still
|
||||
/// relevant now.
|
||||
|
@ -2406,7 +2406,7 @@ pub struct TargetOptions {
|
|||
/// in particular running dsymutil and some other stuff like `-dead_strip`. Defaults to false.
|
||||
/// Also indicates whether to use Apple-specific ABI changes, such as extending function
|
||||
/// parameters to 32-bits.
|
||||
pub is_like_osx: bool,
|
||||
pub is_like_darwin: bool,
|
||||
/// Whether the target toolchain is like Solaris's.
|
||||
/// Only useful for compiling against Illumos/Solaris,
|
||||
/// as they have a different set of linker flags. Defaults to false.
|
||||
|
@ -2700,7 +2700,7 @@ fn add_link_args(link_args: &mut LinkArgs, flavor: LinkerFlavor, args: &[&'stati
|
|||
impl TargetOptions {
|
||||
pub fn supports_comdat(&self) -> bool {
|
||||
// XCOFF and MachO don't support COMDAT.
|
||||
!self.is_like_aix && !self.is_like_osx
|
||||
!self.is_like_aix && !self.is_like_darwin
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2804,7 +2804,7 @@ impl Default for TargetOptions {
|
|||
families: cvs![],
|
||||
abi_return_struct_as_int: false,
|
||||
is_like_aix: false,
|
||||
is_like_osx: false,
|
||||
is_like_darwin: false,
|
||||
is_like_solaris: false,
|
||||
is_like_windows: false,
|
||||
is_like_msvc: false,
|
||||
|
@ -3070,9 +3070,9 @@ impl Target {
|
|||
}
|
||||
|
||||
check_eq!(
|
||||
self.is_like_osx,
|
||||
self.is_like_darwin,
|
||||
self.vendor == "apple",
|
||||
"`is_like_osx` must be set if and only if `vendor` is `apple`"
|
||||
"`is_like_darwin` must be set if and only if `vendor` is `apple`"
|
||||
);
|
||||
check_eq!(
|
||||
self.is_like_solaris,
|
||||
|
@ -3098,9 +3098,9 @@ impl Target {
|
|||
|
||||
// Check that default linker flavor is compatible with some other key properties.
|
||||
check_eq!(
|
||||
self.is_like_osx,
|
||||
self.is_like_darwin,
|
||||
matches!(self.linker_flavor, LinkerFlavor::Darwin(..)),
|
||||
"`linker_flavor` must be `darwin` if and only if `is_like_osx` is set"
|
||||
"`linker_flavor` must be `darwin` if and only if `is_like_darwin` is set"
|
||||
);
|
||||
check_eq!(
|
||||
self.is_like_msvc,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue