Skip to content

Commit

Permalink
Remove explicit "all" target from root build file
Browse files Browse the repository at this point in the history
The "all" target exists implicitly and contains everything. We don't
need to specify one, and it's misleading to do so specifying deps has no
effect.
  • Loading branch information
mspang committed Nov 24, 2020
1 parent 5379d6b commit 8fa2768
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 19 deletions.
18 changes: 7 additions & 11 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,6 @@ if (current_toolchain != "${dir_pw_toolchain}/dummy:dummy") {

# This is a real toolchain. Build CHIP.
group("default") {
deps = [ ":all" ]
}

group("all") {
deps = [
"${chip_root}/src/app",
"${chip_root}/src/ble",
Expand Down Expand Up @@ -249,20 +245,20 @@ if (current_toolchain != "${dir_pw_toolchain}/dummy:dummy") {
group("default") {
deps = []
if (enable_host_clang_build) {
deps += [ ":all_host_clang" ]
deps += [ ":host_clang" ]
}
if (enable_host_gcc_build) {
deps += [ ":all_host_gcc" ]
deps += [ ":host_gcc" ]
}
if (enable_host_gcc_mbedtls_build) {
deps += [ ":all_host_gcc_mbedtls" ]
deps += [ ":host_gcc_mbedtls" ]
}
if (enable_android_builds) {
deps += [
":all_android_arm",
":all_android_arm64",
":all_android_x64",
":all_android_x86",
":android_arm",
":android_arm64",
":android_x64",
":android_x86",
]
}
if (enable_standalone_chip_tool_build) {
Expand Down
4 changes: 2 additions & 2 deletions build/chip/chip_build.gni
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ template("chip_build") {
_build_name = target_name
_toolchain = invoker.toolchain

group("all_${_build_name}") {
deps = [ ":all(${_toolchain})" ]
group("${_build_name}") {
deps = [ ":default(${_toolchain})" ]
}

group("check_${_build_name}") {
Expand Down
2 changes: 1 addition & 1 deletion docs/BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ expensive to build everything for every edit. To save time, you can name the
configuration to build:

```
ninja -C out/unified all_host_gcc
ninja -C out/unified host_gcc
ninja -C out/unified check_host_gcc
```

Expand Down
10 changes: 5 additions & 5 deletions scripts/helpers/update_compile_commands.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,19 @@ CHIP_ROOT="$(dirname "$0")/../.."

source "$CHIP_ROOT/scripts/activate.sh"

gn --root="$CHIP_ROOT" gen "$CHIP_ROOT/out/debug" --export-compile-commands=all_host_gcc
gn --root="$CHIP_ROOT" gen "$CHIP_ROOT/out/debug" --export-compile-commands=host_gcc
mv "$CHIP_ROOT/out/debug/compile_commands.json" "$CHIP_ROOT/out/debug/compile_commands.gcc.json"

gn --root="$CHIP_ROOT" gen "$CHIP_ROOT/out/debug" --export-compile-commands=all_host_clang
gn --root="$CHIP_ROOT" gen "$CHIP_ROOT/out/debug" --export-compile-commands=host_clang
mv "$CHIP_ROOT/out/debug/compile_commands.json" "$CHIP_ROOT/out/debug/compile_commands.clang.json"

gn --root="$CHIP_ROOT" gen "$CHIP_ROOT/out/debug" --export-compile-commands=all_host_gcc_mbedtls
gn --root="$CHIP_ROOT" gen "$CHIP_ROOT/out/debug" --export-compile-commands=host_gcc_mbedtls
mv "$CHIP_ROOT/out/debug/compile_commands.json" "$CHIP_ROOT/out/debug/compile_commands.mbedtls.json"

gn --root="$CHIP_ROOT" gen "$CHIP_ROOT/out/debug" --export-compile-commands=all_android_x64
gn --root="$CHIP_ROOT" gen "$CHIP_ROOT/out/debug" --export-compile-commands=android_x64
mv "$CHIP_ROOT/out/debug/compile_commands.json" "$CHIP_ROOT/out/debug/compile_commands.android_x64.json"

gn --root="$CHIP_ROOT" gen "$CHIP_ROOT/out/debug" --export-compile-commands=all_android_arm64
gn --root="$CHIP_ROOT" gen "$CHIP_ROOT/out/debug" --export-compile-commands=android_arm64
mv "$CHIP_ROOT/out/debug/compile_commands.json" "$CHIP_ROOT/out/debug/compile_commands.android_arm64.json"

gn --root="$CHIP_ROOT" gen "$CHIP_ROOT/out/debug" --export-compile-commands=efr32_lock_app
Expand Down

0 comments on commit 8fa2768

Please sign in to comment.