RFR: 8311247: Some cpp files are compiled with -std:c11 flag

Alexey Ivanov aivanov at openjdk.org
Tue Jul 4 12:46:56 UTC 2023


On Tue, 4 Jul 2023 04:53:57 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:

>> make/modules/java.desktop/lib/Awt2dLibraries.gmk line 135:
>> 
>>> 133:     OPTIMIZATION := HIGHEST, \
>>> 134:     CFLAGS := $(CFLAGS_JDKLIB) $(LIBAWT_CFLAGS), \
>>> 135:     CXXFLAGS := $(CXXFLAGS_JDKLIB) $(LIBAWT_CFLAGS), \
>> 
>> `LIBAWT_CFLAGS` applies to both C and C++, right? It contains some common flags; it follows the pattern with other libs below.
>
> That's correct. `LIBAWT_CFLAGS` contains a bunch of `-D` flags, which are common for C and C++, and `-EHsc` flag, which is probably C++ only, but the compiler doesn't complain.
> 
> `jabswitch` below is using some C++-specific flags, but it only compiles one C++ file and no C files. I suppose we could simplify that makefile at some point. All other flags are common between C and C++.

Thank for clarification.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/14758#discussion_r1251981511



More information about the build-dev mailing list