Add support for wildcard expansion in command line arguments on Windows.
See https://docs.microsoft.com/en-us/cpp/c-language/expanding-wildcard-arguments
Details
Diff Detail
- Repository
- rC Clang
Event Timeline
PURE_WINDOWS is all Windows except Cygwin. It's an LLVM thing, not a CMake thing.
I don't know if setargv.obj is available on MinGW, and even if it is it's probably not gonna have the .obj extension, so this should probably be limited to MSVC.
Use llvm::sys::Process::GetArgumentVector, which already does wildcard expansion from what I can see. It works with Unicode command lines and isn't affected by locale.
I vaguely remember that windows console applications have to define wmain() instead of main() in order to work with unicode. Does llvm::sys::Process::GetArgumentVector allow to work around this?
Never mind. I looked at the windows implementation and see how =)
Thanks for the pointer. I'll update the patch.
I've not tested this on Windows, but I hope llvm::sys::Process::GetArgumentVector should have been tested by someone already.
s/couldn'g/couldn't/