Re: RFR: 8333268: Fixes for static build [v4]

2024-06-21 Thread Jiangli Zhou
On Wed, 19 Jun 2024 15:15:43 GMT, Magnus Ihse Bursie wrote: >> This patch contains a set of changes to improve static builds. They will >> pave the way for implementing a full static-only java launcher. The changes >> here will: >> >> 1) Make sure non-exported symbols are made local in the

Re: RFR: 8333268: Fixes for static build [v4]

2024-06-21 Thread Jiangli Zhou
On Wed, 19 Jun 2024 15:15:43 GMT, Magnus Ihse Bursie wrote: >> This patch contains a set of changes to improve static builds. They will >> pave the way for implementing a full static-only java launcher. The changes >> here will: >> >> 1) Make sure non-exported symbols are made local in the

Re: RFR: 8333268: Fixes for static build [v4]

2024-06-21 Thread Jiangli Zhou
On Wed, 19 Jun 2024 15:15:43 GMT, Magnus Ihse Bursie wrote: >> This patch contains a set of changes to improve static builds. They will >> pave the way for implementing a full static-only java launcher. The changes >> here will: >> >> 1) Make sure non-exported symbols are made local in the

Re: RFR: 8333268: Fixes for static build [v4]

2024-06-21 Thread Jiangli Zhou
On Wed, 19 Jun 2024 15:15:43 GMT, Magnus Ihse Bursie wrote: >> This patch contains a set of changes to improve static builds. They will >> pave the way for implementing a full static-only java launcher. The changes >> here will: >> >> 1) Make sure non-exported symbols are made local in the

Re: RFR: 8333268: Fixes for static build [v4]

2024-06-21 Thread Jiangli Zhou
On Wed, 19 Jun 2024 15:15:43 GMT, Magnus Ihse Bursie wrote: >> This patch contains a set of changes to improve static builds. They will >> pave the way for implementing a full static-only java launcher. The changes >> here will: >> >> 1) Make sure non-exported symbols are made local in the

Re: RFR: 8333268: Fixes for static build [v4]

2024-06-21 Thread Jiangli Zhou
On Wed, 19 Jun 2024 15:15:43 GMT, Magnus Ihse Bursie wrote: >> This patch contains a set of changes to improve static builds. They will >> pave the way for implementing a full static-only java launcher. The changes >> here will: >> >> 1) Make sure non-exported symbols are made local in the

Re: RFR: 8333268: Fixes for static build [v4]

2024-06-20 Thread Jiangli Zhou
On Wed, 19 Jun 2024 15:15:43 GMT, Magnus Ihse Bursie wrote: >> This patch contains a set of changes to improve static builds. They will >> pave the way for implementing a full static-only java launcher. The changes >> here will: >> >> 1) Make sure non-exported symbols are made local in the

Re: RFR: 8333268: Fixes for static build [v4]

2024-06-20 Thread Jiangli Zhou
On Wed, 19 Jun 2024 15:15:43 GMT, Magnus Ihse Bursie wrote: >> This patch contains a set of changes to improve static builds. They will >> pave the way for implementing a full static-only java launcher. The changes >> here will: >> >> 1) Make sure non-exported symbols are made local in the

Re: RFR: 8333268: Fixes for static build [v4]

2024-06-20 Thread Jiangli Zhou
On Wed, 19 Jun 2024 15:15:43 GMT, Magnus Ihse Bursie wrote: >> This patch contains a set of changes to improve static builds. They will >> pave the way for implementing a full static-only java launcher. The changes >> here will: >> >> 1) Make sure non-exported symbols are made local in the

Re: RFR: 8333268: Fixes for static build [v2]

2024-06-20 Thread Jiangli Zhou
On Tue, 18 Jun 2024 17:57:29 GMT, Magnus Ihse Bursie wrote: >> Magnus Ihse Bursie has updated the pull request with a new target base due >> to a merge or a rebase. The incremental webrev excludes the unrelated >> changes brought in by the merge/rebase. The pull request contains seven >>

Re: RFR: 8333189: Make sure clang on linux uses lld as linker

2024-05-29 Thread Jiangli Zhou
On Wed, 29 May 2024 15:10:58 GMT, Jiangli Zhou wrote: >> When compiling with clang on linux, clang can decide to pick up the bfd >> linker instead of lld, the LLVM linker. This will invalidate assumptions >> about command lines that are passed on to the linker. We should us

Re: RFR: 8333189: Make sure clang on linux uses lld as linker

2024-05-29 Thread Jiangli Zhou
On Wed, 29 May 2024 15:01:27 GMT, Magnus Ihse Bursie wrote: > When compiling with clang on linux, clang can decide to pick up the bfd > linker instead of lld, the LLVM linker. This will invalidate assumptions > about command lines that are passed on to the linker. We should use > -fuse-ld=lld

Re: Hermetic Java project meeting

2024-05-28 Thread Jiangli Zhou
On Tue, May 28, 2024 at 9:09 AM Magnus Ihse Bursie < magnus.ihse.bur...@oracle.com> wrote: > On 2024-05-07 06:04, Jiangli Zhou wrote: > > I did think I correctly changed every dynamic check that you had added > to a compile-time check, so it bewilders me somewhat when you

Re: Hermetic Java project meeting

2024-05-21 Thread Jiangli Zhou
the #ifdef changes. Best, Jiangli On Mon, May 20, 2024 at 10:17 PM Jiangli Zhou wrote: > On Tue, May 7, 2024 at 5:26 AM Magnus Ihse Bursie < > magnus.ihse.bur...@oracle.com> wrote: > >> On 2024-05-07 06:04, Jiangli Zhou wrote: >> >> On Tue, Apr 30, 2024 at 5:42 AM Magnu

Re: Hermetic Java project meeting

2024-05-20 Thread Jiangli Zhou
On Tue, May 7, 2024 at 5:26 AM Magnus Ihse Bursie < magnus.ihse.bur...@oracle.com> wrote: > On 2024-05-07 06:04, Jiangli Zhou wrote: > > On Tue, Apr 30, 2024 at 5:42 AM Magnus Ihse > Bursie wrote: > > I am not sure why clang insisted on picking up ld and not lld. I rem

Re: Hermetic Java project meeting

2024-05-06 Thread Jiangli Zhou
On Tue, Apr 30, 2024 at 5:42 AM Magnus Ihse Bursie wrote: > > > On 2024-04-26 03:15, Jiangli Zhou wrote: > > On Thu, Apr 25, 2024 at 9:28 AM Magnus Ihse Bursie > > wrote: > >> > >> Just to be more clear, that's with using `objcopy` to localize >

Re: Hermetic Java project meeting

2024-04-25 Thread Jiangli Zhou
On Thu, Apr 25, 2024 at 9:28 AM Magnus Ihse Bursie wrote: > > > Just to be more clear, that's with using `objcopy` to localize non-exported > symbols for all JDK static libraries and libjvm.a, not just libjvm.a right? > > Yes. > > > Can you please include the compiler or linker errors on

Re: Hermetic Java project meeting

2024-04-24 Thread Jiangli Zhou
Magnus, thanks for the update! Looks like you've made some good progress. Please see my comments below. On Tue, Apr 23, 2024 at 3:42 AM Magnus Ihse Bursie < magnus.ihse.bur...@oracle.com> wrote: > I will not be able to participate in the meeting today. > > Let me report a bit on my work this

Re: Hermetic Java project meeting

2024-04-16 Thread Jiangli Zhou
On Tue, Apr 16, 2024 at 12:39 PM Jiangli Zhou wrote: > > Magnus, thanks for the meeting summary! Please see clarifications > below, to avoid any confusion. > > On Tue, Apr 16, 2024 at 11:27 AM Magnus Ihse Bursie > wrote: > > > > This is my summary of wh

Re: Questions about the Hermetic Java project

