Skip to content

Commit 99efea9

Browse files
committed
Move capstone detection and configargs back to linux.sh
Signed-off-by: Stewart X Addison <[email protected]>
1 parent a681a01 commit 99efea9

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

build-farm/platform-specific-configurations/linux.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,9 +341,9 @@ else
341341
fi
342342
fi
343343

344-
if [ "$JAVA_FEATURE_VERSION" -ge 20 ]; then
344+
if [ "$JAVA_FEATURE_VERSION" -ge 20 -a "${ARCHITECTURE}" = "x64" -o "${ARCHITECTURE}" = "aarch64" -a "${VARIANT}" == "${BUILD_VARIANT_TEMURIN}" ]; then
345345
if [ -r /usr/local/lib/libcapstone.so.4 ]; then
346-
export CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM} --with-capstone=/usr/local"
346+
export CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM} --enable-hsdis-bundling --with-hsdis=capstone --with-capstone=/usr/local"
347347
fi
348348
fi
349349

sbin/build.sh

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -122,20 +122,6 @@ configureShenandoahBuildParameter() {
122122
fi
123123
}
124124

125-
# capstone disassembler support is available in JDK19+
126-
configureCapstoneBuildParameter() {
127-
if [[ "${BUILD_CONFIG[OPENJDK_FEATURE_NUMBER]}" -ge 19 && "${BUILD_CONFIG[OS_KERNEL_NAME]}" = "linux" ]]; then
128-
# Ref: https://github.com/adoptium/jdk21/blob/c86f4dea9529640cd3234c5cad2f36f3201b1385/make/Hsdis.gmk#L45
129-
if [ "${ARCHITECTURE}" = "x64" -o "${ARCHITECTURE}" = "aarch64" ]; then
130-
echo Configuring with hsdis capstone bundling support
131-
addConfigureArg "--enable-hsdis-bundling" ""
132-
addConfigureArg "--with-hsdis=" "capstone"
133-
addConfigureArg "--with-capstone=" "/usr/local"
134-
else
135-
echo Not configuring with hsdis/capstone support as we are not building on x64 or aarch64
136-
fi
137-
fi
138-
}
139125
# Configure reproducible build
140126
# jdk-17 and jdk-19+ support reproducible builds
141127
configureReproducibleBuildParameter() {

0 commit comments

Comments
 (0)