Skip to content

Commit

Permalink
Make library linkage issues an error.
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrtwhite committed Jul 21, 2023
1 parent 97a85e9 commit f7bd7a3
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions zipline-testing/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import org.jetbrains.kotlin.gradle.dsl.KotlinJsCompile
import org.jetbrains.kotlin.gradle.plugin.PLUGIN_CLASSPATH_CONFIGURATION_NAME
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
import org.jetbrains.kotlin.gradle.tasks.KotlinNativeCompile

plugins {
kotlin("multiplatform")
Expand Down Expand Up @@ -87,11 +88,18 @@ kotlin {
}
}

// TODO upstream this to ZiplinePlugin
tasks {
withType(KotlinJsCompile::class.java).all {
// TODO upstream this to ZiplinePlugin
withType(KotlinJsCompile::class).all {
kotlinOptions {
freeCompilerArgs += listOf("-Xir-per-module")
}
}

// https://kotlinlang.org/docs/whatsnew19.html#library-linkage-in-kotlin-native
withType(KotlinNativeCompile::class).all {
kotlinOptions {
freeCompilerArgs += listOf("-Xpartial-linkage-loglevel=ERROR")
}
}
}

0 comments on commit f7bd7a3

Please sign in to comment.