Skip to content

Commit

Permalink
Fix graal
Browse files Browse the repository at this point in the history
  • Loading branch information
gurinderu committed May 1, 2024
1 parent 5924486 commit 5966cc5
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
1 change: 1 addition & 0 deletions api/api/src/main/scala/aqua/api/Imports.scala
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ final case class Imports(
settings: Map[Path, Imports.PathSettings]
) {


def toIO: IOImports =
IOImports(
settings.view
Expand Down
10 changes: 6 additions & 4 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -219,17 +219,19 @@ 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",
"--shared", // Produce shared library
"--initialize-at-run-time=aqua.logging.LogFormatter$",
// Uncomment next lines to use llvm backend
// and obtain bitcode files
// "-H:CompilerBackend=llvm",
// "-H:TempDirectory=temp", // Directory with bc 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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -32,7 +30,7 @@ object Library {
val result = APICompilation
.compileString(
code,
imports = Nil,
imports = Imports(Map.empty),
aquaConfig = AquaAPIConfig(),
backend = APIBackend
)
Expand Down

0 comments on commit 5966cc5

Please sign in to comment.