Move to truffle object model

This commit is contained in:
Islon Scherer
2026-04-15 17:21:29 +02:00
parent 2e0b4a3a97
commit 750e983366
28 changed files with 638 additions and 174 deletions
+9 -11
View File
@@ -55,13 +55,12 @@ abstract class NativeImageBuild : DefaultTask() {
@get:Inject protected abstract val execOperations: ExecOperations
private val graalVm: Provider<BuildInfo.GraalVm> =
arch.map { a ->
when (a) {
Architecture.AMD64 -> buildInfo.graalVmAmd64
Architecture.AARCH64 -> buildInfo.graalVmAarch64
}
private val graalVm: Provider<BuildInfo.GraalVm> = arch.map { a ->
when (a) {
Architecture.AMD64 -> buildInfo.graalVmAmd64
Architecture.AARCH64 -> buildInfo.graalVmAarch64
}
}
private val buildInfo: BuildInfo = project.extensions.getByType(BuildInfo::class.java)
@@ -132,7 +131,7 @@ abstract class NativeImageBuild : DefaultTask() {
add(imageName.get())
// the actual limit (currently) used by native-image is this number + 1400 (idea is to
// compensate for Truffle's own nodes)
add("-H:MaxRuntimeCompileMethods=1800")
add("-H:MaxRuntimeCompileMethods=2000")
add("-H:+EnforceMaxRuntimeCompileMethods")
add("--enable-url-protocols=http,https")
add("-H:+ReportExceptionStackTraces")
@@ -151,10 +150,9 @@ abstract class NativeImageBuild : DefaultTask() {
}
// native-image rejects non-existing class path entries -> filter
add("--class-path")
val pathInput =
classpath.filter {
it.exists() && !exclusions.any { exclude -> it.name.contains(exclude) }
}
val pathInput = classpath.filter {
it.exists() && !exclusions.any { exclude -> it.name.contains(exclude) }
}
add(pathInput.asPath)
// make sure dev machine stays responsive (15% slowdown on my laptop)
val processors =