Fine tuned compiler version compatibility rules for now.

This commit is contained in:
Alexander Gorshenev
2018-09-19 18:41:29 +03:00
committed by alexander-gorshenev
parent 5fcb5edac8
commit d416417f36
@@ -209,8 +209,8 @@ internal fun SearchPathResolverWithTarget.libraryMatch(candidate: KonanLibraryIm
if (candidateCompilerVersion == null ||
knownCompilerVersions != null &&
!knownCompilerVersions!!.contains(candidateCompilerVersion)) {
logger("skipping $candidatePath. The compiler versions don't match. Expected '${knownCompilerVersions?.map { it.toString(true, true) }}', found '${candidateCompilerVersion?.toString(true, true)}'")
knownCompilerVersions!!.none { it.compatible(candidateCompilerVersion) } ) {
logger("skipping $candidatePath. The compiler versions don't match. Expected '${knownCompilerVersions?.map { it.toString(false, false) }}', found '${candidateCompilerVersion?.toString(true, true)}'")
return false
}
@@ -230,3 +230,8 @@ internal fun SearchPathResolverWithTarget.libraryMatch(candidate: KonanLibraryIm
return true
}
private fun KonanVersion.compatible(other: KonanVersion) =
this.major == other.major
&& this.minor == other.minor
&& this.maintenance == other.maintenance