Skip to content

Commit

Permalink
Try to set free compile args for all projects by default
Browse files Browse the repository at this point in the history
  • Loading branch information
trueangle committed Oct 5, 2024
1 parent 07e45f3 commit 764e752
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 14 deletions.
21 changes: 7 additions & 14 deletions lambda-runtime/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,14 @@ plugins {
}

kotlin {
listOf(
macosArm64(),
macosX64(),
//linuxArm64() // https://youtrack.jetbrains.com/issue/KT-36871/Support-Aarch64-Linux-as-a-host-for-the-Kotlin-Native
linuxX64(),
).forEach {
it.compilations.configureEach {
compileTaskProvider.configure {
compilerOptions {
freeCompilerArgs.addAll(listOf("-Xallocator=std", "-Xruntime-logs=gc=info"))
macosArm64()
macosX64()
//linuxArm64() // https://youtrack.jetbrains.com/issue/KT-36871/Support-Aarch64-Linux-as-a-host-for-the-Kotlin-Native
linuxX64()

//freeCompilerArgs = freeCompilerArgs + listOf("-Xallocator=std", "-Xruntime-logs=gc=info",)
}
}
}
@OptIn(ExperimentalKotlinGradlePluginApi::class)
compilerOptions {
freeCompilerArgs.addAll(listOf("-Xallocator=std", "-Xruntime-logs=gc=info"))
}

sourceSets {
Expand Down
1 change: 1 addition & 0 deletions sample/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ kotlin {
it.binaries {
executable {
entryPoint = "com.github.trueangle.knative.lambda.runtime.sample.main"
freeCompilerArgs += listOf("-Xallocator=std", "-Xruntime-logs=gc=info")
}
}
}
Expand Down

0 comments on commit 764e752

Please sign in to comment.