diff options
author | Sebastian Pop <spop@codeaurora.org> | 2012-01-13 20:37:02 +0000 |
---|---|---|
committer | Sebastian Pop <spop@codeaurora.org> | 2012-01-13 20:37:02 +0000 |
commit | edd4f3c39101912605c2a1868dd2be71aa218798 (patch) | |
tree | 3996d15c1eb423541f22e72c8d06cd995fe181bc | |
parent | 9606a57b6f2c43bf438a958fdffea1de60f6b2b7 (diff) |
rename -ccc-host-triple into -target
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@148138 91177308-0d34-0410-b5e6-96231b3b80d8
75 files changed, 248 insertions, 247 deletions
diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index 7325cca7d5..3c4a73cc33 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -101,8 +101,6 @@ 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, @@ -757,11 +755,16 @@ 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 f3d5550bb6..b08a3d30f1 100644 --- a/lib/Basic/Targets.cpp +++ b/lib/Basic/Targets.cpp @@ -148,7 +148,7 @@ static void getDarwinDefines(MacroBuilder &Builder, const LangOptions &Opts, } } - // If -ccc-host-triple arch-pc-win32-macho option specified, we're + // If -target 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 ce4a89e724..19ed16c9d5 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_ccc_host_triple)) + if (const Arg *A = Args->getLastArg(options::OPT_target)) 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 32e84d7578..a2b1a7dc27 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 -ccc-host-triple i386-apple-darwin9 -### %t.o 2> %t.log +// RUN: %clang -ccc-arcmt-check -target i386-apple-darwin9 -### %t.o 2> %t.log // RUN: FileCheck -check-prefix=LINK %s < %t.log -// RUN: %clang -ccc-arcmt-migrate /foo/bar -ccc-host-triple i386-apple-darwin9 -### %t.o 2> %t.log +// RUN: %clang -ccc-arcmt-migrate /foo/bar -target 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 6f329d5368..d258ef26c6 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 -ccc-host-triple i386-apple-darwin10 -flto -S -g %s -o - | FileCheck %s +// RUN: %clang -target 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 4e8e946210..b105a199f1 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 -ccc-host-triple i386-apple-darwin -S -o - %s | \ +// RUN: %clang -target 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 -ccc-host-triple i386-pc-linux-gnu -S -o - %s | \ +// RUN: %clang -target 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 -ccc-host-triple i386-darwin -S -o - -fomit-frame-pointer %s | \ +// RUN: %clang -target 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 -ccc-host-triple i386-darwin -S -o - -momit-leaf-frame-pointer %s | \ +// RUN: %clang -target 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 2284b2663a..2f01520a4f 100644 --- a/test/CodeGen/mips64-f128-literal.c +++ b/test/CodeGen/mips64-f128-literal.c @@ -1,4 +1,4 @@ -// RUN: %clang -ccc-host-triple mips64el-unknown-linux -ccc-clang-archs mips64el -O3 -S -mabi=n64 -o - -emit-llvm %s | FileCheck %s +// RUN: %clang -target 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 6504a7eb9e..b4dcfbace9 100644 --- a/test/CodeGen/mips64-padding-arg.c +++ b/test/CodeGen/mips64-padding-arg.c @@ -1,4 +1,4 @@ -// RUN: %clang -ccc-host-triple mips64el-unknown-linux -ccc-clang-archs mips64el -O3 -S -mabi=n64 -o - -emit-llvm %s | FileCheck %s +// RUN: %clang -target 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 5d1371ed90..635e2a6b71 100644 --- a/test/CodeGen/mmx-inline-asm.c +++ b/test/CodeGen/mmx-inline-asm.c @@ -1,4 +1,4 @@ -// RUN: %clang -mmmx -ccc-host-triple i386-unknown-unknown -emit-llvm -S %s -o - | FileCheck %s +// RUN: %clang -mmmx -target 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 f430d2e4a2..ecd1881c48 100644 --- a/test/CodeGen/mmx-shift-with-immediate.c +++ b/test/CodeGen/mmx-shift-with-immediate.c @@ -1,4 +1,4 @@ -// RUN: %clang -mmmx -ccc-host-triple i386-unknown-unknown -emit-llvm -S %s -o - | FileCheck %s +// RUN: %clang -mmmx -target 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 26b0d14b34..76875a0b69 100644 --- a/test/CodeGenCXX/apple-kext-guard-variable.cpp +++ b/test/CodeGenCXX/apple-kext-guard-variable.cpp @@ -1,4 +1,4 @@ -// RUN: %clang -ccc-host-triple x86_64-apple-darwin10 -S -o %t.s -mkernel -Xclang -verify %s +// RUN: %clang -target 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 e9a17277b0..e5ec78bf5c 100644 --- a/test/CodeGenCXX/cxx-apple-kext.cpp +++ b/test/CodeGenCXX/cxx-apple-kext.cpp @@ -1,6 +1,6 @@ -// RUN: %clangxx -ccc-host-triple x86_64-apple-darwin10 %s -flto -S -o - |\ +// RUN: %clangxx -target x86_64-apple-darwin10 %s -flto -S -o - |\ // RUN: FileCheck --check-prefix=CHECK-NO-KEXT %s -// RUN: %clangxx -ccc-host-triple x86_64-apple-darwin10 %s -fapple-kext -flto -S -o - |\ +// RUN: %clangxx -target 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 526458c29a..7c05122e6b 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 -ccc-host-triple x86_64-apple-darwin9 -### -S %s -mmacosx-version-min=10.4 +// RUN: %clang -target 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 e072263c4f..0ab85b4c9c 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 --ccc-host-triple i386-pc-linux-gnu -### \ +// RUN: %clang --target 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 b35bf6c92d..2523f5acac 100644 --- a/test/Driver/Xarch.c +++ b/test/Driver/Xarch.c @@ -1,9 +1,9 @@ -// RUN: %clang -ccc-host-triple i386-apple-darwin9 -m32 -Xarch_i386 -O2 %s -S -### 2> %t.log +// RUN: %clang -target i386-apple-darwin9 -m32 -Xarch_i386 -O2 %s -S -### 2> %t.log // RUN: grep ' "-O2" ' %t.log | count 1 -// RUN: %clang -ccc-host-triple i386-apple-darwin9 -m64 -Xarch_i386 -O2 %s -S -### 2> %t.log +// RUN: %clang -target 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 -ccc-host-triple i386-apple-darwin9 -m32 -Xarch_i386 -o -Xarch_i386 -S %s -S -Xarch_i386 -o 2> %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: 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 b009bffd59..b4e5a9b08f 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 -ccc-host-triple i386-apple-darwin9 -### \ +// RUN: %clang -target 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 359b0e005b..68fa218e81 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 -ccc-host-triple i386-apple-darwin9 -### --analyze -o /dev/null %s -msse 2> %t.log +// RUN: env MACOSX_DEPLOYMENT_TARGET=10.5 %clang -target 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 0b5440b872..c82cd87404 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 -ccc-host-triple i386-apple-darwin10 \ +// RUN: %clang -target 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 -ccc-host-triple i386-apple-darwin10 \ +// RUN: %clang -target 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 -ccc-host-triple i386-apple-darwin10 \ +// RUN: %clang -target 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 -ccc-host-triple i386-apple-darwin10 \ +// RUN: %clang -target 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 82a6896415..fe16847e3c 100644 --- a/test/Driver/apple-kext-mkernel.c +++ b/test/Driver/apple-kext-mkernel.c @@ -1,4 +1,4 @@ -// RUN: %clang -ccc-host-triple x86_64-apple-darwin10 \ +// RUN: %clang -target x86_64-apple-darwin10 \ // RUN: -mkernel -### -fsyntax-only %s 2> %t // RUN: FileCheck --check-prefix=CHECK-X86 < %t %s @@ -7,7 +7,7 @@ // CHECK-X86: "-fno-rtti" // CHECK-X86: "-fno-common" -// RUN: %clang -ccc-host-triple x86_64-apple-darwin10 \ +// RUN: %clang -target x86_64-apple-darwin10 \ // RUN: -arch armv7 -mkernel -### -fsyntax-only %s 2> %t // RUN: FileCheck --check-prefix=CHECK-ARM < %t %s diff --git a/test/Driver/arc.c b/test/Driver/arc.c index a4d4ed1c60..96f03656e6 100644 --- a/test/Driver/arc.c +++ b/test/Driver/arc.c @@ -1,8 +1,8 @@ -// RUN: %clang -ObjC -ccc-host-triple i386-apple-darwin9 -m32 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck %s -// RUN: %clang -x objective-c -ccc-host-triple i386-apple-darwin9 -m32 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck %s -// RUN: %clang -x objective-c++ -ccc-host-triple i386-apple-darwin9 -m32 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck %s -// RUN: %clang -x c -ccc-host-triple i386-apple-darwin9 -m32 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck -check-prefix NOTOBJC %s -// RUN: %clang -x c++ -ccc-host-triple i386-apple-darwin9 -m32 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck -check-prefix NOTOBJC %s +// RUN: %clang -ObjC -target i386-apple-darwin9 -m32 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck %s +// RUN: %clang -x objective-c -target i386-apple-darwin9 -m32 -fobjc-arc %s -fsyntax-only 2>&1 | FileCheck %s +// |