Skip to content

Commit

Permalink
floss: Move host build check to parent BUILD file
Browse files Browse the repository at this point in the history
On cross-compiles, the main build was failing because //bt:tools was
dependending on //bt/system:tools which doesn't exist on cross-compile
builds. Thus, move the condition to //bt:tools instead.

Bug: 201687614
Tag: #floss
Test: emerge-arm-generic floss on ChromeOS
Change-Id: I915ef8f8fa80f4642972a9aec960b428c581360d
  • Loading branch information
apandit committed Nov 19, 2021
1 parent 4786b94 commit 4d09c9e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
7 changes: 5 additions & 2 deletions BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ group("all") {
deps = [ "//bt/system:all" ]
}

group("tools") {
deps = [ "//bt/system:tools" ]
# Tools should be built for the host target.
if (host_cpu == target_cpu && host_os == target_os) {
group("tools") {
deps = [ "//bt/system:tools" ]
}
}
12 changes: 5 additions & 7 deletions system/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,11 @@ group("bluetooth") {
#}
#}

if (host_cpu == target_cpu && host_os == target_os) {
group("tools") {
deps = [
"//bt/system/gd/dumpsys/bundler:bluetooth_flatbuffer_bundler",
"//bt/system/gd/packet/parser:bluetooth_packetgen",
]
}
group("tools") {
deps = [
"//bt/system/gd/dumpsys/bundler:bluetooth_flatbuffer_bundler",
"//bt/system/gd/packet/parser:bluetooth_packetgen",
]
}

if (defined(use.android) && use.android) {
Expand Down

0 comments on commit 4d09c9e

Please sign in to comment.