<div dir="ltr"><div>Thanks for working on this! I think this mode is a long time coming.</div><div dir="ltr"><br></div><div dir="ltr">On Fri, Oct 15, 2021 at 1:53 PM Martin Storsjö via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Fri, 15 Oct 2021, Michael Kruse wrote:<br>
<br>
> I also noticed is that the paths printed by clang -v or -### are<br>
> escaping the backslashes and put them into quotes, i.e.<br>
> "C:\\path\\to\\clang.exe" -cc1 "..\\special'^`character .c"<br>
> Interestingly, it still works copy&pasting it to the Windows command<br>
> line [2], but cmd.exe's escape character is ^ and PowerShell's is the<br>
> backtick `. What would the correct output be?<br>
<br>
I wasn't aware that cmd.exe had an escape char per se (other than ^ for <br>
line continuations?).<br>
<br>
The fact that such slashes are printed double is, iirc, an intentional <br>
quirk, so that the command lines are copypasteable in a variety of <br>
contexts: cmd.exe don't need them doubled (but tolerates them), bash <br>
unescapes them so it also can execute them.<br></blockquote><div><br></div><div>Yep, I was going to say that.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
This is actually one downside of using forward slashes, as cmd.exe <br>
wouldn't be able to execute such a command straight out (only the slash <br>
direction of the command executable itself matters though).<br></blockquote><div><br></div><div>I think as long as the user has a way to choose between the styles, they've got what they need to unblock themselves.</div></div></div>