On Thu, 5 Sep 2024 09:57:15 GMT, Magnus Ihse Bursie <i...@openjdk.org> wrote:
>> make/modules/java.desktop/lib/AwtLibraries.gmk line 176: >> >>> 174: >>> 175: ifneq ($(ENABLE_HEADLESS_ONLY), true) >>> 176: # We cannot link with both awt_headless and awt_xawt at the same >>> time >> >> Just a note on that. It's doable to link with both awt_headless and awt_xawt >> with some work. I did some quick experiments on that during the initial >> investigation for hermetic/static Java. > > That would require quite some work then..! The two libraries are meant as > exclusive complements to each other -- they both implement the same "entry > points", but in different ways -- one with X11 support, and one without. For > other reasons (outside of static launcher reasons) I'd like to see some > refactoring in how this is implemented, but that is completely outside this > discussion. > > For the static launcher scenario, I can't even see the point of trying to > include both? What would you accomplish by that? > > The entire point of having two libraries is that you want to be able to have > full workstation capabilities, but then be dependent on the X11 libraries, or > have limited capabilities, but skip the X11 dependency. My initial understanding was that the libawt_headless was mostly as subset of libawt_xawt, which made it possible to statically link both the headless and headful natives. Completely agree that it's outside of the current scope. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/20837#discussion_r1746136942