gold: Make powerpc support optional for the tests.
authorPeter Collingbourne <peter@pcc.me.uk>
Thu, 19 Mar 2015 18:23:31 +0000 (18:23 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Thu, 19 Mar 2015 18:23:31 +0000 (18:23 +0000)
Differential Revision: http://reviews.llvm.org/D8400

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

test/lit.cfg
test/tools/gold/mtriple.ll

index 70f83fd0072b3fddfe7e2f6749694a4339ae0ec8..d34ca69a6890d473857ff535b12534af0d0bf318 100644 (file)
@@ -354,8 +354,10 @@ def have_ld_plugin_support():
     if len(fields) != 3:
         return False
     emulations = fields[2].split()
-    if 'elf32ppc' not in emulations or 'elf_x86_64' not in emulations:
+    if 'elf_x86_64' not in emulations:
         return False
+    if 'elf32ppc' in emulations:
+        config.available_features.add('ld_emu_elf32ppc')
 
     ld_version = subprocess.Popen([config.gold_executable, '--version'], stdout = subprocess.PIPE)
     if not 'GNU gold' in ld_version.stdout.read().decode():
index 94211ed299da7350d16ff9b6147cec704bca89e7..87b226014cab27955837a66b0a25c9fda86f5f60 100644 (file)
@@ -1,3 +1,5 @@
+; REQUIRES: ld_emu_elf32ppc
+
 ; RUN: llvm-as %s -o %t.o
 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so -m elf32ppc \
 ; RUN:    -plugin-opt=mtriple=powerpc-linux-gnu \