[compiletest]: use common infrastructure to detect the host OS
This commit is contained in:
@@ -4,6 +4,7 @@ apply plugin: 'kotlin'
|
||||
dependencies {
|
||||
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
|
||||
compile project(path: ':backend.native', configuration: 'cli_bc')
|
||||
compile project(':shared')
|
||||
testCompile 'junit:junit:4.12'
|
||||
}
|
||||
|
||||
|
||||
+3
-3
@@ -1,14 +1,14 @@
|
||||
package org.jetbrains.kotlin.compiletest
|
||||
|
||||
import org.jetbrains.kotlin.konan.target.Family
|
||||
import org.jetbrains.kotlin.konan.target.TargetManager
|
||||
import java.nio.file.Path
|
||||
import java.nio.file.Paths
|
||||
|
||||
|
||||
object DistProperties {
|
||||
private val isWindows: Boolean = requireProp("os.name").startsWith("Windows")
|
||||
|
||||
private val dist: Path = Paths.get(requireProp("konan.home"))
|
||||
private val konancDriver = if (isWindows) "konanc.bat" else "konanc"
|
||||
private val konancDriver = if (TargetManager.host.family == Family.WINDOWS) "konanc.bat" else "konanc"
|
||||
val konanc: Path = dist.resolve("bin/$konancDriver")
|
||||
val lldb: Path = Paths.get("lldb")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user