C++/Objective-C++: Stop claiming support for Clang modules.
GCC no longer claims support for Clang's modules, resolving macOS build failures.
GCC previously claimed support for Clang’s modules, a feature tightly coupled with Clang’s internal AST and not compatible with GCC’s architecture. This misrepresentation caused build failures on macOS by affecting header declaration ordering. By removing this claim, GCC aims for parity with builds that do not use the -fmodules flag, aligning with the C++20 modules standard which uses a different feature test macro.
In Details
The feature(modules) macro in GCC was incorrectly used to indicate support for Clang's module system, which is distinct from C++20 modules. Clang uses this macro for its internal module implementation, influencing SDK header processing. This change removes GCC's claim to this feature, as GCC's implementation of C++20 modules is gated by __cpp_module and does not rely on Clang's internal mechanisms.