[PATCH] D100755: [llvm-rc] [3/4] Run clang to preprocess input files
Nico Weber via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 20 11:28:52 PDT 2021
thakis added inline comments.
================
Comment at: llvm/tools/llvm-rc/llvm-rc.cpp:98
+ if (!Parent.empty())
+ Path = sys::findProgramByName("clang", Parent);
+ if (!Path)
----------------
mstorsjo wrote:
> thakis wrote:
> > if there's no clang but only clang-cl, it should try to find that. (pass --driver-mode=gcc to use only one set of options – but see below)
> >
> > (we don't bundle clang on windows in chromium, only clang-cl. we don't currently use llvm-rc, but we might one day)
> Ah, trying both sounds good. I'm in the opposite situation - I only bundle clang, not clang-cl, and I currently use llvm-rc. (But I probably wouldn't use this preprocessing logic as is anyway, as I need to use a mingw clang driver for finding the sysroot etc.)
>
> What do you @thakis think - should we invoke it with `--driver-mode=cl` instead? If we allow passing more options through, it might matter, even if it doesn't right now.
>
> (If running in that mode, we'd need to use `-Fi` instead of `-o` for the output though, and that complicates the following patch a bit.)
Seems fine too, no strong opinion either way.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D100755/new/
https://reviews.llvm.org/D100755
More information about the llvm-commits
mailing list