Skip to content

Commit bd8f216

Browse files
committed
Add linuxArm64 support
1 parent 326ada4 commit bd8f216

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

lambda-events/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ plugins {
44
}
55

66
kotlin {
7-
linuxX64()
7+
val isArm64 = System.getProperty("os.arch") == "aarch64"
8+
val nativeTarget = if (isArm64) linuxArm64() else linuxX64()
89

910
sourceSets {
1011
commonMain.dependencies {

lambda-runtime/build.gradle.kts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ plugins {
44
}
55

66
kotlin {
7-
linuxX64()
7+
val isArm64 = System.getProperty("os.arch") == "aarch64"
8+
val nativeTarget = if (isArm64) linuxArm64() else linuxX64()
89

910
sourceSets {
1011
commonMain.dependencies {

sample/build.gradle.kts

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,12 @@ plugins {
55

66
// todo is it a right way to specify main entry point for linux64?
77
kotlin {
8+
val isArm64 = System.getProperty("os.arch") == "aarch64"
9+
val nativeTarget = if (isArm64) linuxArm64() else linuxX64()
810

9-
listOf(
10-
linuxX64()
11-
).forEach {
12-
it.binaries {
13-
executable {
14-
entryPoint = "com.github.trueangle.knative.lambda.runtime.sample.main"
15-
}
11+
nativeTarget.binaries {
12+
executable {
13+
entryPoint = "com.github.trueangle.knative.lambda.runtime.sample.main"
1614
}
1715
}
1816

0 commit comments

Comments
 (0)