Natively support split dwarf
A recent thread on the Ninja list mentioned -gsplit-dwarf
to help cut down on link times and memory use.
I suspect this would be useful for many projects (not just the likes of e.g. LLVM), but it would be beneficial if CMake had native support:
- It shouldn't be added to
CMAKE_CXX_FLAGS
because thenRelease
builds also get debug information. - It's a pain to add to
CMAKE_CXX_FLAGS_{DEBUG,RELWITHDEBINFO}
because at leastCMAKE_CXX_FLAGS_RELWITHDEBINFO
needs other flags as well; users must configure, then go back and modify the flags variables or else try to specify all the flags (and hope the defaults don't change). - It "breaks" clean builds and installs because CMake doesn't know about
.dwo
files.
All these would be fixed by "native" support. We have precedent for supporting similar compiler features, e.g. PIC.