aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/clang/Driver/Options.td7
-rw-r--r--lib/Basic/Targets.cpp2
-rw-r--r--lib/Driver/Driver.cpp2
-rw-r--r--test/ARCMT/driver-migrate.m4
-rw-r--r--test/CodeGen/2009-10-20-GlobalDebug.c2
-rw-r--r--test/CodeGen/frame-pointer-elim.c8
-rw-r--r--test/CodeGen/mips64-f128-literal.c2
-rw-r--r--test/CodeGen/mips64-padding-arg.c2
-rw-r--r--test/CodeGen/mmx-inline-asm.c2
-rw-r--r--test/CodeGen/mmx-shift-with-immediate.c2
-rw-r--r--test/CodeGenCXX/apple-kext-guard-variable.cpp2
-rw-r--r--test/CodeGenCXX/cxx-apple-kext.cpp4
-rw-r--r--test/Coverage/targets.c2
-rw-r--r--test/Driver/Wp-args.c2
-rw-r--r--test/Driver/Xarch.c6
-rw-r--r--test/Driver/Xlinker-args.c2
-rw-r--r--test/Driver/analyze.c2
-rw-r--r--test/Driver/apple-kext-i386.cpp8
-rw-r--r--test/Driver/apple-kext-mkernel.c4
-rw-r--r--test/Driver/arc.c10
-rw-r--r--test/Driver/arch.c2
-rw-r--r--test/Driver/arm-darwin-builtin.c6
-rw-r--r--test/Driver/arm-mfpu.c24
-rw-r--r--test/Driver/ast.c4
-rw-r--r--test/Driver/bindings.c28
-rw-r--r--test/Driver/cc-log-diagnostics.c2
-rw-r--r--test/Driver/ccc-host-triple-no-integrated-as.c8
-rw-r--r--test/Driver/cfi.c4
-rw-r--r--test/Driver/clang-translation.c12
-rw-r--r--test/Driver/darwin-as.c6
-rw-r--r--test/Driver/darwin-cc.c2
-rw-r--r--test/Driver/darwin-debug-flags.c4
-rw-r--r--test/Driver/darwin-dsymutil.c10
-rw-r--r--test/Driver/darwin-iphone-defaults.m2
-rw-r--r--test/Driver/darwin-ld.c36
-rw-r--r--test/Driver/darwin-objc-defaults.m18
-rw-r--r--test/Driver/darwin-objc-gc.m2
-rw-r--r--test/Driver/darwin-objc-options.m4
-rw-r--r--test/Driver/darwin-verify-debug.c8
-rw-r--r--test/Driver/darwin-version.c8
-rw-r--r--test/Driver/darwin-xarch.c6
-rw-r--r--test/Driver/default-toolchain.c6
-rw-r--r--test/Driver/dragonfly.c2
-rw-r--r--test/Driver/exceptions.m2
-rw-r--r--test/Driver/flags.c6
-rw-r--r--test/Driver/frame-pointer.c20
-rw-r--r--test/Driver/freebsd.c6
-rw-r--r--test/Driver/gcc_forward.c2
-rw-r--r--test/Driver/gnu-runtime.m4
-rw-r--r--test/Driver/ios-simulator-arcruntime.c4
-rw-r--r--test/Driver/le32-unknown-nacl.cpp6
-rw-r--r--test/Driver/linux-header-search.cpp2
-rw-r--r--test/Driver/linux-ld.c36
-rw-r--r--test/Driver/mno-global-merge.c4
-rw-r--r--test/Driver/nostdlib.c2
-rw-r--r--test/Driver/nostdlibinc.c2
-rw-r--r--test/Driver/openbsd.c2
-rw-r--r--test/Driver/phases.c22
-rw-r--r--test/Driver/redzone.c4
-rw-r--r--test/Driver/rewrite-objc.m6
-rw-r--r--test/Driver/sysroot-flags.c6
-rw-r--r--test/Driver/sysroot.c6
-rw-r--r--test/Driver/unknown-gcc-arch.c8
-rw-r--r--test/Driver/x86_features.c2
-rw-r--r--test/Frontend/darwin-version.c20
-rw-r--r--test/Headers/c89.c2
-rw-r--r--test/Index/annotate-tokens.m2
-rw-r--r--test/Index/get-cursor.m2
-rw-r--r--test/Index/retain-target-options.c6
-rw-r--r--test/Index/usrs.m2
-rw-r--r--test/Misc/diag-format.c6
-rw-r--r--test/PCH/reloc.c6
-rw-r--r--test/Preprocessor/pic.c6
-rw-r--r--test/Preprocessor/x86_target_features.c8
-rw-r--r--tools/driver/driver.cpp4
75 files changed, 247 insertions, 248 deletions
diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td
index 90418ebf75..4aaf1a0a4e 100644
--- a/include/clang/Driver/Options.td
+++ b/include/clang/Driver/Options.td
@@ -101,6 +101,8 @@ def ccc_pch_is_pth : Flag<"-ccc-pch-is-pth">, CCCDriverOpt,
HelpText<"Use pretokenized headers for precompiled headers">;
class CCCDebugOpt : Group<ccc_debug_Group>, Flags<[DriverOption, HelpHidden]>;
+def ccc_host_triple : Separate<"-ccc-host-triple">, CCCDebugOpt,
+ HelpText<"Simulate running on the given target">;
def ccc_install_dir : Separate<"-ccc-install-dir">, CCCDebugOpt,
HelpText<"Simulate installation in the given directory">;
def ccc_print_options : Flag<"-ccc-print-options">, CCCDebugOpt,
@@ -752,16 +754,11 @@ def stdlib_EQ : Joined<"-stdlib=">;
def sub__library : JoinedOrSeparate<"-sub_library">;
def sub__umbrella : JoinedOrSeparate<"-sub_umbrella">;
def s : Flag<"-s">;
-def target : Separate<"-target">,
- HelpText<"Generate code for the given target">;
-// We should deprecate the use of -ccc-host-triple, and then remove.
-def ccc_host_triple : Flag<"-ccc-host-triple">, Alias<target>;
def time : Flag<"-time">,
HelpText<"Time individual commands">;
def traditional_cpp : Flag<"-traditional-cpp">;
def traditional : Flag<"-traditional">;
def trigraphs : Flag<"-trigraphs">;
-def triple : Flag<"-triple">, Alias<target>;
def twolevel__namespace__hints : Flag<"-twolevel_namespace_hints">;
def twolevel__namespace : Flag<"-twolevel_namespace">;
def t : Flag<"-t">;
diff --git a/lib/Basic/Targets.cpp b/lib/Basic/Targets.cpp
index 47598f8152..b6c07567a9 100644
--- a/lib/Basic/Targets.cpp
+++ b/lib/Basic/Targets.cpp
@@ -148,7 +148,7 @@ static void getDarwinDefines(MacroBuilder &Builder, const LangOptions &Opts,
}
}
- // If -target arch-pc-win32-macho option specified, we're
+ // If -ccc-host-triple arch-pc-win32-macho option specified, we're
// generating code for Win32 ABI. No need to emit
// __ENVIRONMENT_XX_OS_VERSION_MIN_REQUIRED__.
if (PlatformName == "win32") {
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index 19ed16c9d5..ce4a89e724 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -305,7 +305,7 @@ Compilation *Driver::BuildCompilation(ArrayRef<const char *> ArgList) {
}
// FIXME: We shouldn't overwrite the default host triple here, but we have
// nowhere else to put this currently.
- if (const Arg *A = Args->getLastArg(options::OPT_target))
+ if (const Arg *A = Args->getLastArg(options::OPT_ccc_host_triple))
DefaultTargetTriple = A->getValue(*Args);
if (const Arg *A = Args->getLastArg(options::OPT_ccc_install_dir))
Dir = InstalledDir = A->getValue(*Args);
diff --git a/test/ARCMT/driver-migrate.m b/test/ARCMT/driver-migrate.m
index a2b1a7dc27..32e84d7578 100644
--- a/test/ARCMT/driver-migrate.m
+++ b/test/ARCMT/driver-migrate.m
@@ -3,9 +3,9 @@
// CHECK: "-arcmt-migrate" "-arcmt-migrate-directory" "{{[^"]*}}/foo/bar"
// RUN: touch %t.o
-// RUN: %clang -ccc-arcmt-check -target i386-apple-darwin9 -### %t.o 2> %t.log
+// RUN: %clang -ccc-arcmt-check -ccc-host-triple i386-apple-darwin9 -### %t.o 2> %t.log
// RUN: FileCheck -check-prefix=LINK %s < %t.log
-// RUN: %clang -ccc-arcmt-migrate /foo/bar -target i386-apple-darwin9 -### %t.o 2> %t.log
+// RUN: %clang -ccc-arcmt-migrate /foo/bar -ccc-host-triple i386-apple-darwin9 -### %t.o 2> %t.log
// RUN: FileCheck -check-prefix=LINK %s < %t.log
// LINK-NOT: {{ld(.exe)?"}}
diff --git a/test/CodeGen/2009-10-20-GlobalDebug.c b/test/CodeGen/2009-10-20-GlobalDebug.c
index d258ef26c6..6f329d5368 100644
--- a/test/CodeGen/2009-10-20-GlobalDebug.c
+++ b/test/CodeGen/2009-10-20-GlobalDebug.c
@@ -1,5 +1,5 @@
// REQUIRES: x86-registered-target
-// RUN: %clang -target i386-apple-darwin10 -flto -S -g %s -o - | FileCheck %s
+// RUN: %clang -ccc-host-triple i386-apple-darwin10 -flto -S -g %s -o - | FileCheck %s
int global;
int main() {
static int localstatic;
diff --git a/test/CodeGen/frame-pointer-elim.c b/test/CodeGen/frame-pointer-elim.c
index b105a199f1..4e8e946210 100644
--- a/test/CodeGen/frame-pointer-elim.c
+++ b/test/CodeGen/frame-pointer-elim.c
@@ -1,6 +1,6 @@
// REQUIRES: x86-registered-target
-// RUN: %clang -target i386-apple-darwin -S -o - %s | \
+// RUN: %clang -ccc-host-triple i386-apple-darwin -S -o - %s | \
// RUN: FileCheck --check-prefix=DARWIN %s
// DARWIN: f0:
// DARWIN: pushl %ebp
@@ -9,7 +9,7 @@
// DARWIN: pushl %ebp
// DARWIN: ret
-// RUN: %clang -target i386-pc-linux-gnu -S -o - %s | \
+// RUN: %clang -ccc-host-triple i386-pc-linux-gnu -S -o - %s | \
// RUN: FileCheck --check-prefix=LINUX %s
// LINUX: f0:
// LINUX-NOT: pushl %ebp
@@ -18,7 +18,7 @@
// LINUX: pushl %ebp
// LINUX: ret
-// RUN: %clang -target i386-darwin -S -o - -fomit-frame-pointer %s | \
+// RUN: %clang -ccc-host-triple i386-darwin -S -o - -fomit-frame-pointer %s | \
// RUN: FileCheck --check-prefix=OMIT_ALL %s
// OMIT_ALL: f0:
// OMIT_ALL-NOT: pushl %ebp
@@ -27,7 +27,7 @@
// OMIT_ALL-NOT: pushl %ebp
// OMIT_ALL: ret
-// RUN: %clang -target i386-darwin -S -o - -momit-leaf-frame-pointer %s | \
+// RUN: %clang -ccc-host-triple i386-darwin -S -o - -momit-leaf-frame-pointer %s | \
// RUN: FileCheck --check-prefix=OMIT_LEAF %s
// OMIT_LEAF: f0:
// OMIT_LEAF-NOT: pushl %ebp
diff --git a/test/CodeGen/mips64-f128-literal.c b/test/CodeGen/mips64-f128-literal.c
index 2f01520a4f..2284b2663a 100644
--- a/test/CodeGen/mips64-f128-literal.c
+++ b/test/CodeGen/mips64-f128-literal.c
@@ -1,4 +1,4 @@
-// RUN: %clang -target mips64el-unknown-linux -ccc-clang-archs mips64el -O3 -S -mabi=n64 -o - -emit-llvm %s | FileCheck %s
+// RUN: %clang -ccc-host-triple mips64el-unknown-linux -ccc-clang-archs mips64el -O3 -S -mabi=n64 -o - -emit-llvm %s | FileCheck %s
typedef long double LD;
diff --git a/test/CodeGen/mips64-padding-arg.c b/test/CodeGen/mips64-padding-arg.c
index b4dcfbace9..6504a7eb9e 100644
--- a/test/CodeGen/mips64-padding-arg.c
+++ b/test/CodeGen/mips64-padding-arg.c
@@ -1,4 +1,4 @@
-// RUN: %clang -target mips64el-unknown-linux -ccc-clang-archs mips64el -O3 -S -mabi=n64 -o - -emit-llvm %s | FileCheck %s
+// RUN: %clang -ccc-host-triple mips64el-unknown-linux -ccc-clang-archs mips64el -O3 -S -mabi=n64 -o - -emit-llvm %s | FileCheck %s
typedef struct {
double d;
diff --git a/test/CodeGen/mmx-inline-asm.c b/test/CodeGen/mmx-inline-asm.c
index 635e2a6b71..5d1371ed90 100644
--- a/test/CodeGen/mmx-inline-asm.c
+++ b/test/CodeGen/mmx-inline-asm.c
@@ -1,4 +1,4 @@
-// RUN: %clang -mmmx -target i386-unknown-unknown -emit-llvm -S %s -o - | FileCheck %s
+// RUN: %clang -mmmx -ccc-host-triple i386-unknown-unknown -emit-llvm -S %s -o - | FileCheck %s
// <rdar://problem/9091220>
#include <mmintrin.h>
diff --git a/test/CodeGen/mmx-shift-with-immediate.c b/test/CodeGen/mmx-shift-with-immediate.c
index ecd1881c48..f430d2e4a2 100644
--- a/test/CodeGen/mmx-shift-with-immediate.c
+++ b/test/CodeGen/mmx-shift-with-immediate.c
@@ -1,4 +1,4 @@
-// RUN: %clang -mmmx -target i386-unknown-unknown -emit-llvm -S %s -o - | FileCheck %s
+// RUN: %clang -mmmx -ccc-host-triple i386-unknown-unknown -emit-llvm -S %s -o - | FileCheck %s
#include <mmintrin.h>
void shift(__m64 a, __m64 b, int c) {
diff --git a/test/CodeGenCXX/apple-kext-guard-variable.cpp b/test/CodeGenCXX/apple-kext-guard-variable.cpp
index 76875a0b69..26b0d14b34 100644
--- a/test/CodeGenCXX/apple-kext-guard-variable.cpp
+++ b/test/CodeGenCXX/apple-kext-guard-variable.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang -target x86_64-apple-darwin10 -S -o %t.s -mkernel -Xclang -verify %s
+// RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -S -o %t.s -mkernel -Xclang -verify %s
// rdar://problem/9143356
diff --git a/test/CodeGenCXX/cxx-apple-kext.cpp b/test/CodeGenCXX/cxx-apple-kext.cpp
index e5ec78bf5c..e9a17277b0 100644
--- a/test/CodeGenCXX/cxx-apple-kext.cpp
+++ b/test/CodeGenCXX/cxx-apple-kext.cpp
@@ -1,6 +1,6 @@
-// RUN: %clangxx -target x86_64-apple-darwin10 %s -flto -S -o - |\
+// RUN: %clangxx -ccc-host-triple x86_64-apple-darwin10 %s -flto -S -o - |\
// RUN: FileCheck --check-prefix=CHECK-NO-KEXT %s
-// RUN: %clangxx -target x86_64-apple-darwin10 %s -fapple-kext -flto -S -o - |\
+// RUN: %clangxx -ccc-host-triple x86_64-apple-darwin10 %s -fapple-kext -flto -S -o - |\
// RUN: FileCheck --check-prefix=CHECK-KEXT %s
// CHECK-NO-KEXT-NOT: _GLOBAL__D_a
diff --git a/test/Coverage/targets.c b/test/Coverage/targets.c
index 7c05122e6b..526458c29a 100644
--- a/test/Coverage/targets.c
+++ b/test/Coverage/targets.c
@@ -16,5 +16,5 @@
// RUN: %clang_cc1 -g -triple x86_64-unknown-unknown -emit-llvm -o %t %s
// <rdar://problem/7181838> clang 1.0 fails to compile Python 2.6
-// RUN: %clang -target x86_64-apple-darwin9 -### -S %s -mmacosx-version-min=10.4
+// RUN: %clang -ccc-host-triple x86_64-apple-darwin9 -### -S %s -mmacosx-version-min=10.4
diff --git a/test/Driver/Wp-args.c b/test/Driver/Wp-args.c
index 0ab85b4c9c..e072263c4f 100644
--- a/test/Driver/Wp-args.c
+++ b/test/Driver/Wp-args.c
@@ -1,7 +1,7 @@
// Check that we extract -MD from '-Wp,-MD,FOO', which is used by a number of
// major projects (e.g., FireFox and the Linux Kernel).
-// RUN: %clang --target i386-pc-linux-gnu -### \
+// RUN: %clang --ccc-host-triple i386-pc-linux-gnu -### \
// RUN: -Wp,-MD,FOO.d -fsyntax-only %s 2> %t
// RUN: FileCheck < %t %s
//
diff --git a/test/Driver/Xarch.c b/test/Driver/Xarch.c
index 2523f5acac..b35bf6c92d 100644
--- a/test/Driver/Xarch.c
+++ b/test/Driver/Xarch.c
@@ -1,9 +1,9 @@
-// RUN: %clang -target i386-apple-darwin9 -m32 -Xarch_i386 -O2 %s -S -### 2> %t.log
+// RUN: %clang -ccc-host-triple i386-apple-darwin9 -m32 -Xarch_i386 -O2 %s -S -### 2> %t.log
// RUN: grep ' "-O2" ' %t.log | count 1
-// RUN: %clang -target i386-apple-darwin9 -m64 -Xarch_i386 -O2 %s -S -### 2> %t.log
+// RUN: %clang -ccc-host-triple i386-apple-darwin9 -m64 -Xarch_i386 -O2 %s -S -### 2> %t.log
// RUN: grep ' "-O2" ' %t.log | count 0
// RUN: grep "argument unused during compilation: '-Xarch_i386 -O2'" %t.log
-// RUN: not %clang -target i386-apple-darwin9 -m32 -Xarch_i386 -o -Xarch_i386 -S %s -S -Xarch_i386 -o 2> %t.log
+// RUN: not %clang -ccc-host-triple i386-apple-darwin9 -m32 -Xarch_i386 -o -Xarch_i386 -S %s -S -Xarch_i386 -o 2> %t.log
// RUN: grep "error: invalid Xarch argument: '-Xarch_i386 -o'" %t.log | count 2
// RUN: grep "error: invalid Xarch argument: '-Xarch_i386 -S'" %t.log
diff --git a/test/Driver/Xlinker-args.c b/test/Driver/Xlinker-args.c
index b4e5a9b08f..b009bffd59 100644
--- a/test/Driver/Xlinker-args.c
+++ b/test/Driver/Xlinker-args.c
@@ -1,7 +1,7 @@
// Check that we extract --no-demangle from '-Xlinker' and '-Wl,', since that
// was a collect2 argument.
-// RUN: %clang -target i386-apple-darwin9 -### \
+// RUN: %clang -ccc-host-triple i386-apple-darwin9 -### \
// RUN: -Xlinker one -Xlinker --no-demangle \
// RUN: -Wl,two,--no-demangle,three -Xlinker four %s 2> %t
// RUN: FileCheck < %t %s
diff --git a/test/Driver/analyze.c b/test/Driver/analyze.c
index 68fa218e81..359b0e005b 100644
--- a/test/Driver/analyze.c
+++ b/test/Driver/analyze.c
@@ -1,7 +1,7 @@
// Verify that the analyzer gets the same flags as normal compilation
// (at least for a few key ones).
-// RUN: env MACOSX_DEPLOYMENT_TARGET=10.5 %clang -target i386-apple-darwin9 -### --analyze -o /dev/null %s -msse 2> %t.log
+// RUN: env MACOSX_DEPLOYMENT_TARGET=10.5 %clang -ccc-host-triple i386-apple-darwin9 -### --analyze -o /dev/null %s -msse 2> %t.log
// RUN: FileCheck --input-file=%t.log %s
// CHECK: "-analyze"
diff --git a/test/Driver/apple-kext-i386.cpp b/test/Driver/apple-kext-i386.cpp
index c82cd87404..0b5440b872 100644
--- a/test/Driver/apple-kext-i386.cpp
+++ b/test/Driver/apple-kext-i386.cpp
@@ -1,21 +1,21 @@
// Check that we transparently fallback to llvm-gcc for i386 kexts, we don't
// support the ABI they use (yet).
-// RUN: %clang -target i386-apple-darwin10 \
+// RUN: %clang -ccc-host-triple i386-apple-darwin10 \
// RUN: -fapple-kext -### -fsyntax-only %s 2> %t
// RUN: FileCheck --check-prefix=CHECK < %t %s
// CHECK: cc1plus"
// CHECK: "-fapple-kext"
-// RUN: %clang -target i386-apple-darwin10 \
+// RUN: %clang -ccc-host-triple i386-apple-darwin10 \
// RUN: -mkernel -### -fsyntax-only %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-MKERNEL < %t %s
// CHECK-MKERNEL: cc1plus"
// CHECK-MKERNEL: "-mkernel"
-// RUN: %clang -target i386-apple-darwin10 \
+// RUN: %clang -ccc-host-triple i386-apple-darwin10 \
// RUN: -Wno-self-assign -Wc++11-extensions -Wno-microsoft -Wmicrosoft -Wvla \
// RUN: -faltivec -mthumb -mcpu=G4 -mlongcall -mno-longcall -msoft-float \
// RUN: -fapple-kext -### -fsyntax-only %s 2> %t
@@ -33,7 +33,7 @@
// CHECK-UNSUPPORTED: "-mno-longcall"
// CHECK-UNSUPPORTED: "-msoft-float"
-// RUN: %clang -target i386-apple-darwin10 \
+// RUN: %clang -ccc-host-triple i386-apple-darwin10 \
// RUN: -Wconstant-logical-operand -save-temps \
// RUN: -fapple-kext -### -fsyntax-only %s 2> %t
// RUN: FileCheck --check-prefix=CHECK-UNSUPPORTED2 < %t %s
diff --git a/test/Driver/apple-kext-mkernel.c b/test/Driver/apple-kext-mkernel.c
index fe16847e3c..82a6896415 100644
--- a/