From 7901ee0e30e455d3407c951ddd7f38a960ecfb88 Mon Sep 17 00:00:00 2001 From: Jacob Heider Date: Mon, 11 Mar 2024 15:24:58 -0400 Subject: [PATCH] fix(openjdk^11) --- projects/openjdk.org/package.yml | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/projects/openjdk.org/package.yml b/projects/openjdk.org/package.yml index 742cdb30..9a91faae 100644 --- a/projects/openjdk.org/package.yml +++ b/projects/openjdk.org/package.yml @@ -69,13 +69,16 @@ build: ARGS+=" --disable-hotspot-gtest --with-jvm-features=shenandoahgc --with-conf-name=release" MAKE_ARGS+=" CONF=release" - LLVM_VERSION_MAJOR='12' - pkgx "+llvm.org^${LLVM_VERSION_MAJOR}" - LLVM_BIN_PATH="$(realpath "{{deps.llvm.org.prefix}}/../v${LLVM_VERSION_MAJOR}/bin")" - PATH_WITHOUT_LLVM="$(echo "${PATH}" | tr ':' '\n' | grep -v '/llvm.org/' | tr '\n' ':')" - export PATH="${LLVM_BIN_PATH}:${PATH_WITHOUT_LLVM}" - clang --version | grep "clang version ${LLVM_VERSION_MAJOR}" - unset LLVM_VERSION_MAJOR LLVM_BIN_PATH PATH_WITHOUT_.LLVM + # This is hacky, but it's necessary to version the LLVM dependency by openjdk version. + if test {{hw.platform}} = "linux"; then + LLVM_VERSION_MAJOR='12' + pkgx "+llvm.org^${LLVM_VERSION_MAJOR}" + LLVM_BIN_PATH="$(realpath "{{deps.llvm.org.prefix}}/../v${LLVM_VERSION_MAJOR}/bin")" + PATH_WITHOUT_LLVM="$(echo "${PATH}" | tr ':' '\n' | grep -v '/llvm.org/' | tr '\n' ':')" + export PATH="${LLVM_BIN_PATH}:${PATH_WITHOUT_LLVM}" + clang --version | grep "clang version ${LLVM_VERSION_MAJOR}" + unset LLVM_VERSION_MAJOR LLVM_BIN_PATH PATH_WITHOUT_.LLVM + fi if: <12 - bash configure $ARGS --with-boot-jdk="$BOOT_JDK_DIR"