[clang] [clang-scan-deps] Expand response files before the argument adjuster (PR #89950)

Jan Svoboda via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 25 14:35:35 PDT 2024


================
@@ -0,0 +1,36 @@
+// Check that the scanner can adjust arguments by reading .rsp files in advance.
+
+// RUN: rm -rf %t
+// RUN: split-file %s %t
+// RUN: sed -e "s|DIR|%/t|g" %t/cdb.json.template > %t/cdb.json
+// RUN: echo /Fo%t/tu.obj >> %t/args_nested.rsp
----------------
jansvoboda11 wrote:

I tried playing around with response files and they don't play well with newlines. I think that instead of appending to the response files with `echo`, we should use `split-file` and create two separate files. That will also be more declarative and will make it obvious that one contains `/c` and the other `/E`.

https://github.com/llvm/llvm-project/pull/89950


More information about the cfe-commits mailing list