Skip to content

Commit

Permalink
Merge pull request #20096 from JasonFengJ9/jdk24staticbuild
Browse files Browse the repository at this point in the history
JDK24 adds JVM_IsStaticallyLinked(void)
  • Loading branch information
keithc-ca authored Sep 3, 2024
2 parents 566a1b7 + 8cd1362 commit 0a83a77
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions runtime/j9vm/exports.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -463,6 +463,7 @@ endif()
if(NOT JAVA_SPEC_VERSION LESS 24)
jvm_add_exports(jvm
JVM_IsContainerized
JVM_IsStaticallyLinked
)
endif()

Expand Down
1 change: 1 addition & 0 deletions runtime/j9vm/j9vmnatives.xml
Original file line number Diff line number Diff line change
Expand Up @@ -476,5 +476,6 @@ SPDX-License-Identifier: EPL-2.0 OR Apache-2.0 OR GPL-2.0-only WITH Classpath-ex
<exports group="jdk24">
<!-- Additions for Java 24 (General) -->
<export name="JVM_IsContainerized"/>
<export name="JVM_IsStaticallyLinked"/>
</exports>
</exportlists>
12 changes: 12 additions & 0 deletions runtime/j9vm/javanextvmi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -829,6 +829,18 @@ JVM_IsContainerized(void)

return isContainerized;
}

/**
* @brief Determine if the JVM is statically linked, always returns JNI_FALSE.
*
* @return JNI_FALSE
*/
JNIEXPORT jboolean JNICALL
JVM_IsStaticallyLinked(void)
{
/* OpenJDK removed static builds using --enable-static-build. */
return JNI_FALSE;
}
#endif /* JAVA_SPEC_VERSION >= 24 */

} /* extern "C" */
2 changes: 2 additions & 0 deletions runtime/redirector/forwarders.m4
Original file line number Diff line number Diff line change
Expand Up @@ -444,3 +444,5 @@ _IF([JAVA_SPEC_VERSION >= 23],
[_X(JVM_GetCDSConfigStatus, JNICALL, false, jint, void)])
_IF([JAVA_SPEC_VERSION >= 24],
[_X(JVM_IsContainerized, JNICALL, false, jboolean, void)])
_IF([JAVA_SPEC_VERSION >= 24],
[_X(JVM_IsStaticallyLinked, JNICALL, false, jboolean, void)])

0 comments on commit 0a83a77

Please sign in to comment.