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