Fix data race when ALLOW_MISSING_DEPENDENCIES=true
Missing dependencies were modifying a slice owned by a dependency, which could cause a data race. Return a copy instead. Test: build with race detector enabled Bug: 70706626 Change-Id: I9f68c887bee94348f3e11284c0833d2e04d62599
This commit is contained in:
@@ -709,7 +709,7 @@ func (library *libraryDecorator) buildShared() bool {
|
||||
}
|
||||
|
||||
func (library *libraryDecorator) getWholeStaticMissingDeps() []string {
|
||||
return library.wholeStaticMissingDeps
|
||||
return append([]string(nil), library.wholeStaticMissingDeps...)
|
||||
}
|
||||
|
||||
func (library *libraryDecorator) objs() Objects {
|
||||
|
Reference in New Issue
Block a user