On Fri, 30 Aug 2024 09:28:59 GMT, Hamlin Li <[email protected]> wrote:
> As there are several folders (generated and upstream) under
> src/jdk.incubator.vector/linux/native/libsleef/ now, what's the recommended
> way to only include generated and skip upstream when compile/build the final
> libsleef.so in that pr?
Basically, under the `$(eval $(call SetupJdkLibrary, BUILD_LIBVECTORMATH` call,
you add the line:
EXTRA_SRC := libsleef/generated, \
and that should be it. However, I see that you also manipulate compiler flags
for individual files. I don't know if that is still needed, or can be removed.
Or, conversely, if additional files will need the special flags.
> make/UpdateSleefSource.gmk line 105:
>
>> 103: TARGETS := $(sleef_native_build)
>> 104:
>> 105: $(eval $(call SetupExecute, sleef_cross_config, \
>
> Not sure if it's still necessary or right to run the 2 steps build the second
> time, when native and cross-compilation are the same, e.g. build sve for
> aarch64 on an aarch64 machine.
As the documentation says, the update make target only supports
cross-compilation. I based this on the shell script created by Mikael, but I
guess his reasoning for doing it that way is the same as mine: When an update
is needed, you are going to have to do it for all supported platforms, and
hence it is easier to cross-compile it to all targets.
Since updating is a very uncommon operation, I prefer to keep the makefile
simple.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/20781#issuecomment-2320849630
PR Review Comment: https://git.openjdk.org/jdk/pull/20781#discussion_r1738426993