Store ndkKnownLibs in the config

Storing ndkKnownLibs prevents multiple tests from running in parallel
as one may be writing to the list while another is reading from it.
Store it in the config so each test has its own copy.

Test: go test -race ./apex
Change-Id: Iba57c9494012c9e0ae9e5ffaa63b9b2bd2c77492
This commit is contained in:
Colin Cross
2020-10-29 20:47:22 -07:00
parent 5789858aa8
commit 95f1ca07ce
5 changed files with 21 additions and 14 deletions

View File

@@ -890,7 +890,7 @@ func collectAppDeps(ctx android.ModuleContext, app appDepsInterface,
if IsJniDepTag(tag) || cc.IsSharedDepTag(tag) {
if dep, ok := module.(*cc.Module); ok {
if dep.IsNdk() || dep.IsStubs() {
if dep.IsNdk(ctx.Config()) || dep.IsStubs() {
return false
}