/// jobs.
unsigned CheckInputsExist : 1;
- /// Use the clang compiler where possible.
- unsigned CCCUseClang : 1;
-
/// \brief Force use of clang frontend.
unsigned ForcedClangUse : 1;
def ccc_gcc_name : Separate<["-"], "ccc-gcc-name">, CCCDriverOpt,
HelpText<"Name for native GCC compiler">,
MetaVarName<"<gcc-path>">;
-def ccc_no_clang : Flag<["-"], "ccc-no-clang">, CCCDriverOpt,
- HelpText<"Disable the clang compiler">;
def ccc_clang_archs : Separate<["-"], "ccc-clang-archs">, CCCDriverOpt,
HelpText<"Comma separate list of architectures to use the clang compiler for">,
MetaVarName<"<arch-list>">;
CCCIsCPP(false),CCCEcho(false), CCCPrintBindings(false),
CCPrintOptions(false), CCPrintHeaders(false), CCLogDiagnostics(false),
CCGenDiagnostics(false), CCCGenericGCCName(""), CheckInputsExist(true),
- CCCUseClang(true),
ForcedClangUse(false), CCCUsePCH(true), SuppressMissingInputWarning(false) {
Name = llvm::sys::path::stem(ClangExecutable);
CCCGenericGCCName = A->getValue(*Args);
CCCUsePCH = Args->hasFlag(options::OPT_ccc_pch_is_pch,
options::OPT_ccc_pch_is_pth);
- CCCUseClang = !Args->hasArg(options::OPT_ccc_no_clang);
// FIXME: DefaultTargetTriple is used by the target-prefixed calls to as/ld
// and getToolChain is const.
if (const Arg *A = Args->getLastArg(options::OPT_target))
const llvm::Triple &Triple) const {
// Check if user requested no clang, or clang doesn't understand this type (we
// only handle single inputs for now).
- if (!CCCUseClang || JA.size() != 1 ||
+ if (JA.size() != 1 ||
!types::isAcceptedByClang((*JA.begin())->getType()))
return false;
// RUX: not grep -- "-fno-builtin-strcat" %t &&
// RUX: not grep -- "-fno-builtin-strcpy" %t &&
-// RUN: %clang -ccc-no-clang -target x86_64-apple-darwin9 -arch arm -### -fsyntax-only %s -fbuiltin-strcat -fbuiltin-strcpy 2> %t
+// RUN: %clang -target x86_64-apple-darwin9 -arch arm -### -fsyntax-only %s -fbuiltin-strcat -fbuiltin-strcpy 2> %t
// RUN: not grep -- "-fno-builtin-strcat" %t
// RUN: not grep -- "-fno-builtin-strcpy" %t
// CHECK01: "gcc::Assemble", inputs: ["{{.*}}.s"], output: "{{.*}}.o"
// CHECK01: "gcc::Link", inputs: ["{{.*}}.o"], output: "a.out"
-// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang %s 2>&1 | FileCheck %s --check-prefix=CHECK02
-// CHECK02: "gcc::Compile", inputs: ["{{.*}}bindings.c"], output: "{{.*}}.s"
-// CHECK02: "gcc::Assemble", inputs: ["{{.*}}.s"], output: "{{.*}}.o"
-// CHECK02: "gcc::Link", inputs: ["{{.*}}.o"], output: "a.out"
-
-// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -no-integrated-cpp %s 2>&1 | FileCheck %s --check-prefix=CHECK03
-// CHECK03: "gcc::Preprocess", inputs: ["{{.*}}bindings.c"], output: "{{.*}}.i"
-// CHECK03: "gcc::Compile", inputs: ["{{.*}}.i"], output: "{{.*}}.s"
-// CHECK03: "gcc::Assemble", inputs: ["{{.*}}.s"], output: "{{.*}}.o"
-// CHECK03: "gcc::Link", inputs: ["{{.*}}.o"], output: "a.out"
-
-// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -x c-header %s 2>&1 | FileCheck %s --check-prefix=CHECK04
-// CHECK04: "gcc::Precompile", inputs: ["{{.*}}bindings.c"], output: "{{.*}}bindings.c.gch
-
// Clang control options
// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix=CHECK05
// CHECK05: "clang", inputs: ["{{.*}}bindings.c"], output: (nothing)
-// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix=CHECK06
-// CHECK06: "gcc::Compile", inputs: ["{{.*}}bindings.c"], output: (nothing)
-
// RUN: %clang -target i386-unknown-unknown -ccc-print-bindings -fsyntax-only -x c++ %s 2>&1 | FileCheck %s --check-prefix=CHECK08
// CHECK08: "clang", inputs: ["{{.*}}bindings.c"], output: (nothing)
+++ /dev/null
-// RUN: %clang -ccc-no-clang -target i386-apple-darwin10 -m32 -### -MD -g -fast -Q -dA -mkernel -ansi -aFOO -S -o /tmp/OUTPUTNAME -g0 -gfull -O2 -Werror -pedantic -Wmost -w -std=c99 -trigraphs -v -pg -fFOO -undef -Qn --param a=b -fmudflap -coverage -save-temps -nostdinc -I ARG0 -F ARG1 -I ARG2 -P -MF ARG3 -MG -MP -remap -g3 -H -D ARG4 -U ARG5 -A ARG6 -D ARG7 -U ARG8 -A ARG9 -include ARG10 -pthread %s 2> %t.log
-// RUN: FileCheck %s < %t.log
-// CHECK: {{ ".*cc1.*" "-E" "-nostdinc" "-v" "-I" "ARG0" "-FARG1" "-I" "ARG2" "-P" "-MD" "[^"]*/OUTPUTNAME.d" "-MF" "ARG3" "-MG" "-MP" "-MQ" "[^"]*/OUTPUTNAME" "-remap" "-dD" "-H" "-D__STATIC__" "-D_REENTRANT" "-D" "ARG4" "-U" "ARG5" "-A" "ARG6" "-D" "ARG7" "-U" "ARG8" "-A" "ARG9" "-include" "ARG10" ".*darwin-cc.c" "-D_MUDFLAP" "-include" "mf-runtime.h" "-m32" "-mkernel" "-mtune=core2" "-mmacosx-version-min=10.6.0" "-ansi" "-std=c99" "-trigraphs" "-Werror" "-pedantic" "-Wmost" "-w" "-fast" "-fno-eliminate-unused-debug-symbols" "-fFOO" "-fmudflap" "-O2" "-undef" "-fpch-preprocess" "-o" ".*darwin-cc.i"}}
-// CHECK: {{ ".*cc1.*" "-fpreprocessed" ".*darwin-cc.i" "-O3" "-dumpbase" ".*darwin-cc.c" "-dA" "-m32" "-mkernel" "-mtune=core2" "-mmacosx-version-min=10.6.0" "-ansi" "-aFOO" "-auxbase-strip" "[^"]*/OUTPUTNAME" "-g" "-g0" "-g" "-g3" "-O2" "-Werror" "-pedantic" "-Wmost" "-w" "-ansi" "-std=c99" "-trigraphs" "-version" "-p" "-fast" "-fno-eliminate-unused-debug-symbols" "-fFOO" "-fmudflap" "-undef" "-fno-ident" "-o" "[^"]*/OUTPUTNAME" "--param" "a=b" "-fno-builtin" "-fno-merge-constants" "-fprofile-arcs" "-ftest-coverage"}}
// FIXME: CHECK-NOT is broken somehow, it doesn't work here. Check adjacency instead.
// TEST0: "-fmessage-length" "0" "-stack-protector" "1" "-mstackrealign" "-fblocks" "-fobjc-runtime=macosx-fragile" "-fobjc-default-synthesize-properties" "-fno-objc-infer-related-result-type" "-fobjc-exceptions" "-fexceptions" "-fdiagnostics-show-option"
// TEST0: rewrite-legacy-objc.m"
-
-// RUN: not %clang -ccc-no-clang -target unknown -rewrite-legacy-objc %s -o - -### 2>&1 | \
-// RUN: FileCheck -check-prefix=TEST1 %s
-// TEST1: invalid output type 'rewritten-legacy-objc' for use with gcc
-
-// RUN: not %clang -ccc-no-clang -target i386-apple-darwin10 -rewrite-legacy-objc %s -o - -### 2>&1 | \
-// RUN: FileCheck -check-prefix=TEST2 %s
-// TEST2: invalid output type 'rewritten-legacy-objc' for use with gcc
// TEST0: "-rewrite-objc"
// FIXME: CHECK-NOT is broken somehow, it doesn't work here. Check adjacency instead.
// TEST0: "-fmessage-length" "0" "-stack-protector" "1" "-mstackrealign" "-fblocks" "-fobjc-runtime=macosx" "-fobjc-dispatch-method=mixed" "-fobjc-default-synthesize-properties" "-fno-objc-infer-related-result-type" "-fobjc-exceptions" "-fexceptions" "-fdiagnostics-show-option"
-
-// RUN: not %clang -ccc-no-clang -target unknown -rewrite-objc %s -o - -### 2>&1 | \
-// RUN: FileCheck -check-prefix=TEST1 %s
-// TEST1: invalid output type 'rewritten-objc' for use with gcc
-
-// RUN: not %clang -ccc-no-clang -target i386-apple-darwin10 -rewrite-objc %s -o - -### 2>&1 | \
-// RUN: FileCheck -check-prefix=TEST2 %s
-// TEST2: invalid output type 'rewritten-objc' for use with gcc