On Tue, 26 Mar 2024 19:19:14 GMT, Phil Race <p...@openjdk.org> wrote:
>> This is a follow-up on >> [JDK-8328680](https://bugs.openjdk.org/browse/JDK-8328680), making the same >> kind of cleanup to java.desktop. Some code needed more special treatment >> here, so there is some additional effects outside of the >> modules/java.desktop directory. The code was also in worse shape than other >> modules, so some additional changes to the build logic where needed. > > make/modules/java.desktop/lib/Awt2dLibraries.gmk line 107: > >> 105: >> 106: LIBAWT_CFLAGS += -D__MEDIALIB_OLD_NAMES -D__USE_J2D_NAMES $(X_CFLAGS) >> 107: > > Why is X_CFLAGS no longer needed ? It is still needed, and it is still there. It has just moved to inside the `SetupJdkLibrary` call. The idea is that we should not really use additional variables if it is possible to give the proper values to the parameters directly in SetupJdkLibrary. However, I see now that I have only partially succeeded with LIBAWT_CFLAGS. And also that I have handled CFLAGS and CXXFLAGS inconsistently. *sigh* I think I've been over this code a thousand times, and still I missed this. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/18486#discussion_r1540208549