-
Bug
-
Resolution: Unresolved
-
P4
-
24
Before this change, the code that loaded the AWT library in awt_LoadLibrary.c was conditioned on whether libawt itself was statically linked. Now, it is conditioned on whether libjvm is statically linked, which is not the same. This effectively limits the dynamically linked libawt.so to work only with the dynamically linked libjvm.so, without good reason.
Mixing statically and dynamically linked JDK libraries is important for GraalVM Native Image. Native binaries produced by native-image statically link core JDK libraries but rely on dynamically linked libraries for AWT support. However, the coupling introduced by the JVM_IsStaticallyLinked API between libawt and libjvm appears to overlook the mixed use of JDK libraries.
On the other hand, the approach taken by this change for libjli, which involves a library-specific API, does not have this problem. Therefore, applying the same approach to libawt (and libjdwp) would eliminate the artificial coupling and restore the mixed use of JDK libraries to work as before.
- relates to
-
JDK-8338768 Introduce runtime lookup to check for static builds
-
- Resolved
-