Removing binutils and using correct strip depending on java version
All checks were successful
continuous-integration/drone Build is passing

This commit is contained in:
david 2024-05-15 06:46:06 +02:00
parent 8f442e0e50
commit 51337c59d0
2 changed files with 7 additions and 4 deletions

View File

@ -1,6 +1,5 @@
FROM debian:stable-slim
RUN apt-get update && apt-get install -y \
binutils \
curl \
file \
unzip \

10
warp4j
View File

@ -682,15 +682,19 @@ function create_optimized_runtime() {
local platform=$1
local machine=$2
local jmods=$JAVA_DOWNLOAD_PATH/$platform/$machine/$CONCRETE_JAVA_VERSION/$UNPACKED_SUBDIR/jmods
local strip-debug=strip-debug
echo "Creating minimal runtime for $platform..."
echo "$JLINK --no-header-files --no-man-pages --strip-debug --module-path '$jmods' --add-modules $MODULES --output '$BUNDLES_PATH/$platform/$machine/$BUNDLED_DISTRO_SUBDIR'"
if [[ $JAVA_VERSION_BASE >= 13 ]]; then
$strip-debug=strip-java-debug-attributes
fi
echo "$JLINK --no-header-files --no-man-pages --$strip-debug --module-path '$jmods' --add-modules $MODULES --output '$BUNDLES_PATH/$platform/$BUNDLED_DISTRO_SUBDIR'"
"$JLINK" \
--no-header-files \
--no-man-pages \
--strip-debug \
--$strip-debug \
--module-path "$jmods" \
--add-modules $MODULES \
--output "$BUNDLES_PATH/$platform/$machine/$BUNDLED_DISTRO_SUBDIR"
--output "$BUNDLES_PATH/$platform/$BUNDLED_DISTRO_SUBDIR"
fail_if $? "Failed to optimize runtime"
}