[PATCH] [lit] Make ExecutionEngine tests run when LLVM_TARGET_ARCH != 'host' and the target is supported.

Daniel Sanders daniel.sanders at imgtec.com
Wed May 27 03:03:57 PDT 2015


This is necessary for the clang-cmake-mips builder where the host arch is
'mips64' but we are targeting and can execute code for the 'Mips' architecture.

http://reviews.llvm.org/D10056

Files:
  test/ExecutionEngine/MCJIT/lit.local.cfg
  test/ExecutionEngine/OrcLazy/lit.local.cfg
  test/ExecutionEngine/OrcMCJIT/lit.local.cfg
  test/ExecutionEngine/lit.local.cfg
  test/lit.site.cfg.in

Index: test/ExecutionEngine/MCJIT/lit.local.cfg
===================================================================
--- test/ExecutionEngine/MCJIT/lit.local.cfg
+++ test/ExecutionEngine/MCJIT/lit.local.cfg
@@ -8,11 +8,12 @@
 
 # FIXME: autoconf and cmake produce different arch names. We should normalize
 # them before getting here.
-if root.host_arch not in ['i386', 'x86', 'x86_64', 'AMD64',
-                          'AArch64', 'ARM', 'Mips', 'PowerPC', 'ppc64', 'SystemZ']:
+if root.jit_target_arch not in ['i386', 'x86', 'x86_64', 'AMD64',
+                                'AArch64', 'ARM', 'Mips', 'PowerPC', 'ppc64',
+                                'SystemZ']:
     config.unsupported = True
 
-if 'armv7' in root.host_arch:
+if 'armv7' in root.jit_target_arch:
     config.unsupported = False
 
 if 'i386-apple-darwin' in root.target_triple:
Index: test/ExecutionEngine/OrcLazy/lit.local.cfg
===================================================================
--- test/ExecutionEngine/OrcLazy/lit.local.cfg
+++ test/ExecutionEngine/OrcLazy/lit.local.cfg
@@ -1,2 +1,2 @@
-if config.root.host_arch not in ['x86_64']:
+if config.root.jit_target_arch not in ['x86_64']:
     config.unsupported = True
Index: test/ExecutionEngine/OrcMCJIT/lit.local.cfg
===================================================================
--- test/ExecutionEngine/OrcMCJIT/lit.local.cfg
+++ test/ExecutionEngine/OrcMCJIT/lit.local.cfg
@@ -8,11 +8,12 @@
 
 # FIXME: autoconf and cmake produce different arch names. We should normalize
 # them before getting here.
-if root.host_arch not in ['i386', 'x86', 'x86_64', 'AMD64',
-                          'AArch64', 'ARM', 'Mips', 'PowerPC', 'ppc64', 'SystemZ']:
+if root.jit_target_arch not in ['i386', 'x86', 'x86_64', 'AMD64',
+                                'AArch64', 'ARM', 'Mips', 'PowerPC', 'ppc64',
+                                'SystemZ']:
     config.unsupported = True
 
-if 'armv7' in root.host_arch:
+if 'armv7' in root.jit_target_arch:
     config.unsupported = False
 
 if 'i386-apple-darwin' in root.target_triple:
Index: test/ExecutionEngine/lit.local.cfg
===================================================================
--- test/ExecutionEngine/lit.local.cfg
+++ test/ExecutionEngine/lit.local.cfg
@@ -1,4 +1,4 @@
-if config.root.host_arch in ['PowerPC', 'AArch64', 'SystemZ']:
+if config.root.jit_target_arch in ['PowerPC', 'AArch64', 'SystemZ']:
     config.unsupported = True
 
 # CMake and autoconf diverge in naming or host_arch
Index: test/lit.site.cfg.in
===================================================================
--- test/lit.site.cfg.in
+++ test/lit.site.cfg.in
@@ -34,6 +34,9 @@
 config.have_zlib = "@HAVE_LIBZ@"
 config.have_dia_sdk = @HAVE_DIA_SDK@
 config.enable_ffi = "@LLVM_ENABLE_FFI@"
+config.jit_target_arch = "@LLVM_TARGET_ARCH@"
+if config.jit_target_arch == "host":
+  config.jit_target_arch = config.host_arch
 
 # Support substitution of the tools_dir with user parameters. This is
 # used when we can't determine the tool dir at configuration time.

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10056.26582.patch
Type: text/x-patch
Size: 3042 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150527/b236b41c/attachment.bin>


More information about the llvm-commits mailing list