On Fri, 21 Feb 2025 14:24:22 GMT, Aleksey Shipilev <sh...@openjdk.org> wrote:

>> Noticed this when reviewing 
>> [JDK-8349399](https://bugs.openjdk.org/browse/JDK-8349399), which had to 
>> kludgy workaround the hunk introduced by `static-libs-bundles` addition 
>> ([JDK-8337265](https://bugs.openjdk.org/browse/JDK-8337265)). I am somewhat 
>> surprised we even have `static-libs-bundles` as additional target in what I 
>> would consider a generic build-linux job! It looks cleaner to yank 
>> `static-libs-bundles` into a separate build job.
>> 
>> This effectively reverts parts of the original change, and does a few 
>> modifications:
>>  - I see no reason to store the bundles, and continuing to do so would 
>> effectively overwrite `linux-x64-bundles` when we split the static build 
>> into another job, breaking tests. Not sure why we had to publish those 
>> bundles, @dougxc? They are not used in current JDK tests, I think?
>>  - The matrix definition in `build-linux.xml` unconditionally includes 
>> `debug` configuration to override flags and suffix, I had to redo this with 
>> inline variables
>> 
>> Named the new job `linux-x64-static`, since I expect @jianglizhou to slide 
>> https://github.com/openjdk/jdk/pull/23471 just there by adding another 
>> `make-target` into that job definition.
>> 
>> I did a partial GHA run already, and I expect full run to complete without 
>> errors.
>> 
>> Testing:
>>  - [x] GHA
>
> Aleksey Shipilev has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Rename -static job to -static-libs

Yes, we should distinguish between `static-libs` and `static` JDK. Currently, 
we refer `static` JDK as a 'fully' statically linked `java` launcher, plus 
`lib/modules` and other JDK resource files needed for runtime. 

For longer term, including `static-libs-bundles` by default may be what we 
want. For example, in our current hermetic Java prototype, we release a regular 
JDK + static-libs. The final hermetic Java image creation step builds the 
single image using:

- launcher (code)
- JDK/hostpot `static-libs`
- lib/modules
- JDK resource files
- application classes and resources
- application natives and dependencies

During the image creation process, a launcher executable is linked using the 
launcher `.o` file, (needed) JDK/hotspot static libs, application natives and 
dependencies (in `.o` files or static libraries).

-------------

PR Comment: https://git.openjdk.org/jdk/pull/23715#issuecomment-2675623362

Reply via email to