forked from OSchip/llvm-project
[gn build] Allow use_asan=true on macOS
Seems to work. (I only tried macOS, not iOS, but need to allow both because the iOS toolchain used to build compiler-rt asserts otherwise.)
This commit is contained in:
parent
377320fe80
commit
4a76bd0e31
|
@ -314,8 +314,9 @@ config("compiler_defaults") {
|
|||
}
|
||||
|
||||
if (use_asan) {
|
||||
assert(is_clang && current_os == "linux",
|
||||
"asan only supported on Linux/Clang")
|
||||
assert(is_clang && (current_os == "ios" || current_os == "linux" ||
|
||||
current_os == "mac"),
|
||||
"asan only supported on iOS/Clang, Linux/Clang, and macOS/Clang")
|
||||
cflags += [ "-fsanitize=address" ]
|
||||
ldflags += [ "-fsanitize=address" ]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue