summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarter Hsu <carterhsu@google.com>2021-11-17 04:50:22 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2021-11-17 04:50:22 +0000
commitf665b8fa862e55c76ada5eee8bdc20eac9aa0734 (patch)
tree215f65cc6a5957672698d13190eb56e9989425dc
parent0d9ef9f0b99b56e6a8f3c9b5c41b1221c6c701ab (diff)
parent150dded787009b6e84e02dca11a593c5deba0e01 (diff)
Merge "audio: Support 64bit configuration on 32+64bit compatible OS"
-rw-r--r--audio/common/all-versions/default/service/Android.bp37
1 files changed, 32 insertions, 5 deletions
diff --git a/audio/common/all-versions/default/service/Android.bp b/audio/common/all-versions/default/service/Android.bp
index 0d4775c6a8..1bd6abeb47 100644
--- a/audio/common/all-versions/default/service/Android.bp
+++ b/audio/common/all-versions/default/service/Android.bp
@@ -7,17 +7,40 @@ package {
default_applicable_licenses: ["hardware_interfaces_license"],
}
+soong_config_module_type {
+ name: "android_hardware_audio_config_default",
+ module_type: "cc_defaults",
+ config_namespace: "android_hardware_audio",
+ bool_variables: [
+ "run_64bit",
+ ],
+ properties: ["compile_multilib"],
+}
+
+android_hardware_audio_config_default {
+ name: "android_hardware_audio_config_defaults",
+
+ soong_config_variables: {
+ run_64bit: {
+ conditions_default: {
+ // Prefer 32 bit as the binary must always be installed at the same
+ // location for init to start it and the build system does not support
+ // having two binaries installable to the same location even if they are
+ // not installed in the same build.
+ compile_multilib: "prefer32",
+ },
+ compile_multilib: "64",
+ },
+ },
+}
+
cc_binary {
name: "android.hardware.audio.service",
init_rc: ["android.hardware.audio.service.rc"],
relative_install_path: "hw",
vendor: true,
- // Prefer 32 bit as the binary must always be installed at the same
- // location for init to start it and the build system does not support
- // having two binaries installable to the same location even if they are
- // not installed in the same build.
- compile_multilib: "prefer32",
+
srcs: ["service.cpp"],
cflags: [
@@ -34,6 +57,10 @@ cc_binary {
"libutils",
"libhardware",
],
+
+ defaults: [
+ "android_hardware_audio_config_defaults",
+ ],
}
// Legacy service name, use android.hardware.audio.service instead