2024-04-16 Thread Jiangli Zhou
On Tue, Apr 16, 2024 at 9:20 AM Jiangli Zhou wrote: > > On Tue, Apr 16, 2024 at 8:30 AM Magnus Ihse Bursie > wrote: > > > > Jiangli, > > > > First of all: I tried building the leyden branch "hermetic-java-runtime" > > but failed. :-( I tried

Re: Hermetic Java project meeting

2024-04-16 Thread Jiangli Zhou
Magnus, thanks for the meeting summary! Please see clarifications below, to avoid any confusion. On Tue, Apr 16, 2024 at 11:27 AM Magnus Ihse Bursie wrote: > > This is my summary of what was said in today's meeting: > > * Jiangli reported that her team had done extensive testing and not seen >

Re: Questions about the Hermetic Java project

2024-04-16 Thread Jiangli Zhou
r a better place. Let's discuss more on the rest of the topics below during our meeting today. We can update on the mailing list about the discussion, if others are interested. Best, Jiangli > > I would very much like to test it out myself to check this static java > launcher that you are c

Re: Questions about the Hermetic Java project

2024-04-15 Thread Jiangli Zhou
Magnus, thanks for the response. Please see comments inlined below. On Fri, Apr 12, 2024 at 4:52 AM Magnus Ihse Bursie wrote: > > On 2024-04-02 21:16, Jiangli Zhou wrote: > > Hi Magnus, > > In today's zoom meeting with Alan, Ron, Liam and Chuck, we (briefly) > discusse

Re: RFR: 8326587: Separate out Microsoft toolchain linking [v4]

2024-02-27 Thread Jiangli Zhou
On Tue, 27 Feb 2024 11:06:15 GMT, Magnus Ihse Bursie wrote: >> This was actually an important part of this PR, trying to combat the all too >> general solution we had when trying to combine microsoft and non-microsoft >> linking. On all Unix-style linkers, the option to mark the output file is

Re: RFR: 8326587: Separate out Microsoft toolchain linking [v4]

2024-02-26 Thread Jiangli Zhou
On Mon, 26 Feb 2024 11:03:19 GMT, Magnus Ihse Bursie wrote: >> There is not much overlap on how linking is done on Windows on one hand, and >> on all Unix platforms on the other. This makes Link.gmk basically consists >> of two parts, each in it own half of if statements, and the few common

Re: Hotspot symbol visibility

2024-02-15 Thread Jiangli Zhou
Hi Magnus, For hotspot symbols that need to be exported, when statically linking the launcher executable using libjvm.a, we use lld's `-Wl,--export-dynamic-symbol-list=` option. Those exported symbols can be used outside the VM code, e.g. in agent. Our friend(s) in c++ compiler/toolchain added

Re: Questions about the Hermetic Java project

2024-02-15 Thread Jiangli Zhou
On Wed, Feb 14, 2024 at 5:07 PM Jiangli Zhou wrote: > > Hi Magnus, > > Thanks for looking into this from the build perspective. > > On Wed, Feb 14, 2024 at 1:00 AM Magnus Ihse Bursie > wrote: > > > > First some background for build-dev: I have spent s

Re: Questions about the Hermetic Java project

2024-02-14 Thread Jiangli Zhou
Hi Magnus, Thanks for looking into this from the build perspective. On Wed, Feb 14, 2024 at 1:00 AM Magnus Ihse Bursie wrote: > > First some background for build-dev: I have spent some time looking at > the build implications of the Hermetic Java effort, which is part of > Project Leyden. A

Re: RFR: 8311846: Resolve duplicate 'Thread' related symbols with JDK static linking

2024-01-30 Thread Jiangli Zhou
On Wed, 17 Jan 2024 00:14:58 GMT, Jiangli Zhou wrote: > Please review this PR with a simple solution for resolving duplicate `Thread` > symbol issue. In https://github.com/openjdk/jdk/pull/14808 comments, there > was an alternative suggestion to redefine the symbol at b

Re: RFR: 8310454: Introduce static-libs-graal bundle

2023-08-24 Thread Jiangli Zhou
On Wed, 23 Aug 2023 21:13:07 GMT, Erik Joelsson wrote: > [JDK-8307858](https://bugs.openjdk.org/browse/JDK-8307858) added libjvm.a to > the set of static-libs in the static-libs image and subsequently the > static-libs bundle. The main user of the existing static-image was the graal > build,

Re: [jdk21] RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries

2023-06-21 Thread Jiangli Zhou
On Wed, 21 Jun 2023 17:09:58 GMT, Kevin Rushforth wrote: > Since this Enhancement was rejected for JDK 21, this PR should be closed. Closing without integration accordingly, thanks. - PR Comment: https://git.openjdk.org/jdk21/pull/26#issuecomment-1601273074

[jdk21] Withdrawn: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries

2023-06-21 Thread Jiangli Zhou
On Fri, 16 Jun 2023 20:36:07 GMT, Jiangli Zhou wrote: > 8307858: [REDO] JDK-8307194 Add make target for optionally building a > complete set of all JDK and hotspot libjvm static libraries This pull request has been closed without being integrated. - PR: https://git.openj

Withdrawn: 8303796: Optionally build fully statically linked JDK image

2023-06-20 Thread Jiangli Zhou
On Fri, 28 Apr 2023 01:03:28 GMT, Jiangli Zhou wrote: > Initial implementation for supporting building a fully statically linked > (with a desired set of JDK native libraries and libjvm) Java launcher > executable, which is named as 'javastatic'. > > In this PR, the suppor

Re: [jdk21] RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries

2023-06-20 Thread Jiangli Zhou
On Tue, 20 Jun 2023 17:25:16 GMT, Erik Joelsson wrote: > The changes look ok. Thanks. I'll wait for approval on https://bugs.openjdk.org/browse/JDK-8307858 as well. - PR Comment: https://git.openjdk.org/jdk21/pull/26#issuecomment-1599256118

Re: [jdk21] RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries

2023-06-20 Thread Jiangli Zhou
On Tue, 20 Jun 2023 17:24:03 GMT, Erik Joelsson wrote: > > @erikj - You did a round of Mach5 testing on the JDK22 version of this fix. > > Do you have plans to redo that testing for the JDK21 backport? > > I have done testing of the JDK 21 version of the patch and it's running > cleanly.

Re: RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries

2023-06-16 Thread Jiangli Zhou
On Fri, 16 Jun 2023 22:08:19 GMT, Daniel D. Daugherty wrote: > GHA is failing on windows; is this related to this PR or something else? The windows build failures occur with other PRs as well, e.g. https://github.com/openjdk/jdk21/pull/24/checks?check_run_id=14317258603. They should be

Re: RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries

2023-06-16 Thread Jiangli Zhou
On Fri, 16 Jun 2023 20:52:13 GMT, Kevin Rushforth wrote: > As a P4 enhancement, this doesn't meet the criteria for integration into JDK > 21 during [Rampdown Phase > 1](https://mail.openjdk.org/pipermail/jdk-dev/2023-June/007911.html). You > could request late approval to get this enhancement

RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries

2023-06-16 Thread Jiangli Zhou
8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries - Commit messages: - Backport 45414fc2dfa41cbbfc6de7fec15eb47f41cf8986 Changes: https://git.openjdk.org/jdk21/pull/26/files Webrev:

Integrated: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries

2023-06-12 Thread Jiangli Zhou
On Fri, 19 May 2023 20:18:53 GMT, Jiangli Zhou wrote: > Original description for JDK-8307194 change: > - > This PR is branched from the makefile changes for > https://bugs.openjdk.org/browse/JDK-8303796 and contains the following for > handling the JDK/hotspot s

Re: RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v9]

2023-06-11 Thread Jiangli Zhou
failures on > macosx- builds. On darwin (https://www.unix.com/man-page/osx/1/ar/), > `ar` does not support @argument_file. The updated change avoids using > @argument_file for `ar`. > > The partial linking change is done in make/common/NativeCompilation.gmk. The > flag related change i

Re: RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v8]

2023-06-09 Thread Jiangli Zhou
failures on > macosx- builds. On darwin (https://www.unix.com/man-page/osx/1/ar/), > `ar` does not support @argument_file. The updated change avoids using > @argument_file for `ar`. > > The partial linking change is done in make/common/NativeCompilation.gmk. The > flag related change i

Re: RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v7]

2023-06-09 Thread Jiangli Zhou
On Fri, 9 Jun 2023 20:03:23 GMT, Erik Joelsson wrote: > All our builds succeeded, so this is looking pretty good now. Just a minor > suggestion left. Thanks a lot! > This combination of conditions is repeated 3 times. Maybe we could assign the > result to a variable (e.g.

Re: RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v4]

2023-06-09 Thread Jiangli Zhou
On Fri, 2 Jun 2023 14:04:23 GMT, Erik Joelsson wrote: > > Sounds good for solving the macosx `ar` limitation differently. I'll change > > that. We can also exclude the partial linking part for gcc (due the older > > tool issue that you've found). Any concerns with including partial linking >

