From 82de083c1b89683d88ede23d1536af7e7ae39c60 Mon Sep 17 00:00:00 2001 From: Sergey Bogolepov Date: Thu, 23 May 2019 23:37:48 +0300 Subject: [PATCH] set SIMCTL_CHILD_DYLD_LIBRARY_PATH for iphone simulator on older systems --- .../main/kotlin/org/jetbrains/kotlin/FrameworkTest.kt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/buildSrc/plugins/src/main/kotlin/org/jetbrains/kotlin/FrameworkTest.kt b/buildSrc/plugins/src/main/kotlin/org/jetbrains/kotlin/FrameworkTest.kt index 2cd07e45d92..2f6dbdc31f8 100644 --- a/buildSrc/plugins/src/main/kotlin/org/jetbrains/kotlin/FrameworkTest.kt +++ b/buildSrc/plugins/src/main/kotlin/org/jetbrains/kotlin/FrameworkTest.kt @@ -98,8 +98,16 @@ open class FrameworkTest : DefaultTask() { ?: throw RuntimeException("Executor wasn't found") // Hopefully, lexicographical comparison will work. val newMacos = System.getProperty("os.version").compareTo("10.14.4") >= 0 + val dyldLibraryPathKey = if (target == KonanTarget.IOS_X64) { + "SIMCTL_CHILD_DYLD_LIBRARY_PATH" + } else { + "DYLD_LIBRARY_PATH" + } + val environment = if (newMacos) emptyMap() else mapOf( + dyldLibraryPathKey to libraryPath + ) val (stdOut, stdErr, exitCode) = runProcess( - executor = executor.add(Action { it.environment = if (newMacos) emptyMap() else mapOf("DYLD_LIBRARY_PATH" to libraryPath) })::execute, + executor = executor.add(Action { it.environment = environment })::execute, executable = testExecutable.toString()) println("""