On Tue, Nov 13, 2018 at 3:47 PM Stella Stamenova <sti...@microsoft.com> wrote:
> 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? > For the unit tests, I don't think we ever specify a compiler, or we don't ever read the value. Because a unit test shouldn't be compiling anything, it's a different kind of test. For the dotest suite, specifying the compiler is important and it can definitely be gcc, but I don't think this uses the same method of going through config.cc. In fact, I'm not sure how it determines what compiler to use at the moment, as it's been a number of years since I've looked at the dotest suite. For the lit tests, I'm inclined to say we should keep things simple and only support clang for now, and add support for new compilers such as gcc if and when someone actually wants it. Otherwise YAGNI. Definitely that time will come, but it doesn't make sense to support it immediately if nobody is using it today and nobody is planning to enable it immediately. So I'm tempted to say that perhaps we should just call llvm_config.use_clang() and llvm_config.use_lld() and ignore LLDB_TEST_COMPILER, which in my experience has only been a source of unnecessary complexity that never actually gets used in practice. >
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits