[JS_IR] Use new plugin to build Kotlin/JS stdlib with IR compiler

- Switch to building stdlib with bootstrap compiler since IR is stable
  enough
- Build stdlib with coreLibs by default
- Include JS IR stdlib to kotlin distribution
This commit is contained in:
Svyatoslav Kuzmich
2020-03-12 16:16:24 +03:00
parent 14edc26cf1
commit 3d5003d476
26 changed files with 378 additions and 346 deletions
+10 -5
View File
@@ -39,7 +39,6 @@ dependencies {
testCompileOnly(intellijDep()) { includeJars("idea", "idea_rt", "util") }
testCompile(project(":compiler:backend.js"))
testCompile(project(":compiler:backend.wasm"))
testCompile(project(":kotlin-stdlib-js-ir"))
testCompile(project(":js:js.translator"))
testCompile(project(":js:js.serializer"))
testCompile(project(":js:js.dce"))
@@ -103,9 +102,12 @@ fun Test.setUpJsBoxTests(jsEnabled: Boolean, jsIrEnabled: Boolean) {
dependsOn(":dist")
if (jsEnabled) dependsOn(testJsRuntime)
if (jsIrEnabled) {
dependsOn(":kotlin-stdlib-js-ir:generateFullRuntimeKLib")
dependsOn(":kotlin-stdlib-js-ir:generateReducedRuntimeKLib")
dependsOn(":kotlin-stdlib-js-ir:generateKotlinTestKLib")
dependsOn(":kotlin-stdlib-js-ir:compileKotlinJs")
systemProperty("kotlin.js.full.stdlib.path", "libraries/stdlib/js-ir/build/classes/kotlin/js/main")
dependsOn(":kotlin-stdlib-js-ir-minimal-for-test:compileKotlinJs")
systemProperty("kotlin.js.reduced.stdlib.path", "libraries/stdlib/js-ir-minimal-for-test/build/classes/kotlin/js/main")
dependsOn(":kotlin-test:kotlin-test-js-ir:compileKotlinJs")
systemProperty("kotlin.js.kotlin.test.path", "libraries/kotlin.test/js-ir/build/classes/kotlin/js/main")
}
exclude("org/jetbrains/kotlin/js/test/wasm/semantics/*")
@@ -228,9 +230,12 @@ val unzipJsShell by task<Copy> {
projectTest("wasmTest", true) {
dependsOn(unzipJsShell)
dependsOn(":kotlin-stdlib-js-ir:generateWasmRuntimeKLib")
include("org/jetbrains/kotlin/js/test/wasm/semantics/*")
val jsShellExecutablePath = File(unzipJsShell.get().destinationDir, "js").absolutePath
systemProperty("javascript.engine.path.SpiderMonkey", jsShellExecutablePath)
dependsOn(":kotlin-stdlib-js-ir:compileKotlinJs")
systemProperty("kotlin.wasm.stdlib.path", "libraries/stdlib/wasm/build/classes/kotlin/js/main")
setUpBoxTests()
}