On Windows we need to be able to process response files with Windows-style path names which include backslashes.
Details
Diff Detail
Event Timeline
I remember someone said they could think of some issues with doing this, but I can't remember what those issues where. +rnk and +ruiu
I don't think this is a right thing to do because creating a Windows executable doesn't necessarily mean that you are doing it on Command Prompt and vice versa. clang and lld support --rsp-quoting={windows,posix} to explicitly tell the driver how to parse response files. Didn't that work for you?
llvm/lib/Support/CommandLine.cpp | ||
---|---|---|
1085 | I would say Triple(sys::getProcessTriple()).isOSWindows() | |
llvm/unittests/Support/CommandLineTest.cpp | ||
636 | ditto | |
644 | This assumes a writable cwd. I think you want this pattern: int FileDescriptor; SmallString<64> TempPath; ASSERT_NO_ERROR( fs::createTemporaryFile("resp-", ".txt", FileDescriptor, TempPath)); |
LLVM's tools do not have a standard way to indicate the response file quoting style.
But if there was a problem that we had to fix by adding --rsp-quoting option, that will become a problem with this patch, no?
But we still have to choose a default. Why is using GNU parsing on Windows the right thing to do?
I think this is the right default for Windows. We can add an --rsp-quoting argument as a follow-up if someone needs it.
My memory is vague -- what was the issue that we needed to add --rsp-quoting in the first place?
I don't want to block this, and it sounds reasonable to make Windows command line grammar default on Windows. I'll defer someone who is more familiar with this code than me to give a LGTM.
I would say Triple(sys::getProcessTriple()).isOSWindows()