Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,17 @@ jobs:
with:
name: ${{ matrix.artifact }}
path: bloop-artifacts/${{ matrix.artifact }}

- name: Sanity check of the generated binary
run: sbt publishLocal

- name: Check on windows
if: matrix.os == 'windows-latest'
run: cli/target/graalvm-native-image/bloop-cli.exe about

- name: Check on other systems
if: matrix.os == 'windows-latest'
run: cli/target/graalvm-native-image/bloop-cli about

release:
name: Release version on ${{ matrix.os }}
Expand Down
9 changes: 8 additions & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ lazy val cliSettings = Seq(
graalVMNativeImageOptions ++= {
val reflectionFile = (Compile / Keys.sourceDirectory).value./("graal")./("reflection.json")
assert(reflectionFile.exists, s"${reflectionFile.getAbsolutePath()} doesn't exist")
List(
val baseOptions = List(
"--add-exports=org.graalvm.nativeimage.base/com.oracle.svm.util=ALL-UNNAMED",
"--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.jni=ALL-UNNAMED",
"--add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.jdk=ALL-UNNAMED",
Expand All @@ -242,6 +242,13 @@ lazy val cliSettings = Seq(
"--initialize-at-build-time=scala.runtime.StructuralCallSite",
"--initialize-at-build-time=scala.runtime.EmptyMethodCache"
)

if (scala.util.Properties.isWin) {
val staticLibs = (Compile / Keys.sourceDirectory).value./("graal")./("static-libs")
baseOptions :+ s"-H:CLibraryPath=${staticLibs}"
} else {
baseOptions
}
}
)

Expand Down
Binary file not shown.
11 changes: 10 additions & 1 deletion cli/src/main/scala/bloop/cli/Directories.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package bloop.cli
import scala.util.Properties

import dev.dirs.ProjectDirectories
import dev.dirs.impl.Windows
import dev.dirs.jni.WindowsJni

trait Directories {
Expand Down Expand Up @@ -31,7 +32,15 @@ object Directories {
}

def default(): Directories = {
OsLocations(ProjectDirectories.from(null, null, "ScalaCli", WindowsJni.getJdkAwareSupplier()))
val name = "ScalaCli"
val windows =
if (coursier.paths.Util.useJni())
WindowsJni.getJdkAwareSupplier()
else
Windows.getDefaultSupplier()

OsLocations(ProjectDirectories.from(null, null, name, windows))

}

def under(dir: os.Path): Directories =
Expand Down
Loading