RFR: 8327045: Consolidate -fvisibility=hidden as a basic flag for all compilation
Jorn Vernee
jvernee at openjdk.org
Fri Mar 8 17:03:02 UTC 2024
On Fri, 1 Mar 2024 13:51:15 GMT, Magnus Ihse Bursie <ihse at openjdk.org> wrote:
> If you really insist on not including jni.h, I would need to duplicate all the platform-specific JNIEXPORT definitions from that file. I can do it (I understand your reluctance of risking to bring in unintentional stuff), but it will also cause code duplication that is a bit unfortunate.
After thinking some more about this, I still think depending on `jni.h` is not good. Duplicating `JNIEXPORT` could be a solution, but I suggest just not adding `-fvisibility=hidden` for the test libraries. (i.e. have separate sets of flags for building test libs and libs that get bundled with the JDK)
(Also, FWIW, the `java/lang/foreign` micro benchmarks will have the same issue)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/18061#issuecomment-1978891179
More information about the build-dev
mailing list