| 1 |
source_set("sources") { |
| 2 |
configs -= [ "//llvm/utils/gn/build:llvm_code" ] |
| 3 |
configs += [ "//llvm/utils/gn/build:crt_code" ] |
| 4 |
deps = [ "//llvm/utils/gn/build/libs/pthread" ] |
| 5 |
libs = [] |
| 6 |
if (current_os == "linux" || current_os == "android") { |
| 7 |
libs += [ "dl" ] |
| 8 |
} |
| 9 |
if (current_os == "linux") { |
| 10 |
libs += [ "rt" ] |
| 11 |
} |
| 12 |
sources = [ |
| 13 |
"sancov_flags.cpp", |
| 14 |
"sancov_flags.h", |
| 15 |
"sanitizer_addrhashmap.h", |
| 16 |
"sanitizer_allocator.cpp", |
| 17 |
"sanitizer_allocator.h", |
| 18 |
"sanitizer_allocator_checks.cpp", |
| 19 |
"sanitizer_allocator_checks.h", |
| 20 |
"sanitizer_allocator_combined.h", |
| 21 |
"sanitizer_allocator_dlsym.h", |
| 22 |
"sanitizer_allocator_interface.h", |
| 23 |
"sanitizer_allocator_internal.h", |
| 24 |
"sanitizer_allocator_local_cache.h", |
| 25 |
"sanitizer_allocator_primary32.h", |
| 26 |
"sanitizer_allocator_primary64.h", |
| 27 |
"sanitizer_allocator_report.cpp", |
| 28 |
"sanitizer_allocator_report.h", |
| 29 |
"sanitizer_allocator_secondary.h", |
| 30 |
"sanitizer_allocator_size_class_map.h", |
| 31 |
"sanitizer_allocator_stats.h", |
| 32 |
"sanitizer_array_ref.h", |
| 33 |
"sanitizer_asm.h", |
| 34 |
"sanitizer_atomic.h", |
| 35 |
"sanitizer_atomic_clang.h", |
| 36 |
"sanitizer_atomic_msvc.h", |
| 37 |
"sanitizer_bitvector.h", |
| 38 |
"sanitizer_bvgraph.h", |
| 39 |
"sanitizer_chained_origin_depot.cpp", |
| 40 |
"sanitizer_chained_origin_depot.h", |
| 41 |
"sanitizer_common.cpp", |
| 42 |
"sanitizer_common.h", |
| 43 |
"sanitizer_common_libcdep.cpp", |
| 44 |
"sanitizer_coverage_fuchsia.cpp", |
| 45 |
"sanitizer_coverage_libcdep_new.cpp", |
| 46 |
"sanitizer_coverage_win_sections.cpp", |
| 47 |
"sanitizer_dbghelp.h", |
| 48 |
"sanitizer_deadlock_detector.h", |
| 49 |
"sanitizer_deadlock_detector1.cpp", |
| 50 |
"sanitizer_deadlock_detector2.cpp", |
| 51 |
"sanitizer_deadlock_detector_interface.h", |
| 52 |
"sanitizer_dense_map.h", |
| 53 |
"sanitizer_dense_map_info.h", |
| 54 |
"sanitizer_dl.cpp", |
| 55 |
"sanitizer_dl.h", |
| 56 |
"sanitizer_errno.cpp", |
| 57 |
"sanitizer_errno.h", |
| 58 |
"sanitizer_errno_codes.h", |
| 59 |
"sanitizer_file.cpp", |
| 60 |
"sanitizer_file.h", |
| 61 |
"sanitizer_flag_parser.cpp", |
| 62 |
"sanitizer_flag_parser.h", |
| 63 |
"sanitizer_flags.cpp", |
| 64 |
"sanitizer_flags.h", |
| 65 |
"sanitizer_flat_map.h", |
| 66 |
"sanitizer_fuchsia.cpp", |
| 67 |
"sanitizer_fuchsia.h", |
| 68 |
"sanitizer_getauxval.h", |
| 69 |
"sanitizer_haiku.cpp", |
| 70 |
"sanitizer_hash.h", |
| 71 |
"sanitizer_interface_internal.h", |
| 72 |
"sanitizer_internal_defs.h", |
| 73 |
"sanitizer_leb128.h", |
| 74 |
"sanitizer_lfstack.h", |
| 75 |
"sanitizer_libc.cpp", |
| 76 |
"sanitizer_libc.h", |
| 77 |
"sanitizer_libignore.cpp", |
| 78 |
"sanitizer_libignore.h", |
| 79 |
"sanitizer_linux.cpp", |
| 80 |
"sanitizer_linux.h", |
| 81 |
"sanitizer_linux_libcdep.cpp", |
| 82 |
"sanitizer_linux_s390.cpp", |
| 83 |
"sanitizer_list.h", |
| 84 |
"sanitizer_local_address_space_view.h", |
| 85 |
"sanitizer_lzw.h", |
| 86 |
"sanitizer_mac.cpp", |
| 87 |
"sanitizer_mac.h", |
| 88 |
"sanitizer_mac_libcdep.cpp", |
| 89 |
"sanitizer_mutex.cpp", |
| 90 |
"sanitizer_mutex.h", |
| 91 |
"sanitizer_netbsd.cpp", |
| 92 |
"sanitizer_placement_new.h", |
| 93 |
"sanitizer_platform.h", |
| 94 |
"sanitizer_platform_interceptors.h", |
| 95 |
"sanitizer_platform_limits_freebsd.cpp", |
| 96 |
"sanitizer_platform_limits_linux.cpp", |
| 97 |
"sanitizer_platform_limits_netbsd.cpp", |
| 98 |
"sanitizer_platform_limits_netbsd.h", |
| 99 |
"sanitizer_platform_limits_posix.cpp", |
| 100 |
"sanitizer_platform_limits_posix.h", |
| 101 |
"sanitizer_platform_limits_solaris.cpp", |
| 102 |
"sanitizer_platform_limits_solaris.h", |
| 103 |
"sanitizer_posix.cpp", |
| 104 |
"sanitizer_posix.h", |
| 105 |
"sanitizer_posix_libcdep.cpp", |
| 106 |
"sanitizer_printf.cpp", |
| 107 |
"sanitizer_procmaps.h", |
| 108 |
"sanitizer_procmaps_bsd.cpp", |
| 109 |
"sanitizer_procmaps_common.cpp", |
| 110 |
"sanitizer_procmaps_fuchsia.cpp", |
| 111 |
"sanitizer_procmaps_haiku.cpp", |
| 112 |
"sanitizer_procmaps_linux.cpp", |
| 113 |
"sanitizer_procmaps_mac.cpp", |
| 114 |
"sanitizer_procmaps_solaris.cpp", |
| 115 |
"sanitizer_ptrauth.h", |
| 116 |
"sanitizer_quarantine.h", |
| 117 |
"sanitizer_range.cpp", |
| 118 |
"sanitizer_range.h", |
| 119 |
"sanitizer_redefine_builtins.h", |
| 120 |
"sanitizer_report_decorator.h", |
| 121 |
"sanitizer_ring_buffer.h", |
| 122 |
"sanitizer_solaris.cpp", |
| 123 |
"sanitizer_stack_store.cpp", |
| 124 |
"sanitizer_stack_store.h", |
| 125 |
"sanitizer_stackdepot.cpp", |
| 126 |
"sanitizer_stackdepot.h", |
| 127 |
"sanitizer_stackdepotbase.h", |
| 128 |
"sanitizer_stacktrace.cpp", |
| 129 |
"sanitizer_stacktrace.h", |
| 130 |
"sanitizer_stacktrace_libcdep.cpp", |
| 131 |
"sanitizer_stacktrace_printer.cpp", |
| 132 |
"sanitizer_stacktrace_printer.h", |
| 133 |
"sanitizer_stacktrace_sparc.cpp", |
| 134 |
"sanitizer_stoptheworld.h", |
| 135 |
"sanitizer_stoptheworld_fuchsia.cpp", |
| 136 |
"sanitizer_stoptheworld_linux_libcdep.cpp", |
| 137 |
"sanitizer_stoptheworld_mac.cpp", |
| 138 |
"sanitizer_stoptheworld_netbsd_libcdep.cpp", |
| 139 |
"sanitizer_stoptheworld_win.cpp", |
| 140 |
"sanitizer_suppressions.cpp", |
| 141 |
"sanitizer_suppressions.h", |
| 142 |
"sanitizer_symbolizer.cpp", |
| 143 |
"sanitizer_symbolizer.h", |
| 144 |
"sanitizer_symbolizer_internal.h", |
| 145 |
"sanitizer_symbolizer_libbacktrace.cpp", |
| 146 |
"sanitizer_symbolizer_libbacktrace.h", |
| 147 |
"sanitizer_symbolizer_libcdep.cpp", |
| 148 |
"sanitizer_symbolizer_mac.cpp", |
| 149 |
"sanitizer_symbolizer_mac.h", |
| 150 |
"sanitizer_symbolizer_markup.cpp", |
| 151 |
"sanitizer_symbolizer_markup.h", |
| 152 |
"sanitizer_symbolizer_markup_constants.h", |
| 153 |
"sanitizer_symbolizer_markup_fuchsia.cpp", |
| 154 |
"sanitizer_symbolizer_posix_libcdep.cpp", |
| 155 |
"sanitizer_symbolizer_report.cpp", |
| 156 |
"sanitizer_symbolizer_report_fuchsia.cpp", |
| 157 |
"sanitizer_symbolizer_win.cpp", |
| 158 |
"sanitizer_termination.cpp", |
| 159 |
"sanitizer_thread_arg_retval.cpp", |
| 160 |
"sanitizer_thread_history.cpp", |
| 161 |
"sanitizer_thread_registry.cpp", |
| 162 |
"sanitizer_thread_registry.h", |
| 163 |
"sanitizer_thread_safety.h", |
| 164 |
"sanitizer_tls_get_addr.cpp", |
| 165 |
"sanitizer_tls_get_addr.h", |
| 166 |
"sanitizer_type_traits.cpp", |
| 167 |
"sanitizer_unwind_fuchsia.cpp", |
| 168 |
"sanitizer_unwind_linux_libcdep.cpp", |
| 169 |
"sanitizer_unwind_win.cpp", |
| 170 |
"sanitizer_vector.h", |
| 171 |
"sanitizer_win.cpp", |
| 172 |
"sanitizer_win.h", |
| 173 |
"sanitizer_win_defs.h", |
| 174 |
"sanitizer_win_interception.cpp", |
| 175 |
"sanitizer_win_interception.h", |
| 176 |
"sanitizer_win_thunk_interception.h", |
| 177 |
] |
| 178 |
} |
| 179 |
|
| 180 |
source_set("runtime_thunk") { |
| 181 |
configs -= [ "//llvm/utils/gn/build:llvm_code" ] |
| 182 |
configs += [ "//llvm/utils/gn/build:crt_code" ] |
| 183 |
sources = [ "sanitizer_win_thunk_interception.cpp" ] |
| 184 |
defines = [ |
| 185 |
"SANITIZER_DYNAMIC_RUNTIME_THUNK", |
| 186 |
"SANITIZER_STATIC_RUNTIME_THUNK", |
| 187 |
] |
| 188 |
cflags = [] |
| 189 |
if (current_os == "win") { |
| 190 |
cflags += [ "-Zl" ] |
| 191 |
} |
| 192 |
} |
| 193 |
|
| 194 |
source_set("sancov_runtime_thunk") { |
| 195 |
configs -= [ "//llvm/utils/gn/build:llvm_code" ] |
| 196 |
configs += [ "//llvm/utils/gn/build:crt_code" ] |
| 197 |
sources = [ |
| 198 |
"sanitizer_coverage_win_runtime_thunk.cpp", |
| 199 |
"sanitizer_coverage_win_sections.cpp", |
| 200 |
] |
| 201 |
defines = [ |
| 202 |
"SANITIZER_DYNAMIC_RUNTIME_THUNK", |
| 203 |
"SANITIZER_STATIC_RUNTIME_THUNK", |
| 204 |
] |
| 205 |
cflags = [] |
| 206 |
if (current_os == "win") { |
| 207 |
cflags += [ "-Zl" ] |
| 208 |
} |
| 209 |
} |
| 210 |
|
| 211 |
# Libc functions stubs. These sources should be linked instead of |
| 212 |
# SANITIZER_LIBCDEP_SOURCES when sanitizer_common library must not depend on |
| 213 |
# libc. This is currently unreferenced and exists to make |
| 214 |
# sync_source_lists_from_cmake happy. |
| 215 |
source_set("nolibc_sources") { |
| 216 |
configs -= [ "//llvm/utils/gn/build:llvm_code" ] |
| 217 |
configs += [ "//llvm/utils/gn/build:crt_code" ] |
| 218 |
deps = [ "//llvm/utils/gn/build/libs/pthread" ] |
| 219 |
sources = [ "sanitizer_common_nolibc.cpp" ] |
| 220 |
} |