On Fri, 1 Mar 2024 13:51:15 GMT, Magnus Ihse Bursie <i...@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