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

Martin Storsjö via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 15 03:46:48 PDT 2019


mstorsjo created this revision.
mstorsjo added reviewers: rnk, labath, amccarth, aleksandr.urakov.
Herald added subscribers: JDevlieghere, kristof.beyls.
Herald added a project: LLDB.

This fixes running check-lldb on arm linux.

Previously the helper python scipt only passed -m32/-m64, but some tests assume it to be compiling for an x86 architecture, and the -m32/-m64 flags only pick the right bitness of the compiler's default target architecture.

Further up in build.py, there's also another case (msvc_arch_str) which assumes that the arch setting only picks between i386 and x86_64.

Alternatively, the build.py helper script could get a --target option, to allow specifying exactly the intended target (but which only would be usable when using clang as the test compiler).


Repository:
  rLLDB LLDB

https://reviews.llvm.org/D68980

Files:
  lldb/test/Shell/helper/build.py


Index: lldb/test/Shell/helper/build.py
===================================================================
--- lldb/test/Shell/helper/build.py
+++ lldb/test/Shell/helper/build.py
@@ -553,7 +553,7 @@
 
         args.append(self.compiler)
         if self.toolchain_type == 'clang-cl':
-            args.append('-m' + self.arch)
+            args.append('--target=%s-windows-msvc' % ('i386' if self.arch == '32' else 'x86_64'))
 
         if self.opt == 'none':
             args.append('/Od')


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68980.224992.patch
Type: text/x-patch
Size: 492 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191015/e7fb15d8/attachment.bin>


More information about the lldb-commits mailing list