Fix static+shared with generated sources
Clear out the generated sources when reusing object files from the static library for the shared library to avoid linking them twice. Change-Id: Idc145f817acc93df4c3b266ac7647299399bc8eb
This commit is contained in:
parent
e7b07137d4
commit
5dab840e24
1 changed files with 1 additions and 0 deletions
1
cc/cc.go
1
cc/cc.go
|
@ -2691,6 +2691,7 @@ func linkageMutator(mctx android.BottomUpMutatorContext) {
|
|||
// Optimize out compiling common .o files twice for static+shared libraries
|
||||
mctx.AddInterVariantDependency(reuseObjTag, shared, static)
|
||||
sharedCompiler.baseCompiler.Properties.Srcs = nil
|
||||
sharedCompiler.baseCompiler.Properties.Generated_sources = nil
|
||||
}
|
||||
}
|
||||
} else if linker.buildStatic() {
|
||||
|
|
Loading…
Reference in a new issue