Merge "Fix panic when a module has an invalid output path" am: cf6749630a am: 32e5355bab am: b2e53db028 am: faf1826ea9 am: 22c6891939

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1826960

Change-Id: I4ef4c808c9fee14741c2168a32eca25a0402942c
This commit is contained in:
Treehugger Robot
2021-09-15 05:30:55 +00:00
committed by Automerger Merge Worker

View File

@@ -760,18 +760,18 @@ func collectAppDeps(ctx android.ModuleContext, app appDepsInterface,
}
lib := dep.OutputFile()
path := lib.Path()
if seenModulePaths[path.String()] {
return false
}
seenModulePaths[path.String()] = true
if checkNativeSdkVersion && dep.SdkVersion() == "" {
ctx.PropertyErrorf("jni_libs", "JNI dependency %q uses platform APIs, but this module does not",
otherName)
}
if lib.Valid() {
path := lib.Path()
if seenModulePaths[path.String()] {
return false
}
seenModulePaths[path.String()] = true
if checkNativeSdkVersion && dep.SdkVersion() == "" {
ctx.PropertyErrorf("jni_libs", "JNI dependency %q uses platform APIs, but this module does not",
otherName)
}
jniLibs = append(jniLibs, jniLib{
name: ctx.OtherModuleName(module),
path: path,