Re: RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v7]

2023-06-08 Thread Jiangli Zhou
failures on > macosx- builds. On darwin (https://www.unix.com/man-page/osx/1/ar/), > `ar` does not support @argument_file. The updated change avoids using > @argument_file for `ar`. > > The partial linking change is done in make/common/NativeCompilation.gmk. The > flag related change i

Re: RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v6]

2023-06-07 Thread Jiangli Zhou
failures on > macosx- builds. On darwin (https://www.unix.com/man-page/osx/1/ar/), > `ar` does not support @argument_file. The updated change avoids using > @argument_file for `ar`. > > The partial linking change is done in make/common/NativeCompilation.gmk. The > flag related change i

Re: RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v5]

2023-06-06 Thread Jiangli Zhou
On Fri, 19 May 2023 21:20:19 GMT, Erik Joelsson wrote: >> Jiangli Zhou has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update make/common/NativeCompilation.gmk >> >> Thanks you! >> &g

Re: RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v4]

2023-06-01 Thread Jiangli Zhou
On Thu, 1 Jun 2023 16:18:24 GMT, Erik Joelsson wrote: > > > Another possibility might be the user provided `BUILD_LDCXX` includes > > > extra options in the testing build (?). If that's the case, we probably > > > could define a separate `BUILD_LD_PARTIAL` with no added options. In our > > >

Re: RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v5]

2023-05-26 Thread Jiangli Zhou
On Wed, 24 May 2023 21:02:00 GMT, Jiangli Zhou wrote: >> Original description for JDK-8307194 change: >> - >> This PR is branched from the makefile changes for >> https://bugs.openjdk.org/browse/JDK-8303796 and contains the following for >> handling th

Re: RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v4]

2023-05-26 Thread Jiangli Zhou
On Thu, 25 May 2023 01:19:11 GMT, Jiangli Zhou wrote: > > > > My build job is still running, but it has failed in two distinct ways > > > > already. See below for mac fix. Our cross build of arm32 fails with > > > > this message: > > > > ```

Re: RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v4]

2023-05-24 Thread Jiangli Zhou
On Wed, 24 May 2023 21:47:49 GMT, Jiangli Zhou wrote: > > > My build job is still running, but it has failed in two distinct ways > > > already. See below for mac fix. Our cross build of arm32 fails with this > > > message: > > > ``` > > > [2023

Re: RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v4]

