Skip to content

Commit 55429e2

Browse files
committed
Auto merge of rust-lang#140977 - dpaoliello:dash, r=jieyouxu
[win] Use a dash instead of slash for linker to avoid breaking lld rust-lang#140758 added the `/arm64hazardfree` linker arg for aarch64-pc-windows-msvc, unfortunately this breaks linking with `lld` as it 1) doesn't understand the arguments and 2) assumes that unknown args that start with `/` are input files. Fix is to use a dash for the arg: `-arm64hazardfree` r? `@wesleywiser`
2 parents 414482f + a1ea0ce commit 55429e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pub(crate) fn target() -> Target {
1414
// MSVC emits a warning about code that may trip "Cortex-A53 MPCore processor bug #843419" (see
1515
// https://developer.arm.com/documentation/epm048406/latest) which is sometimes emitted by LLVM.
1616
// 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"]);
17+
base.add_pre_link_args(LinkerFlavor::Msvc(Lld::No), &["-arm64hazardfree"]);
1818

1919
Target {
2020
llvm_target: "aarch64-pc-windows-msvc".into(),

0 commit comments

Comments
 (0)