[PATCH] D73060: [Clang] Fix expansion of response files in -Wp after integrated-cc1 change

Alexandre Ganea via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 21 09:41:57 PST 2020


aganea marked an inline comment as done.
aganea added inline comments.


================
Comment at: clang/tools/driver/driver.cpp:338
+  static unsigned ReenteranceCount;
+  if (ReenteranceCount++)
+    llvm::cl::ResetAllOptionOccurrences();
----------------
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, at 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.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73060/new/

https://reviews.llvm.org/D73060





More information about the cfe-commits mailing list