[Lldb-commits] [PATCH] D68980: [LLDB] [test] Pass --target=<arch>-windows-msvc to clang-cl

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 15 04:44:40 PDT 2019


labath added a reviewer: stella.stamenova.
labath added a comment.

+stella, for the aspects of running msvc/clang in various environments..

Yeah, I raised this issue back when build.py was first introduced, but it did not really get resolved properly. (Back then, windows arm wasn't considered, so I guess the issue wasn't seen as pressing.) Right now, build.py has a sort of a split personality, where it generally builds stuff for the host, *except* if it uses the clang-cl driver, where it builds stuff for x86 windows, regardless of what happens to be the host platform.

I think the issue should be tackled more wholistically, but I am not really sure how, and I'm not sure I know about all the complexities that need to be considered here. Since you've looked at these tests lately, let me ask you some questions...

For the tests that "assume" that they are building for x86, how exactly do these assumptions of theirs manifest? I assume these are tests that currently run on non win-x86 platforms too, or else you wouldn't have picked them up. Is that right? Would it be possible to rewrite these tests to call clang-cl directly?

In my ideal world, I'd have tests which do not need to produce a "functional" executable (but rather always create the same kind of target, regardless of what the host is), invoke the right compiler directly -- since the target/compiler is fixed, they can pass any funky option they like without needing to worry about portability. That would leave build.py with the task of figuring out how to build a binary that will run correctly on the host (possibly with a different bitness).

However, I don't know if that is really possible. I know there are some complexities with configuring msvc/clang-cl, where one needs to fetch registry keys and whatnot in order to get the right build environment. *However*, given that these tests don't always run on the host, they cannot assume that the registry keys will be there anyway, and so avoiding their lookup might actually be good, as it will ensure the tests will run the same way on regardless of the host environment.


Repository:
  rLLDB LLDB

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D68980/new/

https://reviews.llvm.org/D68980





More information about the lldb-commits mailing list