This is a work-in-progress patch for adding a "-gmodules" category to the testsuite. It adds clang module debugging as a configuration alongside .dSYM and DWO to ensure that module debug info is getting broader coverage. When enabled it will add "-fmodules -gmodules" to CFLAGS (but not CXXFLAGS). It will not invoke dsymutil, since dsymutil undoes most of the module-related intricacies.
In the current form, this passes the test suite on Darwin, and it should also work on any other platform that uses clang as the host compiler.
I do have a couple of remaining questions regarding the implementation:
- Is there a way to detect that clang is the host compiler, so we can disable the category on platforms that use a different compiler?
- The "-fmodules" and "-gmodules" are only well supported by clang-3.9 and later. Is there a good way to test for this in is_supported_on_platform() or somewhere else?