File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed
build-farm/platform-specific-configurations Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -341,6 +341,12 @@ else
341341 fi
342342fi
343343
344+ if [ " $JAVA_FEATURE_VERSION " -ge 20 ]; then
345+ 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"
347+ fi
348+ fi
349+
344350if [ " ${VARIANT} " == " ${BUILD_VARIANT_BISHENG} " ]; then
345351 # BUILD_C/CXX required for native (non-cross) RISC-V builds of Bisheng
346352 if [ -n " $CXX " ]; then
Original file line number Diff line number Diff line change @@ -122,6 +122,20 @@ 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+ }
125139# Configure reproducible build
126140# jdk-17 and jdk-19+ support reproducible builds
127141configureReproducibleBuildParameter () {
@@ -586,6 +600,7 @@ configureCommandParameters() {
586600 configureBootJDKConfigureParameter
587601 configureDevKitConfigureParameter
588602 configureLinkableRuntimeParameter
603+ configureCapstoneBuildParameter
589604 configureShenandoahBuildParameter
590605 configureMacOSCodesignParameter
591606 configureDebugParameters
You can’t perform that action at this time.
0 commit comments