From 69627dbd2fceaffd5420ee83657496122cacde06 Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Thu, 22 Jul 2021 21:38:00 -0400 Subject: [PATCH] [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.) --- utils/gn/build/BUILD.gn | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/utils/gn/build/BUILD.gn b/utils/gn/build/BUILD.gn index e04a644e1d5..8df8be1ca07 100644 --- a/utils/gn/build/BUILD.gn +++ b/utils/gn/build/BUILD.gn @@ -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" ] }