Skip to content

Commit

Permalink
Fix default gn_build.sh on M1/M2 macs.
Browse files Browse the repository at this point in the history
There is no "host clang" (i.e. pigweed clang) there.

Fixes project-chip#24609
  • Loading branch information
bzbarsky-apple committed Feb 8, 2023
1 parent c49ee00 commit f9d4275
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -313,11 +313,12 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") {
enable_genio_builds = false
}

# Pigweed does not provide a clang in some configurations.
_have_pigweed_clang = host_os != "win" && (host_os != "mac" || host_cpu != "arm64")

declare_args() {
# Enable building chip with clang.
# Disabled on Mac arm64 but note that the "gcc" build uses Apple clang.
enable_host_clang_build = enable_default_builds && host_os != "win" &&
(host_os != "mac" || host_cpu != "arm64")
# Enable building chip with the pigweed clang.
enable_host_clang_build = enable_default_builds && _have_pigweed_clang

# Enable building chip with gcc.
enable_host_gcc_build = enable_default_builds && host_os != "win"
Expand All @@ -332,10 +333,9 @@ 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. On Mac, boringssl does
# not compile with ASAN enabled.
enable_host_clang_boringssl_crypto_tests =
enable_default_builds && host_os != "win" &&
# Enable limited testing with pigweed clang & boringssl. On Mac, boringssl
# does not compile with ASAN enabled.
enable_host_clang_boringssl_crypto_tests = _have_pigweed_clang &&
!(is_asan == true && host_os == "mac")

# Build the chip-cert tool.
Expand Down

0 comments on commit f9d4275

Please sign in to comment.