Skip to content

Commit

Permalink
[gn build] Enable hwasan for aarch64 Android
Browse files Browse the repository at this point in the history
  • Loading branch information
aeubanks committed Nov 6, 2024
1 parent ff533b9 commit e449acd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
3 changes: 3 additions & 0 deletions llvm/utils/gn/secondary/compiler-rt/lib/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
13 changes: 11 additions & 2 deletions llvm/utils/gn/secondary/compiler-rt/lib/hwasan/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -140,3 +140,12 @@ 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",
]
}

0 comments on commit e449acd

Please sign in to comment.