I am not sure if that’s the right solution for a couple of reasons: 1. 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 2. 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?) 3. 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
Do you know what the answer for 3) is? What compilers are valid to specify for the lit/suite/unittests via the various parameters? Thanks, -Stella From: Zachary Turner <ztur...@google.com> Sent: Tuesday, November 13, 2018 3:27 PM To: Stella Stamenova <sti...@microsoft.com> Cc: reviews+d54009+public+0e164460da8f1...@reviews.llvm.org; pa...@labath.sk; chris.biene...@me.com; dccitali...@gmail.com; aleksandr.ura...@jetbrains.com; jdevliegh...@apple.com; abidh....@gmail.com; teempe...@gmail.com; ki.s...@gmail.com; mgo...@gentoo.org; d...@su-root.co.uk; jfbast...@apple.com; lldb-commits@lists.llvm.org; l...@inglorion.net Subject: Re: [PATCH] D54009: Refactor LLDB lit configuration files 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. 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. On Tue, Nov 13, 2018 at 3:16 PM Stella Stamenova <sti...@microsoft.com<mailto:sti...@microsoft.com>> wrote: I took a brief look and I have a question about the usage of clang (rather than clang-cl). 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.: SymbolFile\DWARF\find-variable-dwo.cpp:3:// RUN: clang %s -g -gsplit-dwarf -c -emit-llvm -o - --target=x86_64-pc-linux -DONE 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? Thanks, -Stella From: Zachary Turner <ztur...@google.com<mailto:ztur...@google.com>> Sent: Tuesday, November 13, 2018 2:46 PM To: reviews+d54009+public+0e164460da8f1...@reviews.llvm.org<mailto:reviews%2bd54009%2bpublic%2b0e164460da8f1...@reviews.llvm.org> Cc: Stella Stamenova <sti...@microsoft.com<mailto:sti...@microsoft.com>>; pa...@labath.sk<mailto:pa...@labath.sk>; chris.biene...@me.com<mailto:chris.biene...@me.com>; dccitali...@gmail.com<mailto:dccitali...@gmail.com>; aleksandr.ura...@jetbrains.com<mailto:aleksandr.ura...@jetbrains.com>; jdevliegh...@apple.com<mailto:jdevliegh...@apple.com>; abidh....@gmail.com<mailto:abidh....@gmail.com>; teempe...@gmail.com<mailto:teempe...@gmail.com>; ki.s...@gmail.com<mailto:ki.s...@gmail.com>; mgo...@gentoo.org<mailto:mgo...@gentoo.org>; d...@su-root.co.uk<mailto:d...@su-root.co.uk>; jfbast...@apple.com<mailto:jfbast...@apple.com>; lldb-commits@lists.llvm.org<mailto:lldb-commits@lists.llvm.org>; l...@inglorion.net<mailto:l...@inglorion.net> Subject: Re: [PATCH] D54009: Refactor LLDB lit configuration files 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. On Mon, Nov 12, 2018 at 9:02 AM Aleksandr Urakov via Phabricator <revi...@reviews.llvm.org<mailto:revi...@reviews.llvm.org>> wrote: aleksandr.urakov added a comment. But all compiles without errors if I run this manually: 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 Repository: rLLDB LLDB https://reviews.llvm.org/D54009<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>
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits