Native: don't cache Xcode.current between different compiler invocations
The compiler might be executed in a Gradle daemon process, so current Xcode might actually change between different invocations. ^KT-49496 Fixed
This commit is contained in:
committed by
Space
parent
86ad804848
commit
e92f7b5ec3
@@ -54,13 +54,14 @@ interface Xcode {
|
||||
}
|
||||
|
||||
companion object {
|
||||
val current: Xcode by lazy {
|
||||
CurrentXcode
|
||||
}
|
||||
// Don't cache the instance: the compiler might be executed in a Gradle daemon process,
|
||||
// so current Xcode might actually change between different invocations.
|
||||
val current: Xcode
|
||||
get() = CurrentXcode()
|
||||
}
|
||||
}
|
||||
|
||||
private object CurrentXcode : Xcode {
|
||||
private class CurrentXcode : Xcode {
|
||||
|
||||
override val toolchain by lazy {
|
||||
val ldPath = xcrun("-f", "ld") // = $toolchain/usr/bin/ld
|
||||
|
||||
Reference in New Issue
Block a user