Skip to content

Commit

Permalink
jextract PR openjdk#271
Browse files Browse the repository at this point in the history
  • Loading branch information
sundararajana authored and nizarbenalla committed Jan 21, 2025
1 parent 5855b99 commit 80055d9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
15 changes: 8 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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"
Expand All @@ -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 {
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
]
Expand Down
1 change: 1 addition & 0 deletions samples/python3/compilesource.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit 80055d9

Please sign in to comment.