hans added inline comments.
================ Comment at: clang/tools/driver/driver.cpp:338 + static unsigned ReenteranceCount; + if (ReenteranceCount++) + llvm::cl::ResetAllOptionOccurrences(); ---------------- aganea wrote: > hans wrote: > > This looks pretty hacky. > > > > Can you explain more what the current problem is and how you're proposing > > to fix it? I'm not familiar with the -Wp flag and how it relates to > > response files. > The problem is that for `-Wp,@file.rsp`, file.rsp is not expanded anymore, > because previously it was done in the cc1 process, at L379 below. > > This patch calls back into `ExecuteClangTool` instead of `ExecuteCC1Tool`. > This was my initial proposal for rGb4a99a061f517e60985667e39519f60186cbb469, > purposely to fix this issue (which I forgot about) > > An alternate way is to duplicate L379 into `ExecuteCC1Tool`, but I felt that > wasn't pretty and opens the door to more code duplication down the line. See > D73120 for an alternate implementation. I think that if cc1 is supposed to expand response files, then let's make that explicit. I don't think the "reenter" flag in D73120 is necessary: if cc1 is supposed to expand response files, let's make it do that always. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73060/new/ https://reviews.llvm.org/D73060 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits