[PATCH] D146793: [llvm-rc] Respect the executable specified in the --preprocessor command
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 28 01:03:57 PDT 2023
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd2fa6b694c20: [llvm-rc] Respect the executable specified in the --preprocessor command (authored by mstorsjo).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D146793/new/
https://reviews.llvm.org/D146793
Files:
llvm/tools/llvm-rc/llvm-rc.cpp
Index: llvm/tools/llvm-rc/llvm-rc.cpp
===================================================================
--- llvm/tools/llvm-rc/llvm-rc.cpp
+++ llvm/tools/llvm-rc/llvm-rc.cpp
@@ -227,7 +227,7 @@
bool preprocess(StringRef Src, StringRef Dst, const RcOptions &Opts,
const char *Argv0) {
std::string Clang;
- if (Opts.PrintCmdAndExit) {
+ if (Opts.PrintCmdAndExit || !Opts.PreprocessCmd.empty()) {
Clang = "clang";
} else {
ErrorOr<std::string> ClangOrErr = findClang(Argv0, Opts.Triple);
@@ -267,7 +267,7 @@
}
// The llvm Support classes don't handle reading from stdout of a child
// process; otherwise we could avoid using a temp file.
- int Res = sys::ExecuteAndWait(Clang, Args);
+ int Res = sys::ExecuteAndWait(Args[0], Args);
if (Res) {
fatalError("llvm-rc: Preprocessing failed.");
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146793.508917.patch
Type: text/x-patch
Size: 848 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230328/460d7b39/attachment.bin>
More information about the llvm-commits
mailing list