A little refactoring on abi version match.
This commit is contained in:
committed by
alexander-gorshenev
parent
4bc1130a95
commit
be56d8a4e2
@@ -208,18 +208,24 @@ internal fun SearchPathResolverWithTarget.libraryMatch(candidate: KonanLibraryIm
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if (candidateAbiVersion == null ||
|
val abiVersionMatch = candidateAbiVersion != null &&
|
||||||
knownAbiVersions != null &&
|
knownAbiVersions != null &&
|
||||||
!knownAbiVersions!!.contains(candidateAbiVersion)) {
|
knownAbiVersions!!.contains(candidateAbiVersion)
|
||||||
|
|
||||||
if (candidateCompilerVersion == null ||
|
val compilerVersionMatch = candidateCompilerVersion != null &&
|
||||||
knownCompilerVersions != null &&
|
knownCompilerVersions != null &&
|
||||||
knownCompilerVersions!!.none { it.compatible(candidateCompilerVersion) } ) {
|
knownCompilerVersions!!.any { it.compatible(candidateCompilerVersion) }
|
||||||
|
|
||||||
logger("skipping $candidatePath. The abi versions don't match. Expected '${knownAbiVersions}', found '${candidateAbiVersion}'")
|
if (!abiVersionMatch && !compilerVersionMatch) {
|
||||||
if (knownCompilerVersions != null) logger("The compiler versions don't match either. Expected '${knownCompilerVersions?.map { it.toString(false, false) }}', found '${candidateCompilerVersion?.toString(true, true)}'")
|
logger("skipping $candidatePath. The abi versions don't match. Expected '${knownAbiVersions}', found '${candidateAbiVersion}'")
|
||||||
return false
|
|
||||||
|
if (knownCompilerVersions != null) {
|
||||||
|
val expected = knownCompilerVersions?.map { it.toString(false, false) }
|
||||||
|
val found = candidateCompilerVersion?.toString(true, true)
|
||||||
|
logger("The compiler versions don't match either. Expected '${expected}', found '${found}'")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if (candidateLibraryVersion != unresolved.libraryVersion &&
|
if (candidateLibraryVersion != unresolved.libraryVersion &&
|
||||||
|
|||||||
Reference in New Issue
Block a user