[llvm] 7f41643 - [gn build] Add host_cpu=arm64 & current_os=linux => aarch64-unknown-linux-gnu

Peter Waller via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 14 02:55:14 PST 2022


Author: Peter Waller
Date: 2022-02-14T10:49:37Z
New Revision: 7f41643ef06d9e58a2addf2fdae8c0468cd437fe

URL: https://github.com/llvm/llvm-project/commit/7f41643ef06d9e58a2addf2fdae8c0468cd437fe
DIFF: https://github.com/llvm/llvm-project/commit/7f41643ef06d9e58a2addf2fdae8c0468cd437fe.diff

LOG: [gn build] Add host_cpu=arm64 & current_os=linux => aarch64-unknown-linux-gnu

I've been using this triple in development for a while without issues,
it's passing check-llvm and check-clang.

(The above is the commit message, but the build is currently broken since
D114639, I intend to submit this once it's passing again and it's accepted in
review)

Differential Revision: https://reviews.llvm.org/D119331

Added: 
    

Modified: 
    llvm/utils/gn/secondary/compiler-rt/test/BUILD.gn
    llvm/utils/gn/secondary/llvm/triples.gni

Removed: 
    


################################################################################
diff  --git a/llvm/utils/gn/secondary/compiler-rt/test/BUILD.gn b/llvm/utils/gn/secondary/compiler-rt/test/BUILD.gn
index 398d5468cb693..2adb9aea1f9f6 100644
--- a/llvm/utils/gn/secondary/compiler-rt/test/BUILD.gn
+++ b/llvm/utils/gn/secondary/compiler-rt/test/BUILD.gn
@@ -76,6 +76,8 @@ write_cmake_config("lit_common_configured") {
 
   if (host_cpu == "x64") {
     values += [ "HOST_ARCH=x86_64" ]
+  } else if (host_cpu == "arm64") {
+    values += [ "HOST_ARCH=aarch64" ]
   } else {
     assert(false, "unimplemented host_cpu " + host_cpu)
   }

diff  --git a/llvm/utils/gn/secondary/llvm/triples.gni b/llvm/utils/gn/secondary/llvm/triples.gni
index 2f6c08a45b20a..fc061650e6350 100644
--- a/llvm/utils/gn/secondary/llvm/triples.gni
+++ b/llvm/utils/gn/secondary/llvm/triples.gni
@@ -23,6 +23,8 @@ if (current_cpu == "x86") {
     llvm_current_triple = "aarch64-linux-android29"
   } else if (current_os == "ios" || current_os == "mac") {
     llvm_current_triple = "arm64-apple-darwin"
+  } else if (current_os == "linux") {
+    llvm_current_triple = "aarch64-unknown-linux-gnu"
   }
 } else if (current_cpu == "ppc64") {
   if (current_os == "linux") {


        


More information about the llvm-commits mailing list