Skip to content

Commit 627bd41

Browse files
committed
[win][arm64] Remove 'Arm64 Hazard' undocumented MSVC option and instead disable problematic test
1 parent d163a28 commit 627bd41

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

compiler/rustc_target/src/spec/targets/aarch64_pc_windows_msvc.rs

+1-6
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use crate::spec::{FramePointer, LinkerFlavor, Lld, Target, TargetMetadata, base};
1+
use crate::spec::{FramePointer, Target, TargetMetadata, base};
22

33
pub(crate) fn target() -> Target {
44
let mut base = base::windows_msvc::opts();
@@ -11,11 +11,6 @@ pub(crate) fn target() -> Target {
1111
// and other services. It must point to the previous {x29, x30} pair on the stack."
1212
base.frame_pointer = FramePointer::NonLeaf;
1313

14-
// MSVC emits a warning about code that may trip "Cortex-A53 MPCore processor bug #843419" (see
15-
// https://developer.arm.com/documentation/epm048406/latest) which is sometimes emitted by LLVM.
16-
// Since Arm64 Windows 10+ isn't supported on that processor, it's safe to disable the warning.
17-
base.add_pre_link_args(LinkerFlavor::Msvc(Lld::No), &["/arm64hazardfree"]);
18-
1914
Target {
2015
llvm_target: "aarch64-pc-windows-msvc".into(),
2116
metadata: TargetMetadata {

tests/run-make/llvm-location-discriminator-limit-dummy-span/rmake.rs

+6
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
//@ needs-dynamic-linking
1212
//@ only-nightly (requires unstable rustc flag)
1313

14+
// This test trips a check in the MSVC linker for an outdated processor:
15+
// "LNK1322: cannot avoid potential ARM hazard (Cortex-A53 MPCore processor bug #843419)"
16+
// Until MSVC removes this check (https://developercommunity.microsoft.com/t/Remove-checking-for-and-fixing-Cortex-A/10905134)
17+
// we'll need to disable this test on Arm64 Windows.
18+
//@ ignore-aarch64-pc-windows-msvc
19+
1420
#![deny(warnings)]
1521

1622
use run_make_support::{dynamic_lib_name, rfs, rust_lib_name, rustc};

0 commit comments

Comments
 (0)