Skip to content

Commit 764e752

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

File tree

2 files changed

+8
-14
lines changed

2 files changed

+8
-14
lines changed

lambda-runtime/build.gradle.kts

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,14 @@ plugins {
1212
}
1313

1414
kotlin {
15-
listOf(
16-
macosArm64(),
17-
macosX64(),
18-
//linuxArm64() // https://youtrack.jetbrains.com/issue/KT-36871/Support-Aarch64-Linux-as-a-host-for-the-Kotlin-Native
19-
linuxX64(),
20-
).forEach {
21-
it.compilations.configureEach {
22-
compileTaskProvider.configure {
23-
compilerOptions {
24-
freeCompilerArgs.addAll(listOf("-Xallocator=std", "-Xruntime-logs=gc=info"))
15+
macosArm64()
16+
macosX64()
17+
//linuxArm64() // https://youtrack.jetbrains.com/issue/KT-36871/Support-Aarch64-Linux-as-a-host-for-the-Kotlin-Native
18+
linuxX64()
2519

26-
//freeCompilerArgs = freeCompilerArgs + listOf("-Xallocator=std", "-Xruntime-logs=gc=info",)
27-
}
28-
}
29-
}
20+
@OptIn(ExperimentalKotlinGradlePluginApi::class)
21+
compilerOptions {
22+
freeCompilerArgs.addAll(listOf("-Xallocator=std", "-Xruntime-logs=gc=info"))
3023
}
3124

3225
sourceSets {

sample/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ kotlin {
1414
it.binaries {
1515
executable {
1616
entryPoint = "com.github.trueangle.knative.lambda.runtime.sample.main"
17+
freeCompilerArgs += listOf("-Xallocator=std", "-Xruntime-logs=gc=info")
1718
}
1819
}
1920
}

0 commit comments

Comments
 (0)