Linux builds are statically linked

This commit is contained in:
Michiel Borkent 2020-02-23 12:04:18 +01:00 committed by GitHub
parent a4b4ce43a4
commit b8469180f9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 25 deletions

View file

@ -70,6 +70,7 @@ jobs:
GRAALVM_HOME: /home/circleci/graalvm-ce-java8-19.3.0 GRAALVM_HOME: /home/circleci/graalvm-ce-java8-19.3.0
BABASHKA_PLATFORM: linux # used in release script BABASHKA_PLATFORM: linux # used in release script
BABASHKA_TEST_ENV: native BABASHKA_TEST_ENV: native
BABASHKA_STATIC: true
steps: steps:
- checkout - checkout
- run: - run:

View file

@ -15,19 +15,12 @@ fi
BABASHKA_VERSION=$(cat resources/BABASHKA_VERSION) BABASHKA_VERSION=$(cat resources/BABASHKA_VERSION)
# # We also need to AOT sci, else something didn't work in the Mac build on CircleCI
# # See https://github.com/oracle/graal/issues/1613
# ( cd /tmp; git clone https://github.com/borkdude/sci 2> /dev/null || true )
# mkdir -p src/sci
# cp -R /tmp/sci/src/* src
export JAVA_HOME=$GRAALVM_HOME export JAVA_HOME=$GRAALVM_HOME
lein with-profiles +reflection do run lein with-profiles +reflection do run
lein do clean, uberjar lein do clean, uberjar
$GRAALVM_HOME/bin/native-image \ args=( -jar target/babashka-$BABASHKA_VERSION-standalone.jar \
-jar target/babashka-$BABASHKA_VERSION-standalone.jar \
-H:Name=bb \ -H:Name=bb \
-H:+ReportExceptionStackTraces \ -H:+ReportExceptionStackTraces \
-J-Dclojure.spec.skip-macros=true \ -J-Dclojure.spec.skip-macros=true \
@ -44,6 +37,12 @@ $GRAALVM_HOME/bin/native-image \
--verbose \ --verbose \
--no-fallback \ --no-fallback \
--no-server \ --no-server \
"$BABASHKA_XMX" "$BABASHKA_XMX" )
if [ "$BABASHKA_STATIC" = "true" ]; then
args+=("--static")
fi
$GRAALVM_HOME/bin/native-image "${args[@]}"
lein clean lein clean