[cfe-dev] RFC: Clang driver redesign

Jean-Daniel Dupas devlists at shadowlab.org
Tue Nov 8 08:50:48 PST 2011


Le 8 nov. 2011 à 17:34, Jonathan Sauer a écrit :

> Hello,
> 
>> What's wrong with having a gcc compatibility layer for the driver which just translates from one option set to the other. I'm thinking of something like:
>> 
>> clang-gcc [gcc options]
>> clang-g++ [g++ options]
>> 
>> clang [clang options]
>> clang++ [clang++ options]
>> 
>> If anything, the clang-gcc and clang-g++ could just be shell script wrappers around clang.
> 
> Just use hard links and have clang inspect the program name on startup.

Actually, it uses symlink, not hardlink.

As previously suggested in this discussion, I think it could be even better if clang can decide if it uses C or C++ mode not only based on the driver name, but also based on the compiled file language.

clang -o hello hello.cpp

should not result in nasty linker errors as it already knows it is compiling c++.

-- Jean-Daniel








More information about the cfe-dev mailing list