Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make "./gn_build.sh is_asan=true" work by default on Mac. #21308

Merged
merged 1 commit into from
Jul 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -384,14 +384,10 @@ jobs:
# (similar to what examples-linux-standalone.yaml
# does), so use target_os="all" to get those picked
# up as part of the "unified" build. But then to
# save CI resources we want to exclude a few
# redundant things:
#
# * the mbedtls build, since we don't really plan to
# use that on Darwin.
# * the "host clang" build, which uses the pigweed
# clang.
"default") GN_ARGS='target_os="all" is_asan=true enable_host_clang_build=false enable_host_clang_boringssl_crypto_tests=false';;
# save CI resources we want to exclude the
# "host clang" build, which uses the pigweed
# clang.
"default") GN_ARGS='target_os="all" is_asan=true enable_host_clang_build=false';;
"python_lib") GN_ARGS='enable_rtti=true enable_pylib=true';;
esac
BUILD_TYPE=$BUILD_TYPE scripts/build/gn_gen.sh --args="$GN_ARGS" --export-compile-commands
Expand Down
6 changes: 4 additions & 2 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -244,9 +244,11 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
# Enable building chip with clang & boringssl
enable_host_clang_boringssl_build = false

# Enable limited testing with clang & boringssl
# Enable limited testing with clang & boringssl. On Mac, boringssl does
# not compile with ASAN enabled.
enable_host_clang_boringssl_crypto_tests =
enable_default_builds && host_os != "win"
enable_default_builds && host_os != "win" &&
!(is_asan == true && host_os == "mac")

# Build the chip-cert tool.
enable_standalone_chip_cert_build =
Expand Down
3 changes: 0 additions & 3 deletions build/config/compiler/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -348,9 +348,6 @@ declare_args() {
# Enable Thread sanitizer
is_tsan = false

# Enable address sanitizer
is_asan = false

# Enable memory sanitizer
is_msan = false

Expand Down
3 changes: 3 additions & 0 deletions build/config/compiler/compiler.gni
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,7 @@ declare_args() {

# Generate code coverage analysis artifacts when enabled.
use_coverage = false

# Enable address sanitizer
is_asan = false
}