diff options
| author | Daniel Paoliello <danpao@microsoft.com> | 2025-08-08 12:21:57 -0700 |
|---|---|---|
| committer | Daniel Paoliello <danpao@microsoft.com> | 2025-08-08 12:21:57 -0700 |
| commit | 87a09b2ad577fb6f9725dbc2e1adc5e75f783638 (patch) | |
| tree | b9f1e73567f2278dec4b769c8826e72c889202e4 | |
| parent | 2886b36df4a646dd8d82fb65bf0c9d8d96c1f71a (diff) | |
| download | rust-87a09b2ad577fb6f9725dbc2e1adc5e75f783638.tar.gz rust-87a09b2ad577fb6f9725dbc2e1adc5e75f783638.zip | |
[win][arm64ec] Add '/machine:arm64ec' when linking LLVM as Arm64EC
| -rw-r--r-- | src/bootstrap/src/core/build_steps/llvm.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bootstrap/src/core/build_steps/llvm.rs b/src/bootstrap/src/core/build_steps/llvm.rs index 721ba6ca459..79772330a6d 100644 --- a/src/bootstrap/src/core/build_steps/llvm.rs +++ b/src/bootstrap/src/core/build_steps/llvm.rs @@ -421,6 +421,13 @@ impl Step for Llvm { ldflags.shared.push(" -latomic"); } + if target.starts_with("arm64ec") { + // MSVC linker requires the -machine:arm64ec flag to be passed to + // know it's linking as Arm64EC (vs Arm64X). + ldflags.exe.push(" -machine:arm64ec"); + ldflags.shared.push(" -machine:arm64ec"); + } + if target.is_msvc() { cfg.define("CMAKE_MSVC_RUNTIME_LIBRARY", "MultiThreaded"); cfg.static_crt(true); |