2023-05-24 Thread Jiangli Zhou
On Wed, 24 May 2023 20:52:38 GMT, Erik Joelsson wrote: > > My build job is still running, but it has failed in two distinct ways > > already. See below for mac fix. Our cross build of arm32 fails with this > > message: > > ``` > > [2023-05-24T19:25:15,310Z] > >

Re: RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v4]

2023-05-24 Thread Jiangli Zhou
On Wed, 24 May 2023 20:52:38 GMT, Erik Joelsson wrote: >> My build job is still running, but it has failed in two distinct ways >> already. See below for mac fix. Our cross build of arm32 fails with this >> message: >> >> >> [2023-05-24T19:25:15,310Z] >>

Re: RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v5]

2023-05-24 Thread Jiangli Zhou
failures on > macosx- builds. On darwin (https://www.unix.com/man-page/osx/1/ar/), > `ar` does not support @argument_file. The updated change avoids using > @argument_file for `ar`. > > The partial linking change is done in make/common/NativeCompilation.gmk. The > flag related chang

Re: RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v4]

2023-05-24 Thread Jiangli Zhou
On Fri, 19 May 2023 21:20:19 GMT, Erik Joelsson wrote: >> Jiangli Zhou has updated the pull request incrementally with one additional >> commit since the last revision: >> >> - Add $$($1_LD) $$($1_SYSROOT_LDFLAGS) to $1_VARDEPS if $(TOOLCHAIN_TYPE) >>

Re: RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v4]

2023-05-22 Thread Jiangli Zhou
failures on > macosx- builds. On darwin (https://www.unix.com/man-page/osx/1/ar/), > `ar` does not support @argument_file. The updated change avoids using > @argument_file for `ar`. > > The partial linking change is done in make/common/NativeCompilation.gmk. The > flag related chang

Re: RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v2]

2023-05-22 Thread Jiangli Zhou
On Mon, 22 May 2023 19:52:42 GMT, Erik Joelsson wrote: >> Jiangli Zhou has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 12 commits: >> >> - Merge branch 'master' into JDK-8307858 >> - Merge br

Re: RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v2]

2023-05-22 Thread Jiangli Zhou
On Mon, 22 May 2023 19:54:59 GMT, Erik Joelsson wrote: >> Jiangli Zhou has updated the pull request with a new target base due to a >> merge or a rebase. The pull request now contains 12 commits: >> >> - Merge branch 'master' into JDK-8307858 >> - Merge br

Re: RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v3]

2023-05-22 Thread Jiangli Zhou
failures on > macosx- builds. On darwin (https://www.unix.com/man-page/osx/1/ar/), > `ar` does not support @argument_file. The updated change avoids using > @argument_file for `ar`. > > The partial linking change is done in make/common/NativeCompilation.gmk. The > flag related chang

Re: RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v2]

2023-05-22 Thread Jiangli Zhou
failures on > macosx- builds. On darwin (https://www.unix.com/man-page/osx/1/ar/), > `ar` does not support @argument_file. The updated change avoids using > @argument_file for `ar`. > > The partial linking change is done in make/common/NativeCompilation.gmk. The > flag related change i

Re: RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries

2023-05-22 Thread Jiangli Zhou
On Mon, 22 May 2023 19:10:57 GMT, Jiangli Zhou wrote: > Thanks @erikj79. Could you please help provide some more info on the build > failure: > > Which macOs version ran into the build issue? My mac is on Ventura 13.3.1 > (a). It builds successfully for the `static-lib

Re: RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries

2023-05-22 Thread Jiangli Zhou
On Fri, 19 May 2023 22:45:16 GMT, Erik Joelsson wrote: >> make/common/NativeCompilation.gmk line 1208: >> >>> 1206: $$(call ExecuteWithLog, >>> $$($1_OBJECT_DIR)/$$($1_SAFE_NAME)_partial_link, \ >>> 1207:$$($1_LD) $(LDFLAGS_CXX_PARTIAL_LINKING) >>>

Re: RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries

2023-05-19 Thread Jiangli Zhou
On Fri, 19 May 2023 21:20:19 GMT, Erik Joelsson wrote: > I ran this patch in our internal build and test system and got failures on > macos and windows. Thanks a lot, @erikj79! I was going to ask your help for testing the patch. > I think I know the cause for the mac failure, but the Windows

RFR: 8307858: [REDO] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries

2023-05-19 Thread Jiangli Zhou
Original description for JDK-8307194 change: - This PR is branched from the makefile changes for https://bugs.openjdk.org/browse/JDK-8303796 and contains the following for handling the JDK/hotspot static libraries: - Build hotspot libjvm.a and JDK static libraries for

Re: RFR: 8307860: [BACKOUT] JDK-8307194 Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries

2023-05-10 Thread Jiangli Zhou
On Wed, 10 May 2023 21:07:23 GMT, Daniel D. Daugherty wrote: >> This reverts commit 1964954da9ac1d020e0b5ba35893f475d86ec909. > > All builds have passed. Thank you, @dcubed-ojdk! - PR Comment: https://git.openjdk.org/jdk/pull/13918#issuecomment-1542821136

Re: RFR: 8307194: Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v12]

