Skip to content

Commit

Permalink
Fix ASAN options for clang build
Browse files Browse the repository at this point in the history
  • Loading branch information
ksperling-apple committed Feb 27, 2024
1 parent 68c83f4 commit e288d4b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build/config/compiler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ config("cosmetic_default") {
}

config("runtime_default") {
if (is_clang) {
if (is_clang) { # Using Pigweed clang instead of Darwin host clang
configs = [
"$dir_pw_toolchain/host_clang:no_system_libcpp",
"$dir_pw_toolchain/host_clang:xcode_sysroot",
Expand Down Expand Up @@ -402,7 +402,7 @@ config("sanitize_address") {
]
ldflags = cflags

if (target_os == "mac" || target_os == "ios") {
if ((target_os == "mac" || target_os == "ios") && !is_clang) {
defines += [ "_LIBCPP_HAS_NO_ASAN" ]
}
}
Expand Down
1 change: 1 addition & 0 deletions examples/darwin-framework-tool/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ action("build-darwin-framework") {
config("config") {
include_dirs = [
".",
"include",
"${chip_root}/examples/common",
"${chip_root}/examples/darwin-framework-tool/commands/common",
"${chip_root}/zzz_generated/darwin-framework-tool",
Expand Down

0 comments on commit e288d4b

Please sign in to comment.