<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal">At a minimum, I think we should stop using (and recommending) the bit-rotting GnuWin32 tools, and instead use the tools that come with git-for-Windows.  Lit currently checks for 5 tools (cmp, diff, echo, grep, sed) and all of these are
 in the git-Windows set.  This will reduce the set of packages we depend on, even if it doesn’t reduce the set of actual tools we depend on.<o:p></o:p></p>
<p class="MsoNormal">--paulr<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> llvm-dev <llvm-dev-bounces@lists.llvm.org> <b>On Behalf Of
</b>via llvm-dev<br>
<b>Sent:</b> Tuesday, October 5, 2021 10:30 AM<br>
<b>To:</b> llvm-dev@lists.llvm.org<br>
<b>Subject:</b> [llvm-dev] [llvm-lit] Old echo causes test failure on windows<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-GB">Hi llvm-dev,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">I wanted to bring discussion from D110986 to a wider audience.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">After D110986 added a unicode character to the test, llvm\test\tools\llvm-cxxfilt\delimiters.test<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">started failing in our (Sony's) downstream Windows CI build (and locally for me) because the<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">unicode character was being converted to '?' at some stage in the test. The upstream Windows bots<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">seemed to have no such trouble. I added a workaround in D111072 that we landed because a Chromium<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">bot was running into the same issue.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Digging a little deeper it turns out that the echo that lit was picking up for me (`echo (GNU<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">coreutils) 5.3.0` from GnuWin32) converts unicode characters to '?'.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">llvm-lit has its own built in echo which handles unicode without an issue. This is used in the workaround<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">D111072; lit's echo is used iff the echo command isn't used in a pipeline.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">N.B. `echo (GNU coreutils) 8.32` shipped with git for Windows also appears to handle unicode without<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">an issue.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">I have a few questions:<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">1) Is there a reason we cannot always use lit's echo, as Hans suggests in D111072?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">2) If we can't always use lit's echo, maybe we could add an error/warning if a "bad" echo is<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">detected at build-config or test-running time?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Thanks,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB">Orlando<o:p></o:p></span></p>
</div>
</div>
</body>
</html>