Always compile debuginfo-tests for the host triple
Since these tests expect a working debugger, always compile them for the
host triple, assuming a working debugger is present.
This enables us to compile and run them, even when clang is, by default,
a cross-compiler (but can still target the host).
llvm-svn: 219992
GitOrigin-RevId: 63f2c2cb6599aed7db956272a6a0f541d864e69b
diff --git a/aggregate-indirect-arg.cpp b/aggregate-indirect-arg.cpp
index bbbb01e..aa5ef8b 100644
--- a/aggregate-indirect-arg.cpp
+++ b/aggregate-indirect-arg.cpp
@@ -1,5 +1,5 @@
-// RUN: %clangxx -O0 -g %s -c -o %t.o
-// RUN: %clangxx %t.o -o %t.out
+// RUN: %clangxx --target=%itanium_abi_host_triple -O0 -g %s -c -o %t.o
+// RUN: %clangxx --target=%itanium_abi_host_triple %t.o -o %t.out
// RUN: %test_debuginfo %s %t.out
// Radar 8945514
// DEBUGGER: break 22
diff --git a/block_var.m b/block_var.m
index 83a30fd..548cdd0 100644
--- a/block_var.m
+++ b/block_var.m
@@ -1,5 +1,5 @@
-// RUN: %clang -O0 -g %s -c -o %t.o
-// RUN: %clang %t.o -o %t.out -framework Foundation
+// RUN: %clang --target=%itanium_abi_host_triple -O0 -g %s -c -o %t.o
+// RUN: %clang --target=%itanium_abi_host_triple %t.o -o %t.out -framework Foundation
// RUN: %test_debuginfo %s %t.out
// REQUIRES: system-darwin
diff --git a/blocks.m b/blocks.m
index 0ac0e07..302005d 100644
--- a/blocks.m
+++ b/blocks.m
@@ -1,5 +1,5 @@
-// RUN: %clang -O0 -g %s -c -o %t.o
-// RUN: %clang %t.o -o %t.out -framework Foundation
+// RUN: %clang --target=%itanium_abi_host_triple -O0 -g %s -c -o %t.o
+// RUN: %clang --target=%itanium_abi_host_triple %t.o -o %t.out -framework Foundation
// RUN: %test_debuginfo %s %t.out
// REQUIRES: system-darwin
diff --git a/ctor.cpp b/ctor.cpp
index 331d4e5..8a858e4 100644
--- a/ctor.cpp
+++ b/ctor.cpp
@@ -1,5 +1,5 @@
-// RUN: %clangxx -O0 -g %s -c -o %t.o
-// RUN: %clangxx %t.o -o %t.out
+// RUN: %clangxx --target=%itanium_abi_host_triple -O0 -g %s -c -o %t.o
+// RUN: %clangxx --target=%itanium_abi_host_triple %t.o -o %t.out
// RUN: %test_debuginfo %s %t.out
diff --git a/dbg-arg.c b/dbg-arg.c
index 02fcbf3..e7acaa8 100644
--- a/dbg-arg.c
+++ b/dbg-arg.c
@@ -1,6 +1,6 @@
// This test case checks debug info during register moves for an argument.
-// RUN: %clang -arch x86_64 -mllvm -fast-isel=false %s -c -o %t.o
-// RUN: %clang -arch x86_64 %t.o -o %t.out
+// RUN: %clang --target=%itanium_abi_host_triple -arch x86_64 -mllvm -fast-isel=false %s -c -o %t.o
+// RUN: %clang --target=%itanium_abi_host_triple -arch x86_64 %t.o -o %t.out
// RUN: %test_debuginfo %s %t.out
//
// Radar 8412415
diff --git a/foreach.m b/foreach.m
index 50e6af9..132dacc 100644
--- a/foreach.m
+++ b/foreach.m
@@ -1,5 +1,5 @@
-// RUN: %clang -O0 -g %s -c -o %t.o
-// RUN: %clang %t.o -o %t.out -framework Foundation
+// RUN: %clang --target=%itanium_abi_host_triple -O0 -g %s -c -o %t.o
+// RUN: %clang --target=%itanium_abi_host_triple %t.o -o %t.out -framework Foundation
// RUN: %test_debuginfo %s %t.out
//
// REQUIRES: system-darwin
diff --git a/forward-declare-class.cpp b/forward-declare-class.cpp
index 5c0f1df..eb9d507 100644
--- a/forward-declare-class.cpp
+++ b/forward-declare-class.cpp
@@ -1,4 +1,4 @@
-// RUN: %clangxx -O0 -g %s -c -o %t.o
+// RUN: %clangxx --target=%itanium_abi_host_triple -O0 -g %s -c -o %t.o
// RUN: %test_debuginfo %s %t.o
// Radar 9168773
diff --git a/nested-struct.cpp b/nested-struct.cpp
index 22f2344..ebb7ee4 100644
--- a/nested-struct.cpp
+++ b/nested-struct.cpp
@@ -1,4 +1,4 @@
-// RUN: %clangxx -O0 -g %s -c -o %t.o
+// RUN: %clangxx --target=%itanium_abi_host_triple -O0 -g %s -c -o %t.o
// RUN: %test_debuginfo %s %t.o
// Radar 9440721
// If debug info for my_number() is emitted outside function foo's scope
diff --git a/sret.cpp b/sret.cpp
index 4c46c3d..28d6a06 100644
--- a/sret.cpp
+++ b/sret.cpp
@@ -1,5 +1,5 @@
-// RUN: %clangxx -O0 -g %s -c -o %t.o
-// RUN: %clangxx %t.o -o %t.out
+// RUN: %clangxx --target=%itanium_abi_host_triple -O0 -g %s -c -o %t.o
+// RUN: %clangxx --target=%itanium_abi_host_triple %t.o -o %t.out
// RUN: %test_debuginfo %s %t.out
// Radar 8775834
// DEBUGGER: break 62
diff --git a/static-member-2.cpp b/static-member-2.cpp
index 8e88a8c..dda9a22 100644
--- a/static-member-2.cpp
+++ b/static-member-2.cpp
@@ -1,5 +1,5 @@
-// RUN: %clangxx -O0 -g %s -o %t -c
-// RUN: %clangxx %t -o %t.out
+// RUN: %clangxx --target=%itanium_abi_host_triple -O0 -g %s -o %t -c
+// RUN: %clangxx --target=%itanium_abi_host_triple %t -o %t.out
// RUN: %test_debuginfo %s %t.out
// FIXME: LLDB finds the wrong symbol for "C". rdar://problem/14933867
diff --git a/static-member.cpp b/static-member.cpp
index a8e3ecb..fdca889 100644
--- a/static-member.cpp
+++ b/static-member.cpp
@@ -1,5 +1,5 @@
-// RUN: %clangxx -O0 -g %s -o %t -c
-// RUN: %clangxx %t -o %t.out
+// RUN: %clangxx --target=%itanium_abi_host_triple -O0 -g %s -o %t -c
+// RUN: %clangxx --target=%itanium_abi_host_triple %t -o %t.out
// RUN: %test_debuginfo %s %t.out
// DEBUGGER: delete breakpoints