summaryrefslogtreecommitdiff
path: root/test/lit.cfg
diff options
context:
space:
mode:
authorEli Bendersky <eli.bendersky@intel.com>2012-01-16 08:56:09 +0000
committerEli Bendersky <eli.bendersky@intel.com>2012-01-16 08:56:09 +0000
commita66a18505e07a4e72d6fa7e85663937a257577f3 (patch)
tree1c14e0bc22014ae756f795ee8c9a3108bbcb8df1 /test/lit.cfg
parent810d6d3354a31f24125abef831e4afccbbbe973d (diff)
downloadllvm-a66a18505e07a4e72d6fa7e85663937a257577f3.tar.gz
llvm-a66a18505e07a4e72d6fa7e85663937a257577f3.tar.bz2
llvm-a66a18505e07a4e72d6fa7e85663937a257577f3.tar.xz
Adding a basic ELF dynamic loader and MC-JIT for ELF. Functionality is currently basic and will be enhanced with future patches.
Patch developed by Andy Kaylor and Daniel Malea. Reviewed on llvm-commits. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148231 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/lit.cfg')
-rw-r--r--test/lit.cfg30
1 files changed, 23 insertions, 7 deletions
diff --git a/test/lit.cfg b/test/lit.cfg
index 6bc170cdf9..f3302a2d6c 100644
--- a/test/lit.cfg
+++ b/test/lit.cfg
@@ -141,6 +141,29 @@ for line in open(os.path.join(config.llvm_obj_root, 'test', 'site.exp')):
if m:
site_exp[m.group(1)] = m.group(2)
+# Provide target_triple for use in XFAIL and XTARGET.
+config.target_triple = site_exp['target_triplet']
+
+# When running under valgrind, we mangle '-vg' or '-vg_leak' onto the end of the
+# triple so we can check it with XFAIL and XTARGET.
+config.target_triple += lit.valgrindTriple
+
+# Process jit implementation option
+jit_impl_cfg = lit.params.get('jit_impl', None)
+if jit_impl_cfg == 'mcjit':
+ # When running with mcjit, mangle -mcjit into target triple
+ # and add -use-mcjit flag to lli invocation
+ if 'i686' in config.target_triple:
+ config.target_triple += jit_impl_cfg + '-ia32'
+ elif 'x86_64' in config.target_triple:
+ config.target_triple += jit_impl_cfg + '-ia64'
+ else:
+ config.target_triple += jit_impl_cfg
+
+ config.substitutions.append( ('%lli', 'lli -use-mcjit') )
+else:
+ config.substitutions.append( ('%lli', 'lli') )
+
# Add substitutions.
for sub in ['link', 'shlibext', 'ocamlopt', 'llvmshlibdir']:
config.substitutions.append(('%' + sub, site_exp[sub]))
@@ -197,13 +220,6 @@ for pattern in [r"\bbugpoint\b(?!-)", r"(?<!/|-)\bclang\b(?!-)",
excludes = []
-# Provide target_triple for use in XFAIL and XTARGET.
-config.target_triple = site_exp['target_triplet']
-
-# When running under valgrind, we mangle '-vg' or '-vg_leak' onto the end of the
-# triple so we can check it with XFAIL and XTARGET.
-config.target_triple += lit.valgrindTriple
-
# Provide llvm_supports_target for use in local configs.
targets = set(site_exp["TARGETS_TO_BUILD"].split())
def llvm_supports_target(name):