Hi,

As part of making clang the default system compiler for FreeBSD, it
turned out there are quite a few programs out there, which assume 'CC'
is a C++ compiler.  In FreeBSD, we always had a link from /usr/bin/g++
to /usr/bin/CC for that purpose.

Clang already recognizes a number of different program names, and
deduces the correct behaviour from them.  I would like to propose adding
'CC' and 'clang-CC' to the list.

The only possible issue I can see with this is with case-insensitive
filesystems, but even those usually preserve case.  (And then you would
not be able to have both 'cc' and 'CC' in one directory anyway...)

-Dimitry
Index: tools/clang/tools/driver/driver.cpp
===================================================================
--- tools/clang/tools/driver/driver.cpp	(revision 167691)
+++ tools/clang/tools/driver/driver.cpp	(working copy)
@@ -286,10 +286,12 @@ static void ParseProgName(SmallVectorImpl<const ch
     { "clang++", true, false },
     { "clang-c++", true, false },
     { "clang-cc", false, false },
+    { "clang-CC", true, false },
     { "clang-cpp", false, true },
     { "clang-g++", true, false },
     { "clang-gcc", false, false },
     { "cc", false, false },
+    { "CC", true, false },
     { "cpp", false, true },
     { "++", true, false },
   };
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to