aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Lozano <ivanlozano@google.com>2021-02-04 10:06:19 -0500
committerIvan Lozano <ivanlozano@google.com>2021-02-04 10:17:37 -0500
commit8070f8c30aedc7d0079fcb1d6a7af2ddb0407f25 (patch)
treef1898376dd455d94d01bd2c8a50a3abfe180be63
parentc375bac598068f9d4f16f4ad4a86a0ee2638a9e3 (diff)
downloadbt-8070f8c30aedc7d0079fcb1d6a7af2ddb0407f25.tar.gz
rust: Refactor modules for static_lib propagation.
rust_library modules now bundle their static lib dependencies. As a result, many of these static_lib listings are no longer necessary. This CL also includes libcxxbridge05 in libbt_common_sys_prop_cxx and libbt_shim_ffi in libbluetooth_rust_interop, both static libraries, to avoid having to add these to dependencies. Test: mma Bug: 175886967 Bug: 179122837 Change-Id: I77c53e62d19bcda7a8ace81d7c576eed383b7c87
-rw-r--r--build/Android.bp6
-rw-r--r--gd/Android.bp30
-rw-r--r--gd/rust/common/Android.bp1
-rw-r--r--gd/rust/shim/Android.bp2
-rw-r--r--main/Android.bp2
-rw-r--r--stack/test/fuzzers/Android.bp1
-rw-r--r--test/headless/Android.bp2
7 files changed, 2 insertions, 42 deletions
diff --git a/build/Android.bp b/build/Android.bp
index d19634c79..fb50d4125 100644
--- a/build/Android.bp
+++ b/build/Android.bp
@@ -83,7 +83,6 @@ fluoride_defaults {
"libbluetooth_rust_interop",
"liblog",
"libcutils",
- "libbt_shim_ffi",
],
cpp_std: "c++17",
sanitize: {
@@ -106,7 +105,6 @@ fluoride_defaults {
"libbluetooth_gd",
"libbluetooth_rust_interop",
"libbt_shim_ffi",
- "libcxxbridge05",
],
target: {
darwin: {
@@ -120,10 +118,6 @@ fluoride_defaults {
"libutils",
"libcutils",
],
- static_libs: [
- "libbt_common_sys_prop_cxx",
- "libbt_hidl_hal_cxx",
- ],
},
},
}
diff --git a/gd/Android.bp b/gd/Android.bp
index 5919ad55e..d2daa7db7 100644
--- a/gd/Android.bp
+++ b/gd/Android.bp
@@ -130,10 +130,6 @@ cc_defaults {
"libutils",
"libcutils",
],
- static_libs: [
- "libbt_common_sys_prop_cxx",
- "libbt_hidl_hal_cxx",
- ],
},
},
srcs: [
@@ -169,8 +165,6 @@ cc_defaults {
static_libs: [
"libbluetooth-protos",
"libbluetooth_rust_interop",
- "libbt_shim_ffi",
- "libcxxbridge05",
],
export_static_lib_headers: [ "libbluetooth_rust_interop" ],
}
@@ -232,8 +226,6 @@ cc_binary {
"libbluetooth_gd",
"libflatbuffers-cpp",
"libbluetooth_rust_interop",
- "libbt_shim_ffi",
- "libcxxbridge05",
],
shared_libs: [
"libbacktrace",
@@ -252,10 +244,6 @@ cc_binary {
"libutils",
"libcutils",
],
- static_libs: [
- "libbt_common_sys_prop_cxx",
- "libbt_hidl_hal_cxx",
- ],
},
host: {
required: [
@@ -303,10 +291,6 @@ cc_test {
"libutils",
"libcutils",
],
- static_libs: [
- "libbt_common_sys_prop_cxx",
- "libbt_hidl_hal_cxx",
- ],
},
},
srcs: [
@@ -341,8 +325,6 @@ cc_test {
"libflatbuffers-cpp",
"libgmock",
"libbluetooth_rust_interop",
- "libbt_shim_ffi",
- "libcxxbridge05",
],
shared_libs: [
"libchrome",
@@ -380,8 +362,6 @@ cc_test {
},
static_libs: [
"libbluetooth_rust_interop",
- "libbt_shim_ffi",
- "libcxxbridge05",
"libchrome",
],
shared_libs: [
@@ -396,10 +376,6 @@ cc_test {
"libutils",
"libcutils",
],
- static_libs: [
- "libbt_common_sys_prop_cxx",
- "libbt_hidl_hal_cxx",
- ],
},
},
}
@@ -418,8 +394,6 @@ cc_defaults {
"libgmock",
"libgtest",
"libbluetooth_rust_interop",
- "libbt_shim_ffi",
- "libcxxbridge05",
],
host_supported: true,
generated_headers: [
@@ -443,10 +417,6 @@ cc_defaults {
"libhidlbase",
"libutils",
],
- static_libs: [
- "libbt_common_sys_prop_cxx",
- "libbt_hidl_hal_cxx",
- ],
},
},
}
diff --git a/gd/rust/common/Android.bp b/gd/rust/common/Android.bp
index 40e3da263..fb216b315 100644
--- a/gd/rust/common/Android.bp
+++ b/gd/rust/common/Android.bp
@@ -70,4 +70,5 @@ cc_library_static {
shared_libs: [
"libcutils",
],
+ whole_static_libs: ["libcxxbridge05"],
}
diff --git a/gd/rust/shim/Android.bp b/gd/rust/shim/Android.bp
index e315ea704..19b96da29 100644
--- a/gd/rust/shim/Android.bp
+++ b/gd/rust/shim/Android.bp
@@ -83,7 +83,7 @@ cc_library_static {
shared_libs: [
"libchrome",
],
- static_libs: [
+ whole_static_libs: [
"libbt_shim_ffi",
],
}
diff --git a/main/Android.bp b/main/Android.bp
index a5a071f50..d287b7617 100644
--- a/main/Android.bp
+++ b/main/Android.bp
@@ -114,8 +114,6 @@ cc_library_shared {
"libudrv-uipc",
"libbluetooth_gd", // Gabeldorsche
"libbluetooth_rust_interop",
- "libbt_shim_ffi",
- "libcxxbridge05",
],
whole_static_libs: [
"libbt-bta",
diff --git a/stack/test/fuzzers/Android.bp b/stack/test/fuzzers/Android.bp
index aa2f8a89c..4b10b777a 100644
--- a/stack/test/fuzzers/Android.bp
+++ b/stack/test/fuzzers/Android.bp
@@ -29,7 +29,6 @@ cc_defaults {
"libudrv-uipc",
"libbt-protos-lite",
"libbluetooth_gd",
- "libcxxbridge05",
],
shared_libs: [
"libbinder",
diff --git a/test/headless/Android.bp b/test/headless/Android.bp
index f7c4bd6bf..3cb69809b 100644
--- a/test/headless/Android.bp
+++ b/test/headless/Android.bp
@@ -44,8 +44,6 @@ cc_test {
"libudrv-uipc",
"libz",
"libbluetooth_rust_interop",
- "libbt_shim_ffi",
- "libcxxbridge05",
],
shared_libs: [
"android.hardware.bluetooth.a2dp@1.0",