[llvm-rc] Respect the executable specified in the --preprocessor command
authorMartin Storsjö <martin@martin.st>
Fri, 24 Mar 2023 10:17:25 +0000 (12:17 +0200)
committerMartin Storsjö <martin@martin.st>
Tue, 28 Mar 2023 08:02:41 +0000 (11:02 +0300)
commitd2fa6b694c2052cef1ddd507f6569bc84e3bbe35
treee727cf63139199091026bf226b9098400cf254f7
parent7cf203e73922b8eaa4c23fba30702d7954eba107
[llvm-rc] Respect the executable specified in the --preprocessor command

The arguments passed in this option were passed onto the child
process, but we still blindly used the clang binary that we had
found to sys::ExecuteAndWait as the intended executable to run.

If the user hasn't specified any custom --preprocessor command,
Args[0] is equal to the variable Clang.

This doesn't affect any tests, since the tests only print the
arguments it would try to execute (but not the first parameter to
sys::ExecuteAndWait), but there's no testes for executing it
(and validating that it did execute the right thing).

Differential Revision: https://reviews.llvm.org/D146793
llvm/tools/llvm-rc/llvm-rc.cpp