When turning on directCC1 scanning, swift will ask clang driver to expand all cc1 flags and pass that explicitly on command-line. In such case, if RC_DEBUG_OPTIONS env is set on darwin platform, it will cause clang driver to encode all the options it gets and pass those clang driver options as a cc1 options -dwarf-debug-flags.
After the change, swift scanner will no longer generate a long -Xcc -dwarf-debug-flag -Xcc <long list of flags> for later compilation. Losing such information in DWARF doesn't affect swift debugging. It will instead, make command-line a lot shorter, save spaces in swift binary module, and make swift caching build more reliable.
rdar://144267483
[Dependency Scan] Do not pass clang's `-dwarf-debug-flags` to swift
When turning on directCC1 scanning, swift will ask clang driver to expand all cc1 flags and pass that explicitly on command-line. In such case, if
RC_DEBUG_OPTIONS
env is set on darwin platform, it will cause clang driver to encode all the options it gets and pass those clang driver options as a cc1 options-dwarf-debug-flags
.After the change, swift scanner will no longer generate a long
-Xcc -dwarf-debug-flag -Xcc <long list of flags>
for later compilation. Losing such information in DWARF doesn't affect swift debugging. It will instead, make command-line a lot shorter, save spaces in swift binary module, and make swift caching build more reliable.rdar://144267483