RFR: 8295231: Move all linking of native libraries to make
Magnus Ihse Bursie
ihse at openjdk.org
Mon Oct 17 09:27:10 UTC 2022
On Mon, 10 Oct 2022 14:15:37 GMT, Julian Waters <jwaters at openjdk.org> wrote:
> Some external libraries required by native code are linked via linker comments embedded in pragmas. Searching for which libraries are linked can then become frustrating and confusing since they may be included in an obscure place, and for all relevant compilers there is no difference between specifying them from make and in a source file. The easiest solution is to just always link them from make and remove any source level linkage.
Marked as reviewed by ihse (Reviewer).
Wow. I did not even know this was possible. Thank you for fixing this! I would have been mighty surprised if I were to learn that a library has more dependencies than the one in the makefile.
@dholmes-ora The point is that we need to be consistent. If we would go that route, then *all* libraries should be loaded by pragmas. That could of course be an alternative, but I really see no upside to it. To do it like we currently do, load 99% of the libraries via make files, and then have few scattered pragmas, that's just bad.
@TheShermanTanker Question: is this a Windows-specific thing, or are there pragma-loaded libraries for other compilers as well?
-------------
PR: https://git.openjdk.org/jdk/pull/10633
More information about the build-dev
mailing list