diff --git a/backend.native/tests/build.gradle b/backend.native/tests/build.gradle index 48e28e1fb5a..f391d5a339d 100644 --- a/backend.native/tests/build.gradle +++ b/backend.native/tests/build.gradle @@ -40,7 +40,9 @@ abstract class KonanTest extends DefaultTask { "-headers", project.project(':runtime').file('src/main/kotlin'), "${sourceKt.absolutePath}" - jvmArgs "-Djava.library.path=${backendNative.buildDir.canonicalPath}/nativelibs" + String libraryPath = "${project.llvmDir}/lib:${backendNative.buildDir.canonicalPath}/nativelibs" + environment 'LD_LIBRARY_PATH' : libraryPath + environment 'DYLD_LIBRARY_PATH' : libraryPath } return sourceBc }