[cfe-commits] r76886 - in /cfe/trunk: lib/Driver/Driver.cpp test/Driver/bindings.c

Daniel Dunbar daniel at zuster.org
Thu Jul 23 10:49:15 PDT 2009


Author: ddunbar
Date: Thu Jul 23 12:48:59 2009
New Revision: 76886

URL: http://llvm.org/viewvc/llvm-project?rev=76886&view=rev
Log:
Switch the driver back to always using clang-cc by default (for C++, and
regardless of the architecture).
 - This is a good default for development & testing; for example without this
   any tests using 'clang' in the test suite will fail on PowerPC, since the
   driver will avoid using clang.

 - We don't want to actually ship something built this way, but that should be
   handled via some sort of configuration file.

Modified:
    cfe/trunk/lib/Driver/Driver.cpp
    cfe/trunk/test/Driver/bindings.c

Modified: cfe/trunk/lib/Driver/Driver.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Driver.cpp?rev=76886&r1=76885&r2=76886&view=diff

==============================================================================
--- cfe/trunk/lib/Driver/Driver.cpp (original)
+++ cfe/trunk/lib/Driver/Driver.cpp Thu Jul 23 12:48:59 2009
@@ -46,13 +46,10 @@
     DefaultImageName(_DefaultImageName),
     Host(0),
     CCCIsCXX(false), CCCEcho(false), CCCPrintBindings(false),
-    CCCGenericGCCName("gcc"), CCCUseClang(true), CCCUseClangCXX(false), 
+    CCCGenericGCCName("gcc"), CCCUseClang(true), CCCUseClangCXX(true), 
     CCCUseClangCPP(true), CCCUsePCH(true),
     SuppressMissingInputWarning(false)
 {
-  // Only use clang on i386 and x86_64 by default.
-  CCCClangArchs.insert("i386");
-  CCCClangArchs.insert("x86_64");
 }
 
 Driver::~Driver() {
@@ -144,6 +141,8 @@
 
     } else if (!strcmp(Opt, "clang-cxx")) {
       CCCUseClangCXX = true;
+    } else if (!strcmp(Opt, "no-clang-cxx")) {
+      CCCUseClangCXX = false;
     } else if (!strcmp(Opt, "pch-is-pch")) {
       CCCUsePCH = true;
     } else if (!strcmp(Opt, "pch-is-pth")) {

Modified: cfe/trunk/test/Driver/bindings.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/bindings.c?rev=76886&r1=76885&r2=76886&view=diff

==============================================================================
--- cfe/trunk/test/Driver/bindings.c (original)
+++ cfe/trunk/test/Driver/bindings.c Thu Jul 23 12:48:59 2009
@@ -30,7 +30,7 @@
 // RUN: grep '"clang", inputs: \[".*bindings.c"\], output: (nothing)' %t &&
 // RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-no-clang -fsyntax-only %s 2> %t &&
 // RUN: grep '"gcc::Compile", inputs: \[".*bindings.c"\], output: (nothing)' %t &&
-// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -fsyntax-only -x c++ %s 2> %t &&
+// RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-no-clang-cxx -fsyntax-only -x c++ %s 2> %t &&
 // RUN: grep '"gcc::Compile", inputs: \[".*bindings.c"\], output: (nothing)' %t &&
 // RUN: clang -ccc-host-triple i386-unknown-unknown -ccc-print-bindings -ccc-clang-cxx -fsyntax-only -x c++ %s 2> %t &&
 // RUN: grep '"clang", inputs: \[".*bindings.c"\], output: (nothing)' %t &&
@@ -44,7 +44,7 @@
 
 // RUN: clang -ccc-host-triple powerpc-unknown-unknown -ccc-print-bindings -ccc-clang-archs "" %s -S 2> %t &&
 // RUN: grep '"clang", inputs: \[".*bindings.c"\], output: "bindings.s"' %t &&
-// RUN: clang -ccc-host-triple powerpc-unknown-unknown -ccc-print-bindings %s -S 2> %t &&
+// RUN: clang -ccc-host-triple powerpc-unknown-unknown -ccc-print-bindings -ccc-clang-archs "i386" %s -S 2> %t &&
 // RUN: grep '"gcc::Compile", inputs: \[".*bindings.c"\], output: "bindings.s"' %t &&
 
 // Darwin bindings





More information about the cfe-commits mailing list