[PATCH] D80876: [clang] Default to windows response files when running on windows
Sam Clegg via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sat May 30 13:14:48 PDT 2020
sbc100 created this revision.
Herald added subscribers: cfe-commits, sunfish, aheejin.
Herald added a project: clang.
sbc100 added a reviewer: ruiu.
This matches other tools such as llvm-ar, lld, etc.
This consistency is useful when authoring downstream tools as it means
they can always use windows-style response files on windows, rather than
generate a different style for clang compared to the other tools.
This was discussed in the equivalent llvm-ar change:
https://reviews.llvm.org/D69665
wasm-ld behaviour was changed there:
https://reviews.llvm.org/D75577
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D80876
Files:
clang/tools/driver/driver.cpp
Index: clang/tools/driver/driver.cpp
===================================================================
--- clang/tools/driver/driver.cpp
+++ clang/tools/driver/driver.cpp
@@ -385,10 +385,22 @@
bool MarkEOLs = ClangCLMode;
llvm::cl::TokenizerCallback Tokenizer;
- if (RSPQuoting == Windows || (RSPQuoting == Default && ClangCLMode))
+ switch (RSPQuoting) {
+ case Default: {
+ if (ClangCLMode ||
+ llvm::Triple(llvm::sys::getProcessTriple()).isOSWindows())
+ Tokenizer = &llvm::cl::TokenizeWindowsCommandLine;
+ else
+ Tokenizer = &llvm::cl::TokenizeGNUCommandLine;
+ break;
+ }
+ case Windows:
Tokenizer = &llvm::cl::TokenizeWindowsCommandLine;
- else
+ break;
+ case POSIX:
Tokenizer = &llvm::cl::TokenizeGNUCommandLine;
+ break;
+ }
if (MarkEOLs && argv.size() > 1 && StringRef(argv[1]).startswith("-cc1"))
MarkEOLs = false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D80876.267471.patch
Type: text/x-patch
Size: 897 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200530/54cbc3fa/attachment-0001.bin>
More information about the cfe-commits
mailing list