RFR: 8328680: Introduce JDK_LIB, and clean up module native compilation [v2]
Magnus Ihse Bursie
ihse at openjdk.org
Fri Mar 22 11:35:23 UTC 2024
On Fri, 22 Mar 2024 10:47:30 GMT, Julian Waters <jwaters at openjdk.org> wrote:
>> Magnus Ihse Bursie has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix indentation
>
> make/common/JdkNativeCompilation.gmk line 190:
>
>> 188: $1_SRC_HEADER_FLAGS += $$(addprefix -I, $$(call GetJavaHeaderDir, $$(MODULE)))
>> 189:
>> 190: $1_JDK_LIBS += $$($1_JDK_LIBS_$$(OPENJDK_TARGET_OS))
>
> Should these follow LIBS and pick up more specific target options as well? Not a request, just thinking out loud
I'm not sure what targets you are thinking of here. This is one of the cases where the distinction between OS and toolchain is not entirely clear. I'm treating them as synonyms. There are two reasons two separate target OS here:
1) syntax in linker. The microsoft linker uses `jvm.lib`, all others `-ljvm`.
2) different needs in the source code. When there are vastly different implementations for a lib on different OSes, we can have a situation where e.g. the macOS port needs libjava, but the other platforms don't.
Issue 1) will be resolved by the upcoming JDK_LIBS rewrite. Issue 2 is inherited from the limitations in the source code, and since that source code is structured on a per-OS basis, we will only need to have JDK_LIBS options per-OS.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18430#discussion_r1535437421
More information about the build-dev
mailing list