Skip to content

Commit 87a09b2

Browse files
committed
[win][arm64ec] Add '/machine:arm64ec' when linking LLVM as Arm64EC
1 parent 2886b36 commit 87a09b2

File tree

1 file changed

+7
-0
lines changed
  • src/bootstrap/src/core/build_steps

1 file changed

+7
-0
lines changed

src/bootstrap/src/core/build_steps/llvm.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,13 @@ impl Step for Llvm {
421421
ldflags.shared.push(" -latomic");
422422
}
423423

424+
if target.starts_with("arm64ec") {
425+
// MSVC linker requires the -machine:arm64ec flag to be passed to
426+
// know it's linking as Arm64EC (vs Arm64X).
427+
ldflags.exe.push(" -machine:arm64ec");
428+
ldflags.shared.push(" -machine:arm64ec");
429+
}
430+
424431
if target.is_msvc() {
425432
cfg.define("CMAKE_MSVC_RUNTIME_LIBRARY", "MultiThreaded");
426433
cfg.static_crt(true);

0 commit comments

Comments
 (0)