Support shared_libs, static_libs and default_shared_libs in cc_object

cc_object files don't link against static or shared libraries, but they
can use headers from them.  Make cc_object use the default_shared_libs
headers, and add support for explicit static and shared library
dependencies.

Bug: 153662223
Test: go test ./cc/...
Change-Id: I9ab160ede06db1b135d217d72770c22f500cfe1b
This commit is contained in:
Colin Cross
2021-06-21 16:41:29 -07:00
parent 9ecb42dd31
commit 137d7dafd8
4 changed files with 48 additions and 0 deletions

View File

@@ -347,6 +347,7 @@ func TestSnapshotWithObject(t *testing.T) {
cc_object {
name: "crtobj",
stl: "none",
default_shared_libs: [],
sanitize: {
never: true,
},
@@ -364,6 +365,7 @@ cc_prebuilt_object {
apex_available: ["//apex_available:platform"],
stl: "none",
compile_multilib: "both",
default_shared_libs: [],
sanitize: {
never: true,
},
@@ -388,6 +390,7 @@ cc_prebuilt_object {
apex_available: ["//apex_available:platform"],
stl: "none",
compile_multilib: "both",
default_shared_libs: [],
sanitize: {
never: true,
},