@@ -60,12 +60,12 @@ if (current_toolchain == host_toolchain) {
60
60
" asan_thread.h" ,
61
61
" asan_win.cpp" ,
62
62
]
63
- if (target_os != " mac" && target_os != " win" ) {
63
+ if (current_os != " mac" && current_os != " win" ) {
64
64
asan_sources += [ " asan_interceptors_vfork.S" ]
65
65
}
66
66
config (" asan_config" ) {
67
67
cflags = []
68
- if (target_os != " win" ) {
68
+ if (current_os != " win" ) {
69
69
cflags += [ " -ftls-model=initial-exec" ]
70
70
} else {
71
71
ldflags = [ " /OPT:NOICF" ]
@@ -76,11 +76,11 @@ if (current_toolchain == host_toolchain) {
76
76
# FIXME: add_sanitizer_rt_version_list (cf hwasan)
77
77
# FIXME: need libclang_rt.asan*.a.syms?
78
78
79
- if (target_os == " android" ) {
79
+ if (current_os == " android" ) {
80
80
ldflags = [ " -Wl,-z,global" ]
81
81
}
82
82
83
- if (target_os == " mac" ) {
83
+ if (current_os == " mac" ) {
84
84
# The -U flags below correspond to the add_weak_symbols() calls in CMake.
85
85
ldflags = [
86
86
" -lc++" ,
@@ -145,7 +145,7 @@ if (current_toolchain == host_toolchain) {
145
145
configs -= [ " //llvm/utils/gn/build:llvm_code" ]
146
146
configs += [ " //llvm/utils/gn/build:crt_code" ]
147
147
sources = [ " asan_rtl_static.cpp" ]
148
- if (target_os != " mac" && target_os != " win" ) {
148
+ if (current_os != " mac" && current_os != " win" ) {
149
149
sources += [ " asan_rtl_x86_64.S" ]
150
150
}
151
151
}
@@ -183,7 +183,7 @@ if (current_toolchain == host_toolchain) {
183
183
}
184
184
}
185
185
186
- if (current_os != " mac" ) {
186
+ if (current_os != " mac" && current_os != " win " ) {
187
187
static_library (" asan_static_library" ) {
188
188
output_dir = crt_current_out_dir
189
189
output_name = " clang_rt.asan$crt_current_target_suffix "
@@ -232,7 +232,8 @@ if (current_toolchain == host_toolchain) {
232
232
if (current_os == " win" ) {
233
233
static_library (" asan_static_runtime_thunk" ) {
234
234
output_dir = crt_current_out_dir
235
- output_name = " clang_rt.asan_static_runtime_thunk$crt_current_target_suffix "
235
+ output_name =
236
+ " clang_rt.asan_static_runtime_thunk$crt_current_target_suffix "
236
237
configs -= [ " //llvm/utils/gn/build:llvm_code" ]
237
238
configs += [ " //llvm/utils/gn/build:crt_code" ]
238
239
complete_static_lib = true
@@ -277,11 +278,11 @@ if (current_toolchain == host_toolchain) {
277
278
deps = [ " :asan_shared_library" ]
278
279
if (current_os == " win" ) {
279
280
deps += [
280
- " :asan_static_runtime_thunk" ,
281
281
" :asan_dynamic_runtime_thunk" ,
282
+ " :asan_static_runtime_thunk" ,
282
283
]
283
284
}
284
- if (current_os != " mac" ) {
285
+ if (current_os != " mac" && current_os != " win " ) {
285
286
deps += [
286
287
" :asan_cxx" ,
287
288
" :asan_preinit" ,
0 commit comments