The dependency scanner already generates canonical -cc1 command lines that can be used to compile discovered modular dependencies.
For translation unit command lines, the scanner only generates additional driver arguments the build system is expected to append to the original command line.
While this works most of the time, there are situations where that's not the case. For example with -Wunused-command-line-argument, Clang will complain about the -fmodules-cache-path= argument that's not being used in explicit modular builds. Combine that with -Werror and the build outright fails.
To prevent such failures, this patch changes the dependency scanner to return the full driver command line to compile the original translation unit. This gives us more opportunities to massage the arguments into something reasonable.
This patch will make it possible to strip out -fmodules-cache-path=, allowing us to remove -Wno-unused-command-line-argument in this test. Note that previously, we needed to strip the argument ourselves manually to get the same effect.