CCCIsCPP(false),CCCEcho(false), CCCPrintBindings(false),
CCPrintOptions(false), CCPrintHeaders(false), CCLogDiagnostics(false),
CCGenDiagnostics(false), CCCGenericGCCName(""), CheckInputsExist(true),
- ForcedClangUse(false), CCCUsePCH(true), SuppressMissingInputWarning(false) {
+ CCCUsePCH(true), SuppressMissingInputWarning(false) {
Name = llvm::sys::path::stem(ClangExecutable);
Dir = llvm::sys::path::parent_path(ClangExecutable);
Tool &Darwin::SelectTool(const Compilation &C, const JobAction &JA,
const ActionList &Inputs) const {
Action::ActionClass Key = JA.getKind();
- bool useClang = false;
if (getDriver().ShouldUseClangCompiler(C, JA, getTriple())) {
- useClang = true;
- // Fallback to llvm-gcc for i386 kext compiles, we don't support that ABI.
- if (!getDriver().shouldForceClangUse() &&
- Inputs.size() == 1 &&
- types::isCXX(Inputs[0]->getType()) &&
- getTriple().isOSDarwin() &&
- getTriple().getArch() == llvm::Triple::x86 &&
- (C.getArgs().getLastArg(options::OPT_fapple_kext) ||
- C.getArgs().getLastArg(options::OPT_mkernel)))
- useClang = false;
- }
-
- // FIXME: This seems like a hacky way to choose clang frontend.
- if (useClang)
+ // FIXME: This seems like a hacky way to choose clang frontend.
Key = Action::AnalyzeJobClass;
+ }
bool UseIntegratedAs = C.getArgs().hasFlag(options::OPT_integrated_as,
options::OPT_no_integrated_as,
// FIXME: We shouldn't have to pass in the path info.
driver::Driver TheDriver("clang", llvm::sys::getDefaultTargetTriple(),
"a.out", false, *Diags);
- // Force driver to use clang.
- // FIXME: This seems like a hack. Maybe the "Clang" tool subclass should be
- // available for using it to get the arguments, thus avoiding the overkill
- // of using the driver.
- TheDriver.setForcedClangUse();
// Don't check that inputs exist, they may have been remapped.
TheDriver.setCheckInputsExist(false);
+++ /dev/null
-// 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: -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: -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: -Wno-self-assign -Wc++11-extensions -Wno-microsoft -Wmicrosoft -Wvla \
-// RUN: -faltivec -mthumb -mcpu=G4 -mlongcall -mno-longcall -msoft-float \
-// RUN: -Wno-int-conversion -Wconstant-conversion -Wenum-conversion \
-// RUN: -fapple-kext -### -fsyntax-only %s 2> %t
-// RUN: FileCheck --check-prefix=CHECK-UNSUPPORTED < %t %s
-
-// CHECK-UNSUPPORTED: cc1plus"
-// CHECK-UNSUPPORTED-NOT: "-Wno-self-assign"
-// CHECK-UNSUPPORTED-NOT: "-Wc++11-extensions"
-// CHECK-UNSUPPORTED-NOT: "-Wno-microsoft"
-// CHECK-UNSUPPORTED-NOT: "-Wmicrosoft"
-// CHECK-UNSUPPORTED-NOT: "-Wvla"
-// CHECK-UNSUPPORTED-NOT: "-faltivec"
-// CHECK-UNSUPPORTED-NOT: "-mthumb"
-// CHECK-UNSUPPORTED-NOT: "-mlongcall"
-// CHECK-UNSUPPORTED: "-mno-longcall"
-// CHECK-UNSUPPORTED: "-msoft-float"
-// CHECK-UNSUPPORTED-NOT: "-Wno-int-conversion"
-// CHECK-UNSUPPORTED-NOT: "-Wconstant-conversion"
-// CHECK-UNSUPPORTED-NOT: "-Wenum-conversion"
-
-// 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
-
-// CHECK-UNSUPPORTED2: cc1plus"
-// CHECK-UNSUPPORTED2-NOT: "-Wconstant-logical-operand"
-
-// Check that -serialize-diagnostics does not cause an "argument unused" error.
-// RUN: %clang -target i386-apple-darwin10 \
-// RUN: -Wall -fapple-kext -### -serialize-diagnostics %t.dia -c %s 2>&1 | \
-// RUN: FileCheck --check-prefix=CHECK-UNUSED %s
-
-// Check that --serialize-diagnostics does not cause an "argument unused" error.
-// RUN: %clang -target i386-apple-darwin10 \
-// RUN: -Wall -fapple-kext -### --serialize-diagnostics %t.dia -c %s 2>&1 | \
-// RUN: FileCheck --check-prefix=CHECK-UNUSED %s
-
-// CHECK-UNUSED-NOT: argument unused
-// CHECK-UNUSED: cc1plus