<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=utf-8">
<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;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:366761235;
        mso-list-type:hybrid;
        mso-list-template-ids:-1763957886 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l0:level1
        {mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level2
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level3
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level4
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level5
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level6
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
@list l0:level7
        {mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level8
        {mso-level-number-format:alpha-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
@list l0:level9
        {mso-level-number-format:roman-lower;
        mso-level-tab-stop:none;
        mso-level-number-position:right;
        text-indent:-9.0pt;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></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="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">I am not sure if that’s the right solution for a couple of reasons:
<o:p></o:p></p>
<ol style="margin-top:0in" start="1" type="1">
<li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">As far as I can tell only clang calls use_clang (and only lld calls use_lld), while the other projects such as lld and llvm rely on the environment to be setup correctly<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">Lld also has tests that invoke clang-cl and they pass – while the ones in LLDB do not, so the invocation of use_clang is not necessary for the tests to pass (maybe?)<o:p></o:p></li><li class="MsoListParagraph" style="margin-left:0in;mso-list:l0 level1 lfo1">LLDB allows us to specify whether to use gcc or clang as well as the path and it can also have a test compiler specified via LLDB_USE_TEST_*_COMPILER, so we should first decide what
 scenarios we want to support before trying to make this work and possibly making it even more confusing and complicated<o:p></o:p></li></ol>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Do you know what the answer for 3) is? What compilers are valid to specify for the lit/suite/unittests via the various parameters?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal">-Stella<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b>From:</b> Zachary Turner <zturner@google.com> <br>
<b>Sent:</b> Tuesday, November 13, 2018 3:27 PM<br>
<b>To:</b> Stella Stamenova <stilis@microsoft.com><br>
<b>Cc:</b> reviews+D54009+public+0e164460da8f1d7f@reviews.llvm.org; pavel@labath.sk; chris.bieneman@me.com; dccitaliano@gmail.com; aleksandr.urakov@jetbrains.com; jdevlieghere@apple.com; abidh.haq@gmail.com; teemperor@gmail.com; ki.stfu@gmail.com; mgorny@gentoo.org;
 dan@su-root.co.uk; jfbastien@apple.com; lldb-commits@lists.llvm.org; llvm@inglorion.net<br>
<b>Subject:</b> Re: [PATCH] D54009: Refactor LLDB lit configuration files<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">I believe that is correct, and perhaps part of the problem.  In other projects we call llvm_config.use_clang(), and that actually explicitly creates a substitution so that if someone writes "clang" they'll get an error that says "use %clang
 instead".  Because we have the exact path, that isn't happening here.  Perhaps the proper fix is to add a keyword argument to llvm_config.use_clang() so that it can be called as llvm_config.use_clang(path=p).  This way we can get the proper substitutions created
 and we would find out about this.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">I can play around with this some, but does it sound reasonable to you?  I'm not sure how to hit all the edge cases because everything is already working for me (for some reason), so it won't be obvious if I fix the problem for those people
 for whom it's broken.<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">On Tue, Nov 13, 2018 at 3:16 PM Stella Stamenova <<a href="mailto:stilis@microsoft.com">stilis@microsoft.com</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I took a brief look and I have a question about the usage of clang (rather than clang-cl).<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">In general I would agree that we have an exact path of clang (or gcc) that we are trying to use and they’re specified by using %cc and %cxx in the test files, but there are a number
 of test files that simply use clang e.g.:<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;margin-left:.5in">
SymbolFile\DWARF\find-variable-dwo.cpp:3:// RUN: clang %s -g -gsplit-dwarf -c -emit-llvm -o - --target=x86_64-pc-linux -DONE<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">In this case, are we not going to pick up whatever clang happens to be in the path instead of one that was explicitly specified? Is this intentional?<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">Thanks,<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">-Stella<o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"><b>From:</b> Zachary Turner <<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>>
<br>
<b>Sent:</b> Tuesday, November 13, 2018 2:46 PM<br>
<b>To:</b> <a href="mailto:reviews%2BD54009%2Bpublic%2B0e164460da8f1d7f@reviews.llvm.org" target="_blank">
reviews+D54009+public+0e164460da8f1d7f@reviews.llvm.org</a><br>
<b>Cc:</b> Stella Stamenova <<a href="mailto:stilis@microsoft.com" target="_blank">stilis@microsoft.com</a>>;
<a href="mailto:pavel@labath.sk" target="_blank">pavel@labath.sk</a>; <a href="mailto:chris.bieneman@me.com" target="_blank">
chris.bieneman@me.com</a>; <a href="mailto:dccitaliano@gmail.com" target="_blank">
dccitaliano@gmail.com</a>; <a href="mailto:aleksandr.urakov@jetbrains.com" target="_blank">
aleksandr.urakov@jetbrains.com</a>; <a href="mailto:jdevlieghere@apple.com" target="_blank">
jdevlieghere@apple.com</a>; <a href="mailto:abidh.haq@gmail.com" target="_blank">
abidh.haq@gmail.com</a>; <a href="mailto:teemperor@gmail.com" target="_blank">teemperor@gmail.com</a>;
<a href="mailto:ki.stfu@gmail.com" target="_blank">ki.stfu@gmail.com</a>; <a href="mailto:mgorny@gentoo.org" target="_blank">
mgorny@gentoo.org</a>; <a href="mailto:dan@su-root.co.uk" target="_blank">dan@su-root.co.uk</a>;
<a href="mailto:jfbastien@apple.com" target="_blank">jfbastien@apple.com</a>; <a href="mailto:lldb-commits@lists.llvm.org" target="_blank">
lldb-commits@lists.llvm.org</a>; <a href="mailto:llvm@inglorion.net" target="_blank">
llvm@inglorion.net</a><br>
<b>Subject:</b> Re: [PATCH] D54009: Refactor LLDB lit configuration files<o:p></o:p></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">I think it must be related to setting up the environment in which to run clang.  In all other projects we call llvm_config.use_clang() which is in llvm/utils/lit/lit/llvm/config.py,
 but because here we have an exact path of a clang we are trying to use, we skip this function in LLDB's lit configuration files.  But there is also a lot of other logic in that function, so perhaps it's some of that logic that's necessary.<o:p></o:p></p>
</div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto"> <o:p></o:p></p>
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto">On Mon, Nov 12, 2018 at 9:02 AM Aleksandr Urakov via Phabricator <<a href="mailto:reviews@reviews.llvm.org" target="_blank">reviews@reviews.llvm.org</a>> wrote:<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-top:5.0pt;margin-right:0in;margin-bottom:5.0pt">
<p class="MsoNormal" style="mso-margin-top-alt:auto;margin-bottom:12.0pt">aleksandr.urakov added a comment.<br>
<br>
But all compiles without errors if I run this manually:<br>
<br>
  clang-cl -m32 /Z7 /c /GS- C:\Work\llvm\tools\lldb\lit\SymbolFile\PDB/Inputs/SimpleTypesTest.cpp /o C:\Work\llvm\build_x86\tools\lldb\lit\SymbolFile\PDB\Output/SimpleTypesTest.cpp.enums.obj<br>
<br>
<br>
Repository:<br>
  rLLDB LLDB<br>
<br>
<a href="https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Freviews.llvm.org%2FD54009&data=02%7C01%7Cstilis%40microsoft.com%7C128cd278a84f49a36ec708d649bf95ef%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636777484542478768&sdata=f4tnP6dmSOdJ41NsENxeeiLAnYyq4OCGDqs1MOQ6C9k%3D&reserved=0" target="_blank">https://reviews.llvm.org/D54009</a><br>
<br>
<o:p></o:p></p>
</blockquote>
</div>
</div>
</div>
</blockquote>
</div>
</div>
</body>
</html>