Skip to content

Commit

Permalink
build: Fix pw_BUILD_BROKEN_GROUPS
Browse files Browse the repository at this point in the history
- Avoid duplicate groups when pw_BUILD_BROKEN_GROUPS is enabled.
- Enable pw_BUILD_BROKEN_GROUPS in presubmit to more thoroughly test the
  GN build.

Change-Id: I55991f16980f199f6afa57e137d6be85173755ae
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/176114
Pigweed-Auto-Submit: Wyatt Hepler <[email protected]>
Presubmit-Verified: CQ Bot Account <[email protected]>
Reviewed-by: Armando Montanez <[email protected]>
Commit-Queue: Auto-Submit <[email protected]>
  • Loading branch information
255 authored and CQ Bot Account committed Oct 16, 2023
1 parent c1b4c84 commit 80cb5b1
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
25 changes: 13 additions & 12 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -311,18 +311,19 @@ if (pw_BUILD_BROKEN_GROUPS) {
toolchain_prefix =
"$dir_pigweed/targets/lm3s6965evb_qemu:lm3s6965evb_qemu_clang_"
}
}
group("qemu_gcc_size_optimized") {
deps = [ ":pigweed_default($dir_pigweed/targets/lm3s6965evb_qemu:lm3s6965evb_qemu_gcc_size_optimized)" ]
}
group("qemu_gcc") {
deps = [ ":qemu_gcc_size_optimized" ]
}
group("qemu_clang_size_optimized") {
deps = [ ":pigweed_default($dir_pigweed/targets/lm3s6965evb_qemu:lm3s6965evb_qemu_clang_size_optimized)" ]
}
group("qemu_clang") {
deps = [ ":qemu_clang_size_optimized" ]
} else {
group("qemu_gcc_size_optimized") {
deps = [ ":pigweed_default($dir_pigweed/targets/lm3s6965evb_qemu:lm3s6965evb_qemu_gcc_size_optimized)" ]
}
group("qemu_gcc") {
deps = [ ":qemu_gcc_size_optimized" ]
}
group("qemu_clang_size_optimized") {
deps = [ ":pigweed_default($dir_pigweed/targets/lm3s6965evb_qemu:lm3s6965evb_qemu_clang_size_optimized)" ]
}
group("qemu_clang") {
deps = [ ":qemu_clang_size_optimized" ]
}
}

# Run clang-tidy on pigweed_default with pw_strict_host_clang_debug toolchain options.
Expand Down
5 changes: 4 additions & 1 deletion pw_presubmit/py/pw_presubmit/pigweed_presubmit.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,10 @@ def _gn_combined_build_check_targets() -> Sequence[str]:
name='gn_combined_build_check',
doc='Run most host and device (QEMU) tests.',
path_filter=_BUILD_FILE_FILTER,
gn_args=dict(pw_C_OPTIMIZATION_LEVELS=_OPTIMIZATION_LEVELS),
gn_args=dict(
pw_C_OPTIMIZATION_LEVELS=_OPTIMIZATION_LEVELS,
pw_BUILD_BROKEN_GROUPS=True, # Enable to fully test the GN build
),
ninja_targets=_gn_combined_build_check_targets(),
)

Expand Down

0 comments on commit 80cb5b1

Please sign in to comment.