Hello,
I am running into the same issue. Is there a way around this?
Example libfoo that depends on libbar in its implementation (only includes
libbar in "foo.cc", not "foo.h"):
cc_library_shared {
name: "libfoo",
srcs: "foo.cc",
shared_libs: ["libbar"],
export_include_dirs: ["."]
}
Then, if I want to make a binary that uses libfoo, I've found that I must
do:
cc_binary {
name: "mytest",
srcs: "main.cc",
shared_libs: ["libfoo", *"libbar"*]
}
I would expect there is a way to only list "libfoo" and have my executable
linked to libbar due to the transitive dependency.
Is there a directive I'm missing to enable this? In CMake, there is PUBLIC
vs PRIVATE linkage. I'm wondering if there is an analog in soong.
Thank you,
Evan
On Saturday, August 29, 2020 at 11:04:22 AM UTC-7 Wesolowski, Krzysztof
wrote:
> Hello,
>
> When I build big CMake based project handling numerous static libraries
> its composed from is quite easy - both include directories and linking is
> transitive (using PUBLIC keyword)
>
> In soong I end up with binaries listing all dependencies from dependency
> tree, and on top of that I need to export header files from each static
> library with export_static_lib_headers so at list intermediate static
> libraries can avoid listing its own trees.
>
> Am I missing something or is the model of "many small static libs" not
> supported by design?
>
> BR,
>
> Krzysztof Wesolowski
>
--
--
You received this message because you are subscribed to the "Android Building"
mailing list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en
---
You received this message because you are subscribed to the Google Groups
"Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/android-building/829f87d7-5a9a-4c1f-b471-59f7cf2347e9n%40googlegroups.com.