[flang-commits] [PATCH] D124846: [flang][driver] Support reading response files

Andrzej Warzynski via Phabricator via flang-commits flang-commits at lists.llvm.org
Wed May 4 04:23:35 PDT 2022


awarzynski added a comment.

Thanks for working on this! I would appreciate a note about the command line semantics for response files. IIUC (based on the tests file), one just needs to prepend the filename with `@`, but I couldn't find any documentation.



================
Comment at: flang/test/Driver/response-file.f90:4
+! RUN: echo "-DTEST" > %basename_t.rsp
+! RUN: %flang -E -cpp @%basename_t.rsp %s -o - | FileCheck %s
+! RUN: %flang_fc1 -E -cpp @%basename_t.rsp %s -o - | FileCheck %s
----------------
What happens if you skip `@`? Perhaps test for that too.


================
Comment at: flang/tools/flang-driver/driver.cpp:79
 
+  // Parse response files. We're defaulting to the GNU syntax, since we don't
+  // have a CL mode.
----------------
Would it make sense to move this to a dedicated function? I imagine that this might grow in the future (especially when working on Windows). No strong opinion.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124846



More information about the flang-commits mailing list