Эх сурвалжийг харах

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`.
Wesley Wiser 3 жил өмнө
parent
commit
c03b91ff99
1 өөрчлөгдсөн 2 нэмэгдсэн , 1 устгасан
  1. 2 1
      build.rs

+ 2 - 1
build.rs

@@ -491,8 +491,9 @@ mod c {
 
         // Include out-of-line atomics for aarch64, which are all generated by supplying different
         // sets of flags to the same source file.
+        // Note: Out-of-line aarch64 atomics are not supported by the msvc toolchain (#430).
         let src_dir = root.join("lib/builtins");
-        if target_arch == "aarch64" {
+        if target_arch == "aarch64" && target_env != "msvc" {
             // See below for why we're building these as separate libraries.
             build_aarch64_out_of_line_atomics_libraries(&src_dir, cfg);