Skip to content

Commit e09c788

Browse files
Fix Native build
1 parent b58ca5c commit e09c788

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

build.sc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ object sjsonnet extends Module {
131131
this.millSourcePath / "src-jvm-native"
132132
)
133133
def releaseMode = ReleaseMode.ReleaseFast
134-
def nativeLTO = LTO.Thin
134+
def nativeLTO = LTO.Full
135135

136136
object test extends ScalaNativeTests with CrossTests {
137137
def releaseMode = ReleaseMode.Debug

build_assets.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
set -euo pipefail
3+
4+
# TODO: move that into mill.
5+
6+
VERSION="0.5.0"
7+
SCALA_VERSION="3.3.5"
8+
OS=$(uname -s)
9+
ARCH=$(uname -m)
10+
TMPDIR=$(mktemp -d)
11+
12+
echo "Building assets for Scala $SCALA_VERSION on $OS/$ARCH (for native)"
13+
14+
./mill "sjsonnet.js[$SCALA_VERSION].fullOpt"
15+
./mill "sjsonnet.jvm[$SCALA_VERSION].assembly"
16+
./mill "sjsonnet.native[$SCALA_VERSION].nativeLink"
17+
18+
cp -r ./out/sjsonnet/js/$SCALA_VERSION/fullOpt.dest/out.js "$TMPDIR/sjsonnet-$VERSION.js"
19+
cp -r ./out/sjsonnet/js/$SCALA_VERSION/fullOpt.dest/out.js.map "$TMPDIR/sjsonnet-$VERSION.js.map"
20+
cp -r ./out/sjsonnet/jvm/$SCALA_VERSION/assembly.dest/out.jar "$TMPDIR/sjsonnet-$VERSION.jar"
21+
cp -r ./out/sjsonnet/native/$SCALA_VERSION/nativeLink.dest/out "$TMPDIR/sjsonnet-$VERSION-$OS-$ARCH"
22+
23+
pushd "$TMPDIR" || exit 1
24+
sha256sum sjsonnet-* > sums.sha
25+
popd || exit 1
26+
27+
echo "Assets built and checksums generated in $TMPDIR"

0 commit comments

Comments
 (0)