aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksei Vetrov <vvvvvv@google.com>2023-11-10 14:49:03 +0000
committerMatthias Männich <maennich@google.com>2023-11-14 17:42:34 +0000
commitabb831b0b457a7d2e05e71f01784e4b457e4ea72 (patch)
treee89d926cbad02e59ff927334bbf090c8872a5152
parentd9051ed0ceca713882a620a4266b381bd4f56e92 (diff)
downloadelfutils-abb831b0b457a7d2e05e71f01784e4b457e4ea72.tar.gz
elfutils: refactor transitive dependencies
Soong doesn't have propagation for static library dependencies. Add "elfutils_transitive_defaults" to have "static_libs" that are applied to all static libraries that use elfutils. This have to be included explicitly by all elfutils users. Bug: 169779783 Bug: 309972007 Change-Id: I8802906257857f54710c351c5dcf4323c50aacbb Signed-off-by: Aleksei Vetrov <vvvvvv@google.com>
-rw-r--r--Android.bp14
1 files changed, 11 insertions, 3 deletions
diff --git a/Android.bp b/Android.bp
index 1563dcd1..9146e4a3 100644
--- a/Android.bp
+++ b/Android.bp
@@ -39,8 +39,19 @@ license {
],
}
+// Properties to apply to all static libraries that use elfutils.
+// Soong doesn't have propagation for static library dependencies,
+// and this have to be included explicitly by elfutils users.
+cc_defaults {
+ name: "elfutils_transitive_defaults",
+ static_libs: [
+ "libz",
+ ],
+}
+
cc_defaults {
name: "elfutils_defaults",
+ defaults: ["elfutils_transitive_defaults"],
cflags: [
"-DHAVE_CONFIG_H",
"-D_GNU_SOURCE",
@@ -75,8 +86,6 @@ cc_library {
srcs: ["libelf/*.c",],
- static_libs: ["libz"],
-
export_include_dirs: ["libelf"],
target: {
@@ -139,7 +148,6 @@ cc_library_host_static {
musl: {
static_libs: [
"libfts",
- "libz",
],
},
},