Rollup merge of #141045 - dpaoliello:noarmhazard, r=jieyouxu
[win][arm64] Remove 'Arm64 Hazard' undocumented MSVC option and instead disable problematic test PR #140758 added the undocumented `/arm64hazardfree` MSVC linker flag to work around a test failure where LLVM generated code that would trip a hazard in an outdated ARM processor. Adding this flag caused issues with LLD, as it doesn't recognize it. Rethinking the issue, using the undocumented flag seems like the incorrect solution: there's no guarantee that the flag won't be removed in the future, or change its meaning. Instead, I've disabled the problematic test for Arm64 Windows and have filed a bug with the MSVC team to have the check removed: <https://developercommunity.microsoft.com/t/Remove-checking-for-and-fixing-Cortex-A/10905134> This PR supersedes #140977 r? ```@jieyouxu```
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
use crate::spec::{FramePointer, LinkerFlavor, Lld, Target, TargetMetadata, base};
|
use crate::spec::{FramePointer, Target, TargetMetadata, base};
|
||||||
|
|
||||||
pub(crate) fn target() -> Target {
|
pub(crate) fn target() -> Target {
|
||||||
let mut base = base::windows_msvc::opts();
|
let mut base = base::windows_msvc::opts();
|
||||||
@@ -11,11 +11,6 @@ pub(crate) fn target() -> Target {
|
|||||||
// and other services. It must point to the previous {x29, x30} pair on the stack."
|
// and other services. It must point to the previous {x29, x30} pair on the stack."
|
||||||
base.frame_pointer = FramePointer::NonLeaf;
|
base.frame_pointer = FramePointer::NonLeaf;
|
||||||
|
|
||||||
// MSVC emits a warning about code that may trip "Cortex-A53 MPCore processor bug #843419" (see
|
|
||||||
// https://developer.arm.com/documentation/epm048406/latest) which is sometimes emitted by LLVM.
|
|
||||||
// Since Arm64 Windows 10+ isn't supported on that processor, it's safe to disable the warning.
|
|
||||||
base.add_pre_link_args(LinkerFlavor::Msvc(Lld::No), &["/arm64hazardfree"]);
|
|
||||||
|
|
||||||
Target {
|
Target {
|
||||||
llvm_target: "aarch64-pc-windows-msvc".into(),
|
llvm_target: "aarch64-pc-windows-msvc".into(),
|
||||||
metadata: TargetMetadata {
|
metadata: TargetMetadata {
|
||||||
|
|||||||
@@ -11,6 +11,13 @@
|
|||||||
//@ needs-dynamic-linking
|
//@ needs-dynamic-linking
|
||||||
//@ only-nightly (requires unstable rustc flag)
|
//@ only-nightly (requires unstable rustc flag)
|
||||||
|
|
||||||
|
// This test trips a check in the MSVC linker for an outdated processor:
|
||||||
|
// "LNK1322: cannot avoid potential ARM hazard (Cortex-A53 MPCore processor bug #843419)"
|
||||||
|
// Until MSVC removes this check:
|
||||||
|
// https://developercommunity.microsoft.com/t/Remove-checking-for-and-fixing-Cortex-A/10905134
|
||||||
|
// we'll need to disable this test on Arm64 Windows.
|
||||||
|
//@ ignore-aarch64-pc-windows-msvc
|
||||||
|
|
||||||
#![deny(warnings)]
|
#![deny(warnings)]
|
||||||
|
|
||||||
use run_make_support::{dynamic_lib_name, rfs, rust_lib_name, rustc};
|
use run_make_support::{dynamic_lib_name, rfs, rust_lib_name, rustc};
|
||||||
|
|||||||
Reference in New Issue
Block a user