Swift and Clang share the same command line parsing code (it comes from the LLVM code base), so the behavior should be identical in both. (There was a minor difference relating to how the driver passes arguments to the front-end <https://github.com/apple/swift/pull/19321\>, but I don't believe that applies to your example.)
In your example, AFAIK the filename needs to be quoted in the response file itself in order for the parser to understand that "foo bar.txt" is supposed to be treated as a single argument instead of two arguments.
Environment
Apple Swift version 4.2 (swiftlang-1000.11.37.1 clang-1000.11.45.1)
Target: x86_64-apple-darwin17.7.0
Additional Detail from JIRA
md5: d1e550194ff868538e7ca9c954cb325b
Issue Description:
If you provide Swift with a file to use as the arguments, file paths with spaces are not correctly handled. Example:
I assume since there is an argument per line these files should correctly handle spaces?
Original change #16362
The text was updated successfully, but these errors were encountered: