<div dir="ltr">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.<div><br></div><div>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.</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Nov 13, 2018 at 3:16 PM Stella Stamenova <<a href="mailto:stilis@microsoft.com">stilis@microsoft.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div lang="EN-US" link="blue" vlink="purple">
<div class="m_-4540842296746666279WordSection1">
<p class="MsoNormal">I took a brief look and I have a question about the usage of clang (rather than clang-cl).<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">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.:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal" style="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<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">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?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
<p class="MsoNormal">-Stella<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal"><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<u></u><u></u></p></div></div><div lang="EN-US" link="blue" vlink="purple"><div class="m_-4540842296746666279WordSection1">
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal">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.<u></u><u></u></p>
</div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<div>
<p class="MsoNormal">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:<u></u><u></u></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">
<p class="MsoNormal" style="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%7C4d34b00c93e54eec4ee808d649b9bf0e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636777459461497267&sdata=XicxM31dp6rkqlAIJcT9Aa9TjZv0pfyBWwUbp%2FKsIYM%3D&reserved=0" target="_blank">https://reviews.llvm.org/D54009</a><br>
<br>
<br>
<u></u><u></u></p>
</blockquote>
</div>
</div></div></blockquote></div>