[build][native] don't ever fix dist, take it with API
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import org.jetbrains.kotlin.CopyCommonSources
|
||||
import org.jetbrains.kotlin.konan.target.HostManager
|
||||
|
||||
import org.jetbrains.kotlin.*
|
||||
/*
|
||||
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||
* that can be found in the LICENSE file.
|
||||
@@ -239,9 +239,10 @@ targetList.each { target ->
|
||||
task("${target}Stdlib", type: JavaExec) {
|
||||
main = 'org.jetbrains.kotlin.cli.bc.K2NativeKt'
|
||||
// This task depends on distCompiler, so the compiler jar is already in the dist directory.
|
||||
classpath = fileTree("${rootProject.projectDir}/dist/konan/lib") {
|
||||
classpath = fileTree("${UtilsKt.getKotlinNativeDist(project)}/konan/lib") {
|
||||
include "*.jar"
|
||||
}
|
||||
systemProperties "konan.home": UtilsKt.getKotlinNativeDist(project)
|
||||
jvmArgs = konanJvmArgs
|
||||
def testAnnotationCommon = project(":kotlin-test:kotlin-test-annotations-common").files("src/main/kotlin").files
|
||||
def testCommon = project(":kotlin-test:kotlin-test-common").files("src/main/kotlin").files
|
||||
|
||||
@@ -4398,7 +4398,7 @@ standaloneTest("jsinterop_math") {
|
||||
"$jsinterop -pkg kotlinx.interop.wasm.math -o $buildDir/jsmath -target wasm32".execute().waitFor()
|
||||
|
||||
}
|
||||
dependsOn ':wasm32PlatformLibs'
|
||||
dependsOn ':kotlin-native:wasm32PlatformLibs'
|
||||
enabled = (project.testTarget == 'wasm32')
|
||||
goldValue = "e = 2.718281828459045, pi = 3.141592653589793, sin(pi) = 1.2246467991473532E-16, sin(pi/2) = 1.0, ln(1) = 0.0, ln(e) = 1.0\n"
|
||||
source = "jsinterop/math.kt"
|
||||
@@ -4707,9 +4707,8 @@ if (isAppleTarget(project)) {
|
||||
library(libraryName, targets: [target.name]) {
|
||||
srcDir "objcexport/library"
|
||||
artifactName "test-library"
|
||||
|
||||
if (!useCustomDist) {
|
||||
dependsOn ":kotlin-native:${target.name}CrossDistRuntime", ':kotlin-native:distCompiler'
|
||||
delegate.getByTarget(target.name).configure{
|
||||
UtilsKt.dependsOnDist(it)
|
||||
}
|
||||
|
||||
extraOpts "-Xshort-module-name=MyLibrary"
|
||||
@@ -4735,8 +4734,8 @@ if (isAppleTarget(project)) {
|
||||
srcDir "objcexport/library"
|
||||
artifactName "test-library"
|
||||
|
||||
if (!useCustomDist) {
|
||||
dependsOn ":kotlin-native:${target.name}CrossDistRuntime", ':kotlin-native:distCompiler'
|
||||
delegate.getByTarget(target.name).configure{
|
||||
UtilsKt.dependsOnDist(it)
|
||||
}
|
||||
|
||||
extraOpts "-Xshort-module-name=MyLibrary"
|
||||
@@ -5051,7 +5050,7 @@ private void configureStdlibTest(KonanGTest task, boolean inWorker) {
|
||||
extraOpts inWorker ? '-trw' : '-tr',
|
||||
'-Xverify-ir',
|
||||
'-Xopt-in=kotlin.RequiresOptIn,kotlin.ExperimentalStdlibApi',
|
||||
"-friend-modules", project.rootProject.file("${project.properties['konan.home']}/klib/common/stdlib").absolutePath
|
||||
"-friend-modules", project.rootProject.file("${UtilsKt.getKotlinNativeDist(project)}/klib/common/stdlib").absolutePath
|
||||
extraOpts project.globalTestArgs
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user