Skip to content

Commit 55ff16f

Browse files
committed
fix(cli): build both debug and release natives in release mode
Signed-off-by: Sam Gammon <[email protected]>
1 parent 207fba1 commit 55ff16f

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

packages/cli/build.gradle.kts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2411,11 +2411,14 @@ tasks {
24112411

24122412
processResources {
24132413
dependsOn(
2414-
":packages:graalvm:buildRustNativesForHost",
2414+
":packages:graalvm:buildRustNativesForHostDebug",
24152415
prepKotlinResources,
24162416
packSamples,
24172417
allSamplePackTasks,
24182418
)
2419+
if (nativesType == "release") {
2420+
dependsOn(":packages:graalvm:buildRustNativesForHostRelease")
2421+
}
24192422
filterResources()
24202423

24212424
from(builtSamples) {

packages/graalvm/build.gradle.kts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,19 @@ val buildRustNativesForHostRelease by tasks.registering(Exec::class) {
782782
outputs.dir(targetDir)
783783
}
784784

785+
val buildRustNativesForHostDebug by tasks.registering(Exec::class) {
786+
workingDir(rootDir)
787+
dependsOn("buildThirdPartyNatives")
788+
789+
executable = "cargo"
790+
args(baseCargoFlags)
791+
environment("JAVA_HOME", System.getProperty("java.home"))
792+
environment("MACOSX_DEPLOYMENT_TARGET", "15.0")
793+
794+
outputs.upToDateWhen { true }
795+
outputs.dir(targetDir)
796+
}
797+
785798
val buildRustNativesForHost by tasks.registering(Exec::class) {
786799
workingDir(rootDir)
787800
dependsOn("buildThirdPartyNatives")

0 commit comments

Comments
 (0)