diff options
author | 2019-08-16 20:14:32 +0100 | |
---|---|---|
committer | 2019-08-22 13:21:37 -0700 | |
commit | fcf55bf656f44318e78c92be5b42858065ae5780 (patch) | |
tree | e89cfcb1cc22bf70038719d5c9057a28151e6325 /cc/library_test.go | |
parent | f02f30952da26dcc67d28b9a839215cc57f9c690 (diff) |
Allow .o files as srcs.
Test: m nothing
Test: TreeHugger
Bug: 134581881
Bug: 137267623
Change-Id: I26307dd1129e58878f0468da3b61c53f074bd674
Diffstat (limited to 'cc/library_test.go')
-rw-r--r-- | cc/library_test.go | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/cc/library_test.go b/cc/library_test.go index 859b05aff..2acae35cf 100644 --- a/cc/library_test.go +++ b/cc/library_test.go @@ -24,23 +24,26 @@ func TestLibraryReuse(t *testing.T) { ctx := testCc(t, ` cc_library { name: "libfoo", - srcs: ["foo.c"], + srcs: ["foo.c", "baz.o"], }`) libfooShared := ctx.ModuleForTests("libfoo", "android_arm_armv7-a-neon_core_shared").Rule("ld") libfooStatic := ctx.ModuleForTests("libfoo", "android_arm_armv7-a-neon_core_static").Output("libfoo.a") - if len(libfooShared.Inputs) != 1 { + if len(libfooShared.Inputs) != 2 { t.Fatalf("unexpected inputs to libfoo shared: %#v", libfooShared.Inputs.Strings()) } - if len(libfooStatic.Inputs) != 1 { + if len(libfooStatic.Inputs) != 2 { t.Fatalf("unexpected inputs to libfoo static: %#v", libfooStatic.Inputs.Strings()) } if libfooShared.Inputs[0] != libfooStatic.Inputs[0] { t.Errorf("static object not reused for shared library") } + if libfooShared.Inputs[1] != libfooStatic.Inputs[1] { + t.Errorf("static object not reused for shared library") + } }) t.Run("extra static source", func(t *testing.T) { |