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

This commit is contained in:
Arthur Eubanks 2024-11-07 15:32:42 -05:00 committed by GitHub
parent 1fef4ad188
commit 09fb01a5e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 15 additions and 2 deletions

View File

@ -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",

View File

@ -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",
]
}