[cfe-dev] RFC: Clang driver redesign
devlists at shadowlab.org
Tue Nov 8 10:50:48 CST 2011
Le 8 nov. 2011 à 17:34, Jonathan Sauer a écrit :
>> 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++.
More information about the cfe-dev