2023-05-10 Thread Jiangli Zhou
On Wed, 10 May 2023 17:13:13 GMT, Jiangli Zhou wrote: >> This PR is branched from the makefile changes for >> https://bugs.openjdk.org/browse/JDK-8303796 and contains the following for >> handling the JDK/hotspot static libraries: >> >> - Build hotspot lib

Re: RFR: 8307194: Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v12]

2023-05-10 Thread Jiangli Zhou
On Wed, 10 May 2023 20:24:30 GMT, Erik Joelsson wrote: > This change caused all our builds but Linux to fail. Did you verify on other > platforms than Linux at all? I see you have GHA turned off. Sorry about the issue. There were failed workflows after I merged with the latest JDK master this

Integrated: 8307194: Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries

2023-05-10 Thread Jiangli Zhou
On Wed, 3 May 2023 02:09:22 GMT, Jiangli Zhou wrote: > This PR is branched from the makefile changes for > https://bugs.openjdk.org/browse/JDK-8303796 and contains the following for > handling the JDK/hotspot static libraries: > > - Build hotspot libjvm.a and JDK s

Re: RFR: 8307194: Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v12]

2023-05-10 Thread Jiangli Zhou
awt_head.a: Not include systemScale.o, since it's > provided in libawt.a > > - Handle long arguments case for static build in > make/common/NativeCompilation.gmk > > - Address @erikj79's comment in > https://github.com/openjdk/jdk/pull/13709#discussion_r1180750185 for

Re: RFR: 8307194: Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v11]

2023-05-10 Thread Jiangli Zhou
awt_head.a: Not include systemScale.o, since it's > provided in libawt.a > > - Handle long arguments case for static build in > make/common/NativeCompilation.gmk > > - Address @erikj79's comment in > https://github.com/openjdk/jdk/pull/13709#discussion_r1180750185 for

Re: RFR: 8307194: Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries

2023-05-10 Thread Jiangli Zhou
On Wed, 3 May 2023 13:34:12 GMT, Erik Joelsson wrote: >> This PR is branched from the makefile changes for >> https://bugs.openjdk.org/browse/JDK-8303796 and contains the following for >> handling the JDK/hotspot static libraries: >> >> - Introduce new make target(s) for creating image/bundle

Re: RFR: 8307194: Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v9]

2023-05-09 Thread Jiangli Zhou
On Tue, 9 May 2023 22:14:04 GMT, Erik Joelsson wrote: > I think you also need to make a change to `GraalBuilderImage.gmk` and the > target in `Main.gmk` that calls it. Good catch! Fixed `GraalBuilderImage.gmk`, thanks! For the `graal-builder-image` target that uses `GraalBuilderImage.gmk`,

Re: RFR: 8307194: Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v10]

2023-05-09 Thread Jiangli Zhou
> provided in libawt.a > > - Handle long arguments case for static build in > make/common/NativeCompilation.gmk > > - Address @erikj79's comment in > https://github.com/openjdk/jdk/pull/13709#discussion_r1180750185 for > LIBJLI_STATIC_EXCLUDE_OBJS Jiangli Zhou has updated

Re: RFR: 8307194: Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v7]

2023-05-09 Thread Jiangli Zhou
On Mon, 8 May 2023 19:45:18 GMT, Jiangli Zhou wrote: > > > All of that said, I think we can get away with a smaller subset of > > > targets and deliverables. AFAIK, graal needs the combined > > > `graal-builder-image` as input to their build anyway, so they

Re: RFR: 8307194: Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v9]

2023-05-09 Thread Jiangli Zhou
> provided in libawt.a > > - Handle long arguments case for static build in > make/common/NativeCompilation.gmk > > - Address @erikj79's comment in > https://github.com/openjdk/jdk/pull/13709#discussion_r1180750185 for > LIBJLI_STATIC_EXCLUDE_OBJS Jiangli Zhou has updated

Re: RFR: 8307194: Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v8]

2023-05-09 Thread Jiangli Zhou
> provided in libawt.a > > - Handle long arguments case for static build in > make/common/NativeCompilation.gmk > > - Address @erikj79's comment in > https://github.com/openjdk/jdk/pull/13709#discussion_r1180750185 for > LIBJLI_STATIC_EXCLUDE_OBJS Jiangli Zhou has updated

Re: RFR: 8307194: Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v7]

2023-05-08 Thread Jiangli Zhou
On Fri, 5 May 2023 20:43:41 GMT, Erik Joelsson wrote: > Further I would like to suggest that libjvm.a gets put in the variant subdir > under lib, just like libjvm.so does today (e.g. `lib/server/libjvm.a`). That > way you can support building libjvm.a for all variants without worry. It will >

Re: RFR: 8307194: Add make target for optionally building a complete set of all JDK and hotspot libjvm static libraries [v7]

2023-05-08 Thread Jiangli Zhou
On Mon, 8 May 2023 08:57:37 GMT, Severin Gehwolf wrote: > > All of that said, I think we can get away with a smaller subset of targets > > and deliverables. AFAIK, graal needs the combined `graal-builder-image` as > > input to their build anyway, so they should not have any dependency on what

Re: RFR: 8307194: Enhance static-libs-image [v7]

2023-05-05 Thread Jiangli Zhou
On Fri, 5 May 2023 16:43:46 GMT, Jiangli Zhou wrote: >>> [...] I'll see if I can test this on a mandrel build tomorrow... >> >> @jianglizhou So I've tested this with a mandrel build and it doesn't break >> terribly, but a graalvm build after this patch has *two* `lib

Re: RFR: 8307194: Enhance static-libs-image [v7]

2023-05-05 Thread Jiangli Zhou
//github.com/openjdk/jdk/pull/13709#discussion_r1180750185 for > LIBJLI_STATIC_EXCLUDE_OBJS; Jiangli Zhou has updated the pull request incrementally with one additional commit since the last revision: Fix whitespace error in make/StaticJvmLibsImage.gmk. - Changes: - all: https://git.openjdk.org/jdk/pul

Re: RFR: 8307194: Enhance static-libs-image [v6]

2023-05-05 Thread Jiangli Zhou
On Thu, 4 May 2023 19:12:14 GMT, Severin Gehwolf wrote: >> As @jerboaa mentioned, for GraalVM native-image we produce our own >> `libjvm.a` as part of building GraalVM (every native image gets statically >> linked to that library). See >>

Re: RFR: 8307194: Enhance static-libs-image [v6]

2023-05-05 Thread Jiangli Zhou
//github.com/openjdk/jdk/pull/13709#discussion_r1180750185 for > LIBJLI_STATIC_EXCLUDE_OBJS; Jiangli Zhou has updated the pull request incrementally with one additional commit since the last revision: - Separate building libjvm.a from static-libs-image target, based on input from @jerboaa and @olpaw: - Add a new j

Re: RFR: 8307194: Enhance static-libs-image [v6]

2023-05-05 Thread Jiangli Zhou
//github.com/openjdk/jdk/pull/13709#discussion_r1180750185 for > LIBJLI_STATIC_EXCLUDE_OBJS; Jiangli Zhou has updated the pull request incrementally with one additional commit since the last revision: - Separate building libjvm.a from static-libs-image target, based on input from @jerboaa and @olpaw: - Add a new j

Re: RFR: 8307194: Enhance static-libs-image [v5]

2023-05-04 Thread Jiangli Zhou
On Thu, 4 May 2023 19:12:14 GMT, Severin Gehwolf wrote: >> As @jerboaa mentioned, for GraalVM native-image we produce our own >> `libjvm.a` as part of building GraalVM (every native image gets statically >> linked to that library). See >>

Re: RFR: 8307194: Enhance static-libs-image [v5]

2023-05-04 Thread Jiangli Zhou
On Thu, 4 May 2023 19:12:14 GMT, Severin Gehwolf wrote: >> As @jerboaa mentioned, for GraalVM native-image we produce our own >> `libjvm.a` as part of building GraalVM (every native image gets statically >> linked to that library). See >>

Re: RFR: 8307194: Enhance static-libs-image [v5]

2023-05-03 Thread Jiangli Zhou
On Wed, 3 May 2023 18:51:54 GMT, Severin Gehwolf wrote: >>> Could we decouple `hotspot-static-libs` from `static-libs-image` somehow, >>> please? `static-libs-image` is used by the `graal-builder-image` target and >>> it would be good if it didn't include hotspot static libs as they are not

Re: RFR: 8307194: Enhance static-libs-image [v5]

2023-05-03 Thread Jiangli Zhou
//github.com/openjdk/jdk/pull/13709#discussion_r1180750185 for > LIBJLI_STATIC_EXCLUDE_OBJS; Jiangli Zhou has updated the pull request incrementally with one additional commit since the last revision: Update to create and use only hotspot-$(JVM_VARIANT_MAIN)-static-libs, based on @erikj79 input. - C

Re: RFR: 8307194: Enhance static-libs-image [v2]

2023-05-03 Thread Jiangli Zhou
On Wed, 3 May 2023 18:31:56 GMT, Erik Joelsson wrote: >> Jiangli Zhou has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update based on @erikj79 review comments and suggestions: >> - Change to copy libjvm.

Re: RFR: 8307194: Enhance static-libs-image [v4]

2023-05-03 Thread Jiangli Zhou
//github.com/openjdk/jdk/pull/13709#discussion_r1180750185 for > LIBJLI_STATIC_EXCLUDE_OBJS; Jiangli Zhou has updated the pull request incrementally with one additional commit since the last revision: Update make/StaticLibsImage.gmk thanks Co-authored-by: Erik Joelsson <37597443+erik...@users.noreply.githu

Re: RFR: 8307194: Enhance static-libs-image [v3]

2023-05-03 Thread Jiangli Zhou
//github.com/openjdk/jdk/pull/13709#discussion_r1180750185 for > LIBJLI_STATIC_EXCLUDE_OBJS; Jiangli Zhou has updated the pull request incrementally with one additional commit since the last revision: Update make/StaticLibsImage.gmk Thanks Co-authored-by: Erik Joelsson <37597443+erik...@users.noreply.githu

Re: RFR: 8307194: Enhance static-libs-image [v2]

2023-05-03 Thread Jiangli Zhou
On Wed, 3 May 2023 18:33:56 GMT, Erik Joelsson wrote: >> make/Main.gmk line 1060: >> >>> 1058: symbols-image: $(LIBS_TARGETS) $(LAUNCHER_TARGETS) >>> 1059: >>> 1060: static-libs-image: hotspot-static-libs $(STATIC_LIBS_TARGETS) >> >> Could we decouple `hotspot-static-libs` from

Re: RFR: 8307194: Enhance static-libs-image

2023-05-03 Thread Jiangli Zhou
On Wed, 3 May 2023 16:57:04 GMT, Severin Gehwolf wrote: > @jianglizhou How does the produced image look like after this patch? I.e. > what's the contents of `build/*/images/static-libs`? With the changes in this patch, `build/*/images/static-libs` will contain the `libjvm.a` in addition to

Re: RFR: 8307194: Enhance static-libs-image [v2]

2023-05-03 Thread Jiangli Zhou
On Wed, 3 May 2023 13:42:03 GMT, Erik Joelsson wrote: >> Jiangli Zhou has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Update based on @erikj79 review comments and suggestions: >> - Change to copy libjvm.

Re: RFR: 8307194: Enhance static-libs-image [v2]

2023-05-03 Thread Jiangli Zhou
//github.com/openjdk/jdk/pull/13709#discussion_r1180750185 for > LIBJLI_STATIC_EXCLUDE_OBJS; Jiangli Zhou has updated the pull request incrementally with one additional commit since the last revision: Update based on @erikj79 review comments and suggestions: - Change to copy libjvm.a for $(JVM_VARIANT_MAIN) only in

Re: RFR: 8303796: Optionally build fully statically linked JDK image [v2]

2023-05-02 Thread Jiangli Zhou
On Fri, 28 Apr 2023 19:34:40 GMT, Erik Joelsson wrote: >> Jiangli Zhou has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Use $(JVM_LIBS), which includes -lrt on Linux currently. > > make/modules/java.deskt

Re: RFR: 8303796: Optionally build fully statically linked JDK image [v2]

2023-05-02 Thread Jiangli Zhou
On Fri, 28 Apr 2023 19:32:40 GMT, Erik Joelsson wrote: > This is the same list as the LIBJLI_EXTRA_FILES above. Would be good to avoid > the duplication. @erikj79 Addressed in the extracted https://github.com/openjdk/jdk/pull/13768, which contains .a related changes only (without linking

RFR: 8307194: Enhance static-libs-image

2023-05-02 Thread Jiangli Zhou
This PR is branched from the makefile changes for https://bugs.openjdk.org/browse/JDK-8303796 and contains the following for handling the JDK/VM static libraries: - Create libjvm.a together with other JDK static libraries when building 'static-libs-image' (or 'static-libs-bundles') target,

Re: RFR: 8303796: Optionally build fully statically linked JDK image [v2]

2023-05-01 Thread Jiangli Zhou
On Sat, 29 Apr 2023 03:57:53 GMT, Jiangli Zhou wrote: >> Initial implementation for supporting building a fully statically linked >> (with a desired set of JDK native libraries and libjvm) Java launcher >> executable, which is named as 'javastatic'. >> >> In this

Re: RFR: 8303796: Optionally build fully statically linked JDK image

2023-05-01 Thread Jiangli Zhou
On Mon, 1 May 2023 14:03:10 GMT, Erik Joelsson wrote: > > Based on the above finding, I pushed a change to use $(JVM_LIBS) for the > > linking command. @erikj79 could you please see if that resolves the clock_* > > symbol issues in your environment? > > Yes, it built cleanly with that change.

Re: RFR: 8303796: Optionally build fully statically linked JDK image

2023-05-01 Thread Jiangli Zhou
On Sun, 30 Apr 2023 18:34:12 GMT, Alan Bateman wrote: > > The build is already capable of producing .a files and this patch is > > building on top of that build feature. The current .a file creation is used > > by the downstream graal build which needs it for nativeimage. > > Also builds on

Re: RFR: 8303796: Optionally build fully statically linked JDK image

2023-04-28 Thread Jiangli Zhou
On Sat, 29 Apr 2023 01:44:07 GMT, Jiangli Zhou wrote: > > > Erik, could you please share your > > > `support/native/java.base/java/BUILD_LAUNCHER_javastatic_static_link.cmdline`? > > > This generated .cmdline file contains the static linking command. Here > >

  1   2   >