Skip to content

Commit d1074af

Browse files
committed
Build cuttlefish-base host executables in optimized mode
Adds a dependency on dh-exec to use dh-exec-install to handle bazel generating optimized executables at different paths per architecture. Bug: b/458173609
1 parent 8671318 commit d1074af

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

base/debian/control

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Build-Depends: bazel [amd64],
66
cmake,
77
config-package-dev,
88
debhelper-compat (= 12),
9+
dh-exec,
910
git,
1011
libaom-dev,
1112
libclang-dev,

base/debian/cuttlefish-base.install

100644100755
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
cvd/bazel-bin/cuttlefish/package/cuttlefish-common /usr/lib
1+
#!/usr/bin/dh-exec
2+
[amd64] cvd/bazel-out/k8-opt/bin/cuttlefish/package/cuttlefish-common /usr/lib
3+
[arm64] cvd/bazel-out/aarch64-opt/bin/cuttlefish/package/cuttlefish-common /usr/lib
24
host/deploy/capability_query.py /usr/lib/cuttlefish-common/bin/
35
host/packages/cuttlefish-base/* /

base/debian/rules

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ override_dh_installinit:
7676
# the `--workspace_status_command` flag path depends on the current working directory of base/cvd
7777
.PHONY: override_dh_auto_build
7878
override_dh_auto_build:
79-
cd cvd && bazel build ${remote_cache_arg} ${disk_cache_arg} ${compilation_mode} ${conlyopts} ${copts} ${cxxopts} ${linkopts} 'cuttlefish/package:cvd' --spawn_strategy=local --workspace_status_command=../stamp_helper.sh --build_tag_filters=-clang-tidy
79+
cd cvd && bazel build ${remote_cache_arg} ${disk_cache_arg} ${compilation_mode} ${conlyopts} ${copts} ${cxxopts} ${linkopts} -c opt 'cuttlefish/package:cvd' --spawn_strategy=local --workspace_status_command=../stamp_helper.sh --build_tag_filters=-clang-tidy
8080
dh_auto_build
8181

8282
# Only generate optimized DWARF if debug is enabled

0 commit comments

Comments
 (0)