1 import("//compiler-rt/target.gni")
3 action("version_script") {
4 script = "//compiler-rt/lib/sanitizer_common/scripts/gen_dynamic_list.py"
13 "$target_gen_dir/hwasan.vers",
18 rebase_path(sources[0], root_build_dir),
20 "$crt_current_out_dir/libclang_rt.hwasan$crt_current_target_suffix.a",
23 "$crt_current_out_dir/libclang_rt.hwasan_cxx$crt_current_target_suffix.a",
28 rebase_path(outputs[0], root_build_dir),
32 source_set("sources") {
33 configs -= [ "//llvm/utils/gn/build:llvm_code" ]
34 configs += [ "//llvm/utils/gn/build:crt_code" ]
35 defines = [ "HWASAN_WITH_INTERCEPTORS=1" ]
37 "//compiler-rt/lib/interception:sources",
38 "//compiler-rt/lib/sanitizer_common:sources",
39 "//compiler-rt/lib/ubsan:sources",
44 "hwasan_allocator.cpp",
46 "hwasan_dynamic_shadow.cpp",
47 "hwasan_dynamic_shadow.h",
48 "hwasan_exceptions.cpp",
50 "hwasan_interceptors.cpp",
51 "hwasan_interceptors_vfork.S",
52 "hwasan_interface_internal.h",
54 "hwasan_malloc_bisect.h",
56 "hwasan_memintrinsics.cpp",
57 "hwasan_poisoning.cpp",
61 "hwasan_tag_mismatch_aarch64.S",
64 "hwasan_thread_list.cpp",
65 "hwasan_thread_list.h",
69 source_set("cxx_sources") {
70 configs -= [ "//llvm/utils/gn/build:llvm_code" ]
71 configs += [ "//llvm/utils/gn/build:crt_code" ]
73 "//compiler-rt/lib/ubsan:cxx_sources",
76 "hwasan_new_delete.cpp",
80 static_library("hwasan") {
81 output_dir = crt_current_out_dir
82 output_name = "clang_rt.hwasan$crt_current_target_suffix"
83 complete_static_lib = true
85 "//llvm/utils/gn/build:llvm_code",
86 "//llvm/utils/gn/build:thin_archive",
88 configs += [ "//llvm/utils/gn/build:crt_code" ]
94 static_library("hwasan_cxx") {
95 output_dir = crt_current_out_dir
96 output_name = "clang_rt.hwasan_cxx$crt_current_target_suffix"
97 complete_static_lib = true
99 "//llvm/utils/gn/build:llvm_code",
100 "//llvm/utils/gn/build:thin_archive",
102 configs += [ "//llvm/utils/gn/build:crt_code" ]
108 shared_library("hwasan_shared") {
109 output_dir = crt_current_out_dir
110 output_name = "clang_rt.hwasan$crt_current_target_suffix"
111 configs -= [ "//llvm/utils/gn/build:llvm_code" ]
112 configs += [ "//llvm/utils/gn/build:crt_code" ]
119 "$target_gen_dir/hwasan.vers",
122 "-Wl,--version-script," + rebase_path(inputs[0], root_build_dir),