Add cc_library tests
Add tests around reusing objects between static and shared
libraries.
Test: library_test.go
Change-Id: I1a1a01c5ea9f9edfbcaa5b29c39c281630e04f70
diff --git a/cc/library.go b/cc/library.go
index d4ed7c6..23e4f44 100644
--- a/cc/library.go
+++ b/cc/library.go
@@ -651,7 +651,7 @@
func (library *libraryDecorator) link(ctx ModuleContext,
flags Flags, deps PathDeps, objs Objects) android.Path {
- objs = objs.Append(deps.Objs)
+ objs = deps.Objs.Copy().Append(objs)
var out android.Path
if library.static() || library.header() {
out = library.linkStatic(ctx, flags, deps, objs)