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')


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')
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to