summaryrefslogtreecommitdiff
path: root/cc/cc_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'cc/cc_test.go')
-rw-r--r--cc/cc_test.go32
1 files changed, 32 insertions, 0 deletions
diff --git a/cc/cc_test.go b/cc/cc_test.go
index af9b9436c..ce941d5d9 100644
--- a/cc/cc_test.go
+++ b/cc/cc_test.go
@@ -4056,3 +4056,35 @@ func TestInstallSharedLibs(t *testing.T) {
}
}
+
+func TestStubsLibReexportsHeaders(t *testing.T) {
+ ctx := testCc(t, `
+ cc_library_shared {
+ name: "libclient",
+ srcs: ["foo.c"],
+ shared_libs: ["libfoo#1"],
+ }
+
+ cc_library_shared {
+ name: "libfoo",
+ srcs: ["foo.c"],
+ shared_libs: ["libbar"],
+ export_shared_lib_headers: ["libbar"],
+ stubs: {
+ symbol_file: "foo.map.txt",
+ versions: ["1", "2", "3"],
+ },
+ }
+
+ cc_library_shared {
+ name: "libbar",
+ export_include_dirs: ["include/libbar"],
+ srcs: ["foo.c"],
+ }`)
+
+ cFlags := ctx.ModuleForTests("libclient", "android_arm64_armv8-a_shared").Rule("cc").Args["cFlags"]
+
+ if !strings.Contains(cFlags, "-Iinclude/libbar") {
+ t.Errorf("expected %q in cflags, got %q", "-Iinclude/libbar", cFlags)
+ }
+}