Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake enablement for libjvm31 shim library #13365

Merged
merged 2 commits into from
Nov 25, 2021

Conversation

joransiu
Copy link
Member

  • Add CMake files to enable building of shim libjvm31.so library on z/OS
  • CMakeLists.txt in j9vm31 directory builds the 31-bit library in what is otherwise a 64-bit build.
    • Removes XPLINK and 64-bit compile and link options.
    • Exports the standard JNI and Invoke interface methods, which translates to EXPORTALL on z/OS.
  • Add staging of include31 generated header files, as jni.h needs to be customized for the reference
    types and various parameter struct definitions for 31-bit code to invoke 64-bit JDK.
    • Invokes generation of jni.h from jni.h.m4, and copying of jni_convert.h and jniport.h

Signed-off-by: Joran Siu joransiu@ca.ibm.com

@joransiu
Copy link
Member Author

@pshipton / @dnakamura : Do you mind reviewing? This is related to enabling CMake to build the shim library for 31/64-bit interop on z/OS. Thanks!

@pshipton pshipton added the cmake label Aug 24, 2021
@joransiu
Copy link
Member Author

@pshipton : Would appreciate another review of this PR. I fixed an additional issue w..r.t JAVA_SPEC_VERSION not being picked up properly, which affected GetModule API for Java 11+.

The extensions repo PR to stage the various libjvm31.* and headers artifacts is : ibmruntimes/openj9-openjdk-jdk#378

Internal zOS Personal Builds IDs: HYC-Jenkins: 11228 and Axxon: 16965.

runtime/j9vm31/CMakeLists.txt Outdated Show resolved Hide resolved
runtime/j9vm31/exports.cmake Show resolved Hide resolved
- Add CMake files to enable building of shim libjvm31.so library on z/OS
- CMakeLists.txt in j9vm31 directory builds the 31-bit library in what is otherwise a 64-bit build.
  - Removes XPLINK and 64-bit compile and link options.
  - Exports the standard JNI and Invoke interface methods, which translates to EXPORTALL on z/OS.
- Add staging of include31 generated header files, as jni.h needs to be customized for the reference
types and various parameter struct definitions for 31-bit code to invoke 64-bit JDK.
  - Invokes generation of jni.h from jni.h.m4, and copying of jni_convert.h and jniport.h

Signed-off-by: Joran Siu <joransiu@ca.ibm.com>
GetModule API is guarded by JAVA_SPEC_VERSION check
that requires j9cfg.h from the 'include' directory.
Add that directory for j9vm31 compiles.  This directory
needs to be placed after include31, to ensure the correct
jni headers are used.

Signed-off-by: Joran Siu <joransiu@ca.ibm.com>
@keithc-ca
Copy link
Contributor

Jenkins compile alinux64 jdk8,jdk17

@keithc-ca
Copy link
Contributor

We have no external PR testing for z/OS, but the builds for alinux succeeded.

@keithc-ca keithc-ca merged commit 73bf9f0 into eclipse-openj9:master Nov 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants