Skip to content

Commit d178f4f

Browse files
committed
Make the default triple optional by allowing an empty string
When building LLVM as a (potentially dynamic) library that can be linked against by multiple compilers, the default triple is not really meaningful. We allow to explicitely set it to an empty string when configuring LLVM. In this case, said "target independent" tests in the test suite that are using the default triple are disabled by matching the newly available feature "default_triple". Reviewers: probinson, echristo Differential Revision: http://reviews.llvm.org/D12660 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 247775
1 parent 8e468d6 commit d178f4f

File tree

116 files changed

+57
-25
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

116 files changed

+57
-25
lines changed

llvm/include/llvm/Config/config.h.cmake

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -420,8 +420,10 @@
420420
/* Installation directory for data files */
421421
#cmakedefine LLVM_DATADIR "${LLVM_DATADIR}"
422422

423-
/* Target triple LLVM will generate code for by default */
424-
#cmakedefine LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}"
423+
/* Target triple LLVM will generate code for by default
424+
* Doesn't use `cmakedefine` because it is allowed to be empty.
425+
*/
426+
#define LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}"
425427

426428
/* Installation directory for documentation */
427429
#cmakedefine LLVM_DOCSDIR "${LLVM_DOCSDIR}"

llvm/test/BugPoint/remove_arguments_test.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
; Test to make sure that arguments are removed from the function if they are
66
; unnecessary. And clean up any types that frees up too.
77

8-
; CHECK: target triple
8+
; CHECK: ModuleID
99
; CHECK-NOT: struct.anon
1010
%struct.anon = type { i32 }
1111

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
if 'native' not in config.available_features:
1+
if not config.target_triple:
22
config.unsupported = True
33

llvm/test/CodeGen/PowerPC/2006-01-20-ShiftPartsCrash.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
; RUN: llc < %s
2+
; REQUIRES: default_triple
23

34
define void @iterative_hash_host_wide_int() {
45
%zero = alloca i32 ; <i32*> [#uses=2]

llvm/test/CodeGen/PowerPC/2006-08-15-SelectionCrash.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
; RUN: llc < %s
2+
; REQUIRES: default_triple
23

34
%struct..0anon = type { i32 }
45
%struct.rtx_def = type { i16, i8, i8, [1 x %struct..0anon] }

llvm/test/CodeGen/PowerPC/2006-12-07-LargeAlloca.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
; RUN: llc < %s -march=ppc64
22
; RUN: llc < %s -march=ppc32
33
; RUN: llc < %s
4+
; REQUIRES: default_triple
45

56
define void @bitap() {
67
entry:

llvm/test/CodeGen/PowerPC/2006-12-07-SelectCrash.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
; RUN: llc < %s -march=ppc64
22
; RUN: llc < %s -march=ppc32
33
; RUN: llc < %s
4+
; REQUIRES: default_triple
45

56
@qsz.b = external global i1 ; <i1*> [#uses=1]
67

llvm/test/CodeGen/PowerPC/2007-11-19-VectorSplitting.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
; RUN: llc < %s -march=ppc32 -mcpu=g3
33
; RUN: llc < %s -march=ppc32 -mcpu=g5
44
; PR1811
5+
; REQUIRES: default_triple
56

67
define void @execute_shader(<4 x float>* %OUT, <4 x float>* %IN, <4 x float>*
78
%CONST) {

llvm/test/CodeGen/PowerPC/load-shift-combine.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
; RUN: llc < %s
2+
; REQUIRES: default_triple
23

34
; This used to cause a crash. A standard load is converted to a pre-increment
45
; load. Later the pre-increment load is combined with a subsequent SRL to

llvm/test/CodeGen/X86/2006-10-02-BoolRetCrash.ll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
; RUN: llc < %s
22
; PR933
3+
; REQUIRES: default_triple
34

45
define fastcc i1 @test() {
56
ret i1 true

0 commit comments

Comments
 (0)