1
Fork 0

Auto merge of #117947 - Dirbaio:drop-llvm-15, r=cuviper

Update the minimum external LLVM to 16.

With this change, we'll have stable support for LLVM 16 and 17.
For reference, the previous increase to LLVM 15 was #114148

[Relevant zulip discussion](https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler/topic/riscv.20forced-atomics)
This commit is contained in:
bors 2023-11-27 21:54:03 +00:00
commit 49b3924bd4
65 changed files with 42 additions and 251 deletions

View file

@ -1155,10 +1155,6 @@ pub enum StackProbeType {
}
impl StackProbeType {
// LLVM X86 targets (ix86 and x86_64) can use inline-asm stack probes starting with LLVM 16.
// Notable past issues were rust#83139 (fixed in 14) and rust#84667 (fixed in 16).
const X86: Self = Self::InlineOrCall { min_llvm_version_for_inline: (16, 0, 0) };
fn from_json(json: &Json) -> Result<Self, String> {
let object = json.as_object().ok_or_else(|| "expected a JSON object")?;
let kind = object

View file

@ -16,7 +16,7 @@ pub fn target() -> Target {
arch: arch.target_arch(),
options: TargetOptions {
max_atomic_width: Some(64),
stack_probes: StackProbeType::X86,
stack_probes: StackProbeType::Inline,
..opts("ios", arch)
},
}

View file

@ -16,7 +16,7 @@ pub fn target() -> Target {
&["-Vgcc_ntox86_cxx"],
),
env: "nto70".into(),
stack_probes: StackProbeType::X86,
stack_probes: StackProbeType::Inline,
..base::nto_qnx::opts()
},
}

View file

@ -7,7 +7,7 @@ pub fn target() -> Target {
let mut base = opts("macos", arch);
base.max_atomic_width = Some(64);
base.add_pre_link_args(LinkerFlavor::Darwin(Cc::Yes, Lld::No), &["-m32"]);
base.stack_probes = StackProbeType::X86;
base.stack_probes = StackProbeType::Inline;
base.frame_pointer = FramePointer::Always;
Target {

View file

@ -11,7 +11,7 @@ pub fn target() -> Target {
// https://developer.android.com/ndk/guides/abis.html#x86
base.cpu = "pentiumpro".into();
base.features = "+mmx,+sse,+sse2,+sse3,+ssse3".into();
base.stack_probes = StackProbeType::X86;
base.stack_probes = StackProbeType::Inline;
Target {
llvm_target: "i686-linux-android".into(),

View file

@ -5,7 +5,7 @@ pub fn target() -> Target {
base.cpu = "pentium4".into();
base.max_atomic_width = Some(64);
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m32", "-Wl,-znotext"]);
base.stack_probes = StackProbeType::X86;
base.stack_probes = StackProbeType::Inline;
Target {
llvm_target: "i686-unknown-freebsd".into(),

View file

@ -5,7 +5,7 @@ pub fn target() -> Target {
base.cpu = "pentium4".into();
base.max_atomic_width = Some(64);
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m32"]);
base.stack_probes = StackProbeType::X86;
base.stack_probes = StackProbeType::Inline;
Target {
llvm_target: "i686-unknown-haiku".into(),

View file

@ -6,7 +6,7 @@ pub fn target() -> Target {
base.max_atomic_width = Some(64);
base.supported_sanitizers = SanitizerSet::ADDRESS;
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m32"]);
base.stack_probes = StackProbeType::X86;
base.stack_probes = StackProbeType::Inline;
Target {
llvm_target: "i686-unknown-linux-gnu".into(),

View file

@ -5,7 +5,7 @@ pub fn target() -> Target {
base.cpu = "pentium4".into();
base.max_atomic_width = Some(64);
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m32", "-Wl,-melf_i386"]);
base.stack_probes = StackProbeType::X86;
base.stack_probes = StackProbeType::Inline;
// The unwinder used by i686-unknown-linux-musl, the LLVM libunwind
// implementation, apparently relies on frame pointers existing... somehow.

View file

@ -5,7 +5,7 @@ pub fn target() -> Target {
base.cpu = "pentium4".into();
base.max_atomic_width = Some(64);
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m32"]);
base.stack_probes = StackProbeType::X86;
base.stack_probes = StackProbeType::Inline;
Target {
llvm_target: "i686-unknown-netbsdelf".into(),

View file

@ -5,7 +5,7 @@ pub fn target() -> Target {
base.cpu = "pentium4".into();
base.max_atomic_width = Some(64);
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m32", "-fuse-ld=lld"]);
base.stack_probes = StackProbeType::X86;
base.stack_probes = StackProbeType::Inline;
Target {
llvm_target: "i686-unknown-openbsd".into(),

View file

@ -5,7 +5,7 @@ pub fn target() -> Target {
base.cpu = "pentium4".into();
base.max_atomic_width = Some(64);
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m32"]);
base.stack_probes = StackProbeType::X86;
base.stack_probes = StackProbeType::Inline;
Target {
llvm_target: "i686-unknown-linux-gnu".into(),

View file

@ -8,7 +8,7 @@ pub fn target() -> Target {
base.max_atomic_width = Some(128); // penryn+ supports cmpxchg16b
base.frame_pointer = FramePointer::Always;
base.add_pre_link_args(LinkerFlavor::Darwin(Cc::Yes, Lld::No), &["-m64"]);
base.stack_probes = StackProbeType::X86;
base.stack_probes = StackProbeType::Inline;
base.supported_sanitizers =
SanitizerSet::ADDRESS | SanitizerSet::CFI | SanitizerSet::LEAK | SanitizerSet::THREAD;

View file

@ -14,7 +14,7 @@ pub fn target() -> Target {
arch: arch.target_arch(),
options: TargetOptions {
max_atomic_width: Some(128),
stack_probes: StackProbeType::X86,
stack_probes: StackProbeType::Inline,
..base
},
}

View file

@ -17,7 +17,7 @@ pub fn target() -> Target {
arch: arch.target_arch(),
options: TargetOptions {
max_atomic_width: Some(128),
stack_probes: StackProbeType::X86,
stack_probes: StackProbeType::Inline,
..base
},
}

View file

@ -11,7 +11,7 @@ pub fn target() -> Target {
arch: arch.target_arch(),
options: TargetOptions {
max_atomic_width: Some(128),
stack_probes: StackProbeType::X86,
stack_probes: StackProbeType::Inline,
..opts("tvos", arch)
},
}

View file

@ -11,7 +11,7 @@ pub fn target() -> Target {
arch: arch.target_arch(),
options: TargetOptions {
max_atomic_width: Some(128),
stack_probes: StackProbeType::X86,
stack_probes: StackProbeType::Inline,
..opts("watchos", arch)
},
}

View file

@ -10,7 +10,7 @@ pub fn target() -> Target {
base.features = "+mmx,+sse,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+popcnt".into();
base.max_atomic_width = Some(64);
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
base.stack_probes = StackProbeType::X86;
base.stack_probes = StackProbeType::Inline;
base.supports_xray = true;
Target {

View file

@ -7,7 +7,7 @@ pub fn target() -> Target {
base.plt_by_default = false;
base.vendor = "pc".into();
base.max_atomic_width = Some(64);
base.stack_probes = StackProbeType::X86;
base.stack_probes = StackProbeType::Inline;
base.supported_sanitizers = SanitizerSet::ADDRESS | SanitizerSet::CFI | SanitizerSet::THREAD;
Target {

View file

@ -12,7 +12,7 @@ pub fn target() -> Target {
plt_by_default: false,
pre_link_args: TargetOptions::link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]),
max_atomic_width: Some(64),
stack_probes: StackProbeType::X86,
stack_probes: StackProbeType::Inline,
..base::unikraft_linux_musl::opts()
},
}

View file

@ -6,7 +6,7 @@ pub fn target() -> Target {
base.plt_by_default = false;
base.max_atomic_width = Some(64);
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
base.stack_probes = StackProbeType::X86;
base.stack_probes = StackProbeType::Inline;
Target {
llvm_target: "x86_64-unknown-dragonfly".into(),

View file

@ -6,7 +6,7 @@ pub fn target() -> Target {
base.plt_by_default = false;
base.max_atomic_width = Some(64);
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
base.stack_probes = StackProbeType::X86;
base.stack_probes = StackProbeType::Inline;
base.supported_sanitizers =
SanitizerSet::ADDRESS | SanitizerSet::CFI | SanitizerSet::MEMORY | SanitizerSet::THREAD;
base.supports_xray = true;

View file

@ -5,7 +5,7 @@ pub fn target() -> Target {
base.cpu = "x86-64".into();
base.plt_by_default = false;
base.max_atomic_width = Some(64);
base.stack_probes = StackProbeType::X86;
base.stack_probes = StackProbeType::Inline;
base.supported_sanitizers = SanitizerSet::ADDRESS | SanitizerSet::CFI;
Target {

View file

@ -6,7 +6,7 @@ pub fn target() -> Target {
base.plt_by_default = false;
base.max_atomic_width = Some(64);
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
base.stack_probes = StackProbeType::X86;
base.stack_probes = StackProbeType::Inline;
// This option is required to build executables on Haiku x86_64
base.position_independent_executables = true;

View file

@ -12,7 +12,7 @@ pub fn target() -> Target {
features: "+rdrnd,+rdseed".into(),
plt_by_default: false,
max_atomic_width: Some(64),
stack_probes: StackProbeType::X86,
stack_probes: StackProbeType::Inline,
..base::hermit::opts()
},
}

View file

@ -6,7 +6,7 @@ pub fn target() -> Target {
base.plt_by_default = false;
base.max_atomic_width = Some(64);
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
base.stack_probes = StackProbeType::X86;
base.stack_probes = StackProbeType::Inline;
base.static_position_independent_executables = true;
base.supported_sanitizers = SanitizerSet::ADDRESS
| SanitizerSet::CFI

View file

@ -6,7 +6,7 @@ pub fn target() -> Target {
base.abi = "x32".into();
base.max_atomic_width = Some(64);
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-mx32"]);
base.stack_probes = StackProbeType::X86;
base.stack_probes = StackProbeType::Inline;
base.has_thread_local = false;
// BUG(GabrielMajeri): disabling the PLT on x86_64 Linux with x32 ABI
// breaks code gen. See LLVM bug 36743

View file

@ -6,7 +6,7 @@ pub fn target() -> Target {
base.plt_by_default = false;
base.max_atomic_width = Some(64);
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
base.stack_probes = StackProbeType::X86;
base.stack_probes = StackProbeType::Inline;
base.static_position_independent_executables = true;
base.supported_sanitizers = SanitizerSet::ADDRESS
| SanitizerSet::CFI

View file

@ -5,7 +5,7 @@ pub fn target() -> Target {
base.cpu = "x86-64".into();
base.max_atomic_width = Some(64);
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
base.stack_probes = StackProbeType::X86;
base.stack_probes = StackProbeType::Inline;
base.static_position_independent_executables = true;
base.supported_sanitizers = SanitizerSet::ADDRESS
| SanitizerSet::CFI

View file

@ -8,7 +8,7 @@ pub fn target() -> Target {
base.plt_by_default = false;
base.max_atomic_width = Some(64);
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
base.stack_probes = StackProbeType::X86;
base.stack_probes = StackProbeType::Inline;
base.supported_sanitizers = SanitizerSet::ADDRESS
| SanitizerSet::CFI
| SanitizerSet::LEAK

View file

@ -12,7 +12,7 @@ pub fn target() -> Target {
cpu: "x86-64".into(),
plt_by_default: false,
max_atomic_width: Some(64),
stack_probes: StackProbeType::X86,
stack_probes: StackProbeType::Inline,
position_independent_executables: true,
static_position_independent_executables: true,
relro_level: RelroLevel::Full,

View file

@ -6,7 +6,7 @@ pub fn target() -> Target {
base.plt_by_default = false;
base.max_atomic_width = Some(64);
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
base.stack_probes = StackProbeType::X86;
base.stack_probes = StackProbeType::Inline;
base.supports_xray = true;
Target {

View file

@ -6,7 +6,7 @@ pub fn target() -> Target {
base.plt_by_default = false;
base.max_atomic_width = Some(64);
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
base.stack_probes = StackProbeType::X86;
base.stack_probes = StackProbeType::Inline;
Target {
llvm_target: "x86_64-unknown-redox".into(),

View file

@ -6,7 +6,7 @@ pub fn target() -> Target {
base.plt_by_default = false;
base.max_atomic_width = Some(64);
base.add_pre_link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-m64"]);
base.stack_probes = StackProbeType::X86;
base.stack_probes = StackProbeType::Inline;
base.disable_redzone = true;
Target {

View file

@ -8,7 +8,7 @@ pub fn target() -> Target {
base.max_atomic_width = Some(128);
base.frame_pointer = FramePointer::Always;
base.add_pre_link_args(LinkerFlavor::Darwin(Cc::Yes, Lld::No), &["-m64"]);
base.stack_probes = StackProbeType::X86;
base.stack_probes = StackProbeType::Inline;
base.supported_sanitizers =
SanitizerSet::ADDRESS | SanitizerSet::CFI | SanitizerSet::LEAK | SanitizerSet::THREAD;