]> granicus.if.org Git - llvm/commitdiff
[llvm] [lit] Add target-x86* features
authorMichal Gorny <mgorny@gentoo.org>
Thu, 11 Apr 2019 14:58:39 +0000 (14:58 +0000)
committerMichal Gorny <mgorny@gentoo.org>
Thu, 11 Apr 2019 14:58:39 +0000 (14:58 +0000)
Add a 'target-x86' and 'target-x86_64' feature sthat indicates that
the default target is 32-bit or 64-bit x86, appropriately.  Combined
with 'native' feature, we're going to use this to control x86-specific
LLDB native process tests.

Differential Revision: https://reviews.llvm.org/D60474

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358177 91177308-0d34-0410-b5e6-96231b3b80d8

utils/lit/lit/llvm/config.py

index 01cc0ccec17e3cf53b82fdd3f0ef62293d367e22..c335f2d04ee3361ed2d2ae5d1f049626f48203dc 100644 (file)
@@ -96,6 +96,10 @@ class LLVMConfig(object):
                 features.add('x86_64-linux')
             if re.match(r'.*-windows-msvc$', target_triple):
                 features.add('target-windows')
+            if re.match(r'^i.86.*', target_triple):
+                features.add('target-x86')
+            elif re.match(r'^x86_64.*', target_triple):
+                features.add('target-x86_64')
 
         use_gmalloc = lit_config.params.get('use_gmalloc', None)
         if lit.util.pythonize_bool(use_gmalloc):