On Thu, 28 Mar 2024 17:59:10 GMT, Magnus Ihse Bursie <i...@openjdk.org> wrote:

> Currently a lot of code is duplicated between SetupJdkExecutable and 
> SetupJdkLibrary. Furthermore, some functionality is still missing from 
> SetupJdkExecutable that is present in SetupJdkLibrary. These functions also 
> have not had their documentation properly updated as they have evolved. This 
> PR will fix all of this.

make/common/JdkNativeCompilation.gmk line 233:

> 231:       # Set the default flags first to be able to override
> 232:       $1_CXXFLAGS := $$(filter-out $$($1_CXXFLAGS_FILTER_OUT), 
> $$(CXXFLAGS_JDKLIB)) $$($1_CXXFLAGS)
> 233:     endif

I think it makes sense to share all that is actually common between the two 
existing macros, but for these conditional adding default flags, it's just a 
big if EXECUTABLE do this, otherwise do that. I think in such cases it makes 
more sense to keep that logic in the respective specialized macros. The only 
drawback would be that the new `SetupJdkNativeCompilation` won't be usable on 
its own, but it's not intended to be anyway.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/18537#discussion_r1543439808

Reply via email to