Skip to content

Commit 07e45f3

Browse files
committed
Try to set free compile args for all projects by default
1 parent 744c991 commit 07e45f3

File tree

1 file changed

+17
-2
lines changed

1 file changed

+17
-2
lines changed

lambda-runtime/build.gradle.kts

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
import dev.mokkery.MockMode
22
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
3+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompilationTask
4+
import org.jetbrains.kotlin.gradle.tasks.KotlinCompileCommon
35

46
plugins {
57
alias(libs.plugins.kotlin.multiplatform)
@@ -16,8 +18,14 @@ kotlin {
1618
//linuxArm64() // https://youtrack.jetbrains.com/issue/KT-36871/Support-Aarch64-Linux-as-a-host-for-the-Kotlin-Native
1719
linuxX64(),
1820
).forEach {
19-
it.binaries.all {
20-
freeCompilerArgs = freeCompilerArgs + listOf("-Xallocator=std", "-Xruntime-logs=gc=info",)
21+
it.compilations.configureEach {
22+
compileTaskProvider.configure {
23+
compilerOptions {
24+
freeCompilerArgs.addAll(listOf("-Xallocator=std", "-Xruntime-logs=gc=info"))
25+
26+
//freeCompilerArgs = freeCompilerArgs + listOf("-Xallocator=std", "-Xruntime-logs=gc=info",)
27+
}
28+
}
2129
}
2230
}
2331

@@ -46,3 +54,10 @@ kotlin {
4654
mokkery {
4755
defaultMockMode.set(MockMode.autoUnit)
4856
}
57+
58+
/*
59+
tasks.withType<KotlinCompileCommon>().configureEach {
60+
compilerOptions {
61+
freeCompilerArgs.addAll(listOf("-Xallocator=std", "-Xruntime-logs=gc=info",))
62+
}
63+
}*/

0 commit comments

Comments
 (0)