PR with static-jdk launcher
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Tue Sep 3 13:08:14 UTC 2024
Hi,
I just wanted to let you know that there is now a PR with an initial
implementation of a static java launcher:
https://github.com/openjdk/jdk/pull/20837
Some noteworthy limitations:
1) Support for hiding local symbols in static libraries are not yet
implemented. This mean that there are symbol clashes between some
libraries. As a result, I have temporarily disabled a few libraries.
This in turn means that the native code is not complete, so not all JDK
functionality is present. How much is missing depends on which platform
you run.
2) Only the java launcher is present, no other JDK launchers (including
javac) are present. This means that it is not possible to run JTReg
tests. I have an idea on how to address this in the future.
3) On Windows, changes need to be done in the launcher code; similar to
what has been done for Linux and macOS. As a result of this, the static
launcher builds just fine, but crashes at startup. I don't think it is
hard to fix, but I have not prioritized this. The reason is that the
inclusion of a working static launcher for macOS and Linux will help the
Hermetic Java project along, and the Windows launcher can be fixed in
the meantime.
4) This is not tested on AIX nor any other platforms apart from Linux,
macOS and Windows. It is tested with both gcc and clang on Linux.
5) There are still a lot of untidy and badly structured code surrounding
static libraries. I hope to address some of this mess as follow-up work.
6) This PR does not address the issue that all native files are compiled
twice. That is a completely orthogonal problem to this.
/Magnus
More information about the build-dev
mailing list