From 80055d959ab6d3af8b68e2206d64b6b6263c3a8d Mon Sep 17 00:00:00 2001 From: Sundararajan Athijegannathan Date: Thu, 9 Jan 2025 12:21:22 +0530 Subject: [PATCH] jextract PR #271 --- .github/workflows/test.yml | 4 ++-- build.gradle | 15 ++++++++------- samples/python3/compilesource.sh | 1 + 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 470a7277..7f013c77 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -167,7 +167,7 @@ jobs: - name: 'Build Jextract' shell: sh run: | - sh ./gradlew -Pjdk22_home=${{ matrix.DEPS_ROOT }}/jdk-toolchain -Pllvm_home=${{ matrix.DEPS_ROOT }}/llvm/image clean verify + sh ./gradlew -Pjdk23_home=${{ matrix.DEPS_ROOT }}/jdk-toolchain -Pllvm_home=${{ matrix.DEPS_ROOT }}/llvm/image clean verify - name: 'Get cached JTReg' uses: actions/cache@v4 @@ -180,4 +180,4 @@ jobs: - name: 'Run tests' shell: sh run: | - sh ./gradlew -Pjdk22_home=${{ matrix.DEPS_ROOT }}/jdk-toolchain -Pllvm_home=${{ matrix.DEPS_ROOT }}/llvm/image -Pjtreg_home=./deps/jtreg/build/images/jtreg jtreg + sh ./gradlew -Pjdk23_home=${{ matrix.DEPS_ROOT }}/jdk-toolchain -Pllvm_home=${{ matrix.DEPS_ROOT }}/llvm/image -Pjtreg_home=./deps/jtreg/build/images/jtreg jtreg diff --git a/build.gradle b/build.gradle index 04abe575..75ded85d 100644 --- a/build.gradle +++ b/build.gradle @@ -29,6 +29,7 @@ def static checkPath(String p) { } def llvm_home = project.property("llvm_home") +def jdk_home = project.property("jdk23_home") checkPath(llvm_home) checkPath("${llvm_home}/lib/clang") def clang_versions = new File("${llvm_home}/lib/clang/").list(); @@ -39,7 +40,7 @@ if (clang_versions.length == 0) { def clang_version = clang_versions[0] def buildDir = layout.buildDirectory.get() -def jextract_version = "22" +def jextract_version = "23" def jmods_dir = "$buildDir/jmods" def jextract_jmod_file = "$jmods_dir/org.openjdk.jextract.jmod" def jextract_jmod_inputs = "$buildDir/jmod_inputs" @@ -59,9 +60,9 @@ repositories { } compileJava { - options.release = 22 + options.release = 23 options.fork = true - options.forkOptions.executable = "${jdk22_home}/bin/javac${os_exe_suffix}" + options.forkOptions.executable = "${jdk_home}/bin/javac${os_exe_suffix}" } jar { @@ -104,7 +105,7 @@ task createJextractJmod(type: Exec) { delete(jextract_jmod_file) } - executable = "${jdk22_home}/bin/jmod" + executable = "${jdk_home}/bin/jmod" args = [ "create", "--module-version=$jextract_version", @@ -131,7 +132,7 @@ task createJextractImage(type: Exec) { project.mkdir "${jextract_bin_dir}" } - executable = "${jdk22_home}/bin/jlink" + executable = "${jdk_home}/bin/jlink" args = [ "--module-path=$jmods_dir", "--add-modules=org.openjdk.jextract", @@ -183,9 +184,9 @@ task createRuntimeImageForTest(type: Exec) { delete(out_dir) } - executable = "${jdk22_home}/bin/jlink" + executable = "${jdk_home}/bin/jlink" args = [ - "--module-path=$jmods_dir" + File.pathSeparator + "$jdk22_home/jmods", + "--module-path=$jmods_dir" + File.pathSeparator + "$jdk_home/jmods", "--add-modules=ALL-MODULE-PATH", "--output=$out_dir", ] diff --git a/samples/python3/compilesource.sh b/samples/python3/compilesource.sh index f11a2b7c..78f5b539 100644 --- a/samples/python3/compilesource.sh +++ b/samples/python3/compilesource.sh @@ -3,6 +3,7 @@ if [[ -z "${ANACONDA3_HOME}" ]]; then fi jextract --output src \ + -D_Float16=short \ -l :${ANACONDA3_HOME}/lib/libpython3.11.dylib \ -I ${ANACONDA3_HOME}/include/python3.11 \ -t org.python \