[PATCH] D80876: [clang] Default to windows response files when running on windows

Martin Storsjö via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 2 04:24:59 PDT 2020


mstorsjo added a comment.

In D80876#2067532 <https://reviews.llvm.org/D80876#2067532>, @rnk wrote:

> This seems wrong for mingw, so check with @mstorsjo.


Thanks for the headsup!

I agree that this change would make sense and would make things more consistent in general, but @rnk is also right that, within a mingw environment, the expectation would probably be for the old behaviour.

I did one build test with a large link command (done via libtool), where libtool produed a response file, containing unix-style-quoted windows paths, like `some\\path\\to\\a\\file` - and if I added `--rsp-quoting=windows` to it, it still built fine, so while it would be expanded to actually contain double backslashes in that case (I presume?) it seemed harmless. So as long as the response files contain only relative pathnames, misinterpreting a unix-quoted file as windows quoted seems harmless.

But as for keeping the old default in mingw environments, would it make sense to, if on windows, check the default target triple, and if that's a mingw target (`Triple.isWindowsGNUEnvironment()`), keep the unix style quoting as default?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80876





More information about the cfe-commits mailing list