]> granicus.if.org Git - clang/commit
driver: Add a `--rsp-quoting` flag to pick response file quoting.
authorNico Weber <nicolasweber@gmx.de>
Mon, 25 Apr 2016 21:15:49 +0000 (21:15 +0000)
committerNico Weber <nicolasweber@gmx.de>
Mon, 25 Apr 2016 21:15:49 +0000 (21:15 +0000)
commit3d299b5bbdd7713c52dd495ec818100ceba1f80e
treed72288beb85cf1114a2da98aba0cfdad08738676
parent15a13f4ca1516737c5e4d1d8d72ba56a6a77005e
driver: Add a `--rsp-quoting` flag to pick response file quoting.

Currently, clang-cl always uses Windows style for unquoting, and clang always
uses POSIX style for unquoting.

With this flag, it's possible to change these defaults.

In general, response file quoting should match the shell the response file is
used in.  On Windows, it's possible to run clang-cl in a bash shell, or clang in
cmd.exe, so a flag for overriding the default behavior is natural there.

On non-Windows, Windows quoting probably never makes sense (except maybe in
Wine), but having clang-cl behave differently based on the host OS seems
strange too.  So require that people who want to use posix-style response
files with clang-cl on non-Windows pass --rsp-quoting=posix.

http://reviews.llvm.org/D19425

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@267474 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Driver/Options.td
lib/Driver/Driver.cpp
test/Driver/at_file_win.c [new file with mode: 0644]
test/Driver/at_file_win.c.args [new file with mode: 0644]
tools/driver/driver.cpp