Skip to content

Commit 09fb01a

Browse files
authored
[gn build] Enable hwasan for aarch64 Android (#115219)
1 parent 1fef4ad commit 09fb01a

File tree

2 files changed

+15
-2
lines changed

2 files changed

+15
-2
lines changed

llvm/utils/gn/secondary/compiler-rt/lib/BUILD.gn

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ group("lib") {
1010
if (current_os == "linux" || current_os == "android") {
1111
deps += [ "//compiler-rt/lib/ubsan_minimal" ]
1212
}
13+
if (current_os == "android" && current_cpu == "arm64") {
14+
deps += [ "//compiler-rt/lib/hwasan" ]
15+
}
1316
if (current_os != "baremetal") {
1417
deps += [
1518
"//compiler-rt/lib/asan",

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

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ gen_version_script("version_script") {
1111
extra = "hwasan.syms.extra"
1212
output = "$target_gen_dir/hwasan.vers"
1313
libs = [
14-
":hwasan",
14+
":hwasan_static",
1515
":hwasan_cxx",
1616
]
1717
lib_names = [
@@ -88,7 +88,7 @@ source_set("cxx_sources") {
8888
sources = [ "hwasan_new_delete.cpp" ]
8989
}
9090

91-
static_library("hwasan") {
91+
static_library("hwasan_static") {
9292
output_dir = crt_current_out_dir
9393
output_name = "clang_rt.$hwasan_name$crt_current_target_suffix"
9494
complete_static_lib = true
@@ -140,3 +140,13 @@ static_library("hwasan_preinit") {
140140
configs += [ "//llvm/utils/gn/build:crt_code" ]
141141
sources = [ "hwasan_preinit.cpp" ]
142142
}
143+
144+
group("hwasan") {
145+
deps = [
146+
":hwasan_preinit",
147+
":hwasan_shared",
148+
":hwasan_static",
149+
":hwasan_cxx",
150+
":version_script",
151+
]
152+
}

0 commit comments

Comments
 (0)