Fix graal

This commit is contained in:
Nick Pavlov 2024-05-01 11:07:29 +03:00
parent 5924486895
commit 5966cc5dd2
3 changed files with 9 additions and 8 deletions

View File

@ -12,6 +12,7 @@ final case class Imports(
settings: Map[Path, Imports.PathSettings]
) {
def toIO: IOImports =
IOImports(
settings.view

View File

@ -219,8 +219,7 @@ lazy val `compiler-native-lib` = project
.settings(
name := "libaqua",
Compile / mainClass := Some("aqua.compiler.Library"),
nativeImageJvm := "graalvm-java20",
nativeImageVersion:="20.0.2",
nativeImageVersion:="22.3.1",
nativeImageOptions ++= Seq(
"--verbose",
"--no-fallback",
@ -230,6 +229,9 @@ lazy val `compiler-native-lib` = project
// and obtain bitcode files
// "-H:CompilerBackend=llvm",
// "-H:TempDirectory=temp", // Directory with bc files
),
libraryDependencies ++= Seq(
"org.graalvm.sdk" % "graal-sdk" % "24.0.1"
)
)
.dependsOn(`aqua-api`.jvm)

View File

@ -5,10 +5,8 @@ import org.graalvm.nativeimage.c.function.CEntryPoint
import org.graalvm.nativeimage.c.`type`.{CCharPointer, CCharPointerPointer, CTypeConversion}
import scala.annotation.static
import cats.effect.unsafe.implicits.global
import aqua.api.{APICompilation, AquaAPIConfig}
import aqua.api.{APICompilation, AquaAPIConfig, Imports}
import aqua.backend.api.APIBackend
import aqua.logging.LogFormatter
@ -32,7 +30,7 @@ object Library {
val result = APICompilation
.compileString(
code,
imports = Nil,
imports = Imports(Map.empty),
aquaConfig = AquaAPIConfig(),
backend = APIBackend
)