Skip to content

Commit 4c9f82c

Browse files
committed
Don't try to build out-of-line aarch64 atomics with the msvc toolchain
The msvc toolchain does not support building `.s` files, clang only supports generating out-of-line atomics on Linux and gcc does not support aarch64 for Windows at all. Therefore, we don't need to compile `lse.s` on `aarch64-pc-windows-msvc`.
1 parent 0a3bd80 commit 4c9f82c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

build.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,8 +491,9 @@ mod c {
491491

492492
// Include out-of-line atomics for aarch64, which are all generated by supplying different
493493
// sets of flags to the same source file.
494+
// Note: Out-of-line aarch64 atomics are not supported by the msvc toolchain (#430).
494495
let src_dir = root.join("lib/builtins");
495-
if target_arch == "aarch64" {
496+
if target_arch == "aarch64" && target_env != "msvc" {
496497
let atomics_libs = build_aarch64_out_of_line_atomics_libraries(&src_dir, cfg);
497498
if !atomics_libs.is_empty() {
498499
for library in atomics_libs {

0 commit comments

Comments
 (0)