From c646be48202d04b0792d3ac2335cd05387c64b96 Mon Sep 17 00:00:00 2001 From: Marcin Kostrzewa Date: Mon, 28 Oct 2019 12:46:24 +0100 Subject: [PATCH] Include relevant resources for native-image generation (#262) --- Pkg/src/main/resources/Main.enso | 3 +-- build.sbt | 9 +++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Pkg/src/main/resources/Main.enso b/Pkg/src/main/resources/Main.enso index 80fcd2bfd2d..6c8c70122b4 100644 --- a/Pkg/src/main/resources/Main.enso +++ b/Pkg/src/main/resources/Main.enso @@ -1,4 +1,3 @@ @{ - print: 0; - 0 + @println [@IO,0] } \ No newline at end of file diff --git a/build.sbt b/build.sbt index 91b39527f0e..cb60c47d5f5 100644 --- a/build.sbt +++ b/build.sbt @@ -252,11 +252,12 @@ lazy val interpreter = (project in file("Interpreter")) .settings( buildNativeImage := Def .task { - val javaHome = System.getProperty("java.home") - val nativeImagePath = s"$javaHome/bin/native-image" - val classPath = (Runtime / fullClasspath).value.files.mkString(":") + val javaHome = System.getProperty("java.home") + val nativeImagePath = s"$javaHome/bin/native-image" + val classPath = (Runtime / fullClasspath).value.files.mkString(":") + val resourcesGlobOpt = "-H:IncludeResources=.*Main.enso$" val cmd = - s"$nativeImagePath --macro:truffle --no-fallback --initialize-at-build-time -cp $classPath ${(Compile / mainClass).value.get} enso" + s"$nativeImagePath $resourcesGlobOpt --macro:truffle --no-fallback --initialize-at-build-time -cp $classPath ${(Compile / mainClass).value.get} enso" cmd ! } .dependsOn(Compile / compile)