[llvm] 09fb01a - [gn build] Enable hwasan for aarch64 Android (#115219)

via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 7 12:32:46 PST 2024


Author: Arthur Eubanks
Date: 2024-11-07T12:32:42-08:00
New Revision: 09fb01a5e564a0cb7c121e1cc529e9aa30d95108

URL: https://github.com/llvm/llvm-project/commit/09fb01a5e564a0cb7c121e1cc529e9aa30d95108
DIFF: https://github.com/llvm/llvm-project/commit/09fb01a5e564a0cb7c121e1cc529e9aa30d95108.diff

LOG: [gn build] Enable hwasan for aarch64 Android (#115219)

Added: 
    

Modified: 
    llvm/utils/gn/secondary/compiler-rt/lib/BUILD.gn
    llvm/utils/gn/secondary/compiler-rt/lib/hwasan/BUILD.gn

Removed: 
    


################################################################################
diff  --git a/llvm/utils/gn/secondary/compiler-rt/lib/BUILD.gn b/llvm/utils/gn/secondary/compiler-rt/lib/BUILD.gn
index 57b86f53254f57..58f76d3def3db3 100644
--- a/llvm/utils/gn/secondary/compiler-rt/lib/BUILD.gn
+++ b/llvm/utils/gn/secondary/compiler-rt/lib/BUILD.gn
@@ -10,6 +10,9 @@ group("lib") {
   if (current_os == "linux" || current_os == "android") {
     deps += [ "//compiler-rt/lib/ubsan_minimal" ]
   }
+  if (current_os == "android" && current_cpu == "arm64") {
+    deps += [ "//compiler-rt/lib/hwasan" ]
+  }
   if (current_os != "baremetal") {
     deps += [
       "//compiler-rt/lib/asan",

diff  --git a/llvm/utils/gn/secondary/compiler-rt/lib/hwasan/BUILD.gn b/llvm/utils/gn/secondary/compiler-rt/lib/hwasan/BUILD.gn
index e39d8114d1f473..0f1d3d2a50e34c 100644
--- a/llvm/utils/gn/secondary/compiler-rt/lib/hwasan/BUILD.gn
+++ b/llvm/utils/gn/secondary/compiler-rt/lib/hwasan/BUILD.gn
@@ -11,7 +11,7 @@ gen_version_script("version_script") {
   extra = "hwasan.syms.extra"
   output = "$target_gen_dir/hwasan.vers"
   libs = [
-    ":hwasan",
+    ":hwasan_static",
     ":hwasan_cxx",
   ]
   lib_names = [
@@ -88,7 +88,7 @@ source_set("cxx_sources") {
   sources = [ "hwasan_new_delete.cpp" ]
 }
 
-static_library("hwasan") {
+static_library("hwasan_static") {
   output_dir = crt_current_out_dir
   output_name = "clang_rt.$hwasan_name$crt_current_target_suffix"
   complete_static_lib = true
@@ -140,3 +140,13 @@ static_library("hwasan_preinit") {
   configs += [ "//llvm/utils/gn/build:crt_code" ]
   sources = [ "hwasan_preinit.cpp" ]
 }
+
+group("hwasan") {
+  deps = [
+    ":hwasan_preinit",
+    ":hwasan_shared",
+    ":hwasan_static",
+    ":hwasan_cxx",
+    ":version_script",
+  ]
+}


        


More information about the llvm-commits mailing list