summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2015-07-15 22:42:37 +0000
committerReid Kleckner <reid@kleckner.net>2015-07-15 22:42:37 +0000
commite2d03448ba7944e8f983ddd95d50a20e9433777c (patch)
tree774ed171d9932452f86644e5eca0d468a4d01bd7 /clang/lib
parent3f5ed1566e34e7d2a83fb98bead1079e37b52579 (diff)
downloadbcm5719-llvm-e2d03448ba7944e8f983ddd95d50a20e9433777c.tar.gz
bcm5719-llvm-e2d03448ba7944e8f983ddd95d50a20e9433777c.zip
[clang-cl] Use the Windows response file tokenizer
We were still using the Unix response file tokenizer for all driver modes. This was difficult to get right in the beginning because there is a circular dependency. The Driver class also can't officially determine its mode until it can see all possible --driver-mode= flags, and those flags could come from the response file. Now we use the Windows parsing algorithm if the program name looks like clang-cl, or if the --driver-mode=cl flag is present on the main command line. Fixes PR23709. Reviewers: hans Differential Revision: http://reviews.llvm.org/D11229 llvm-svn: 242346
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/Driver/Job.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Driver/Job.cpp b/clang/lib/Driver/Job.cpp
index 42bba56f5d4..92fc478d61f 100644
--- a/clang/lib/Driver/Job.cpp
+++ b/clang/lib/Driver/Job.cpp
@@ -98,7 +98,9 @@ void Command::writeResponseFile(raw_ostream &OS) const {
return;
}
- // In regular response files, we send all arguments to the response file
+ // In regular response files, we send all arguments to the response file.
+ // Wrapping all arguments in double quotes ensures that both Unix tools and
+ // Windows tools understand the response file.
for (const char *Arg : Arguments) {
OS << '"';
OpenPOWER on IntegriCloud