[llvm-dev] difference between llvm-gcc and clang
Tim Northover via llvm-dev
llvm-dev at lists.llvm.org
Thu Jul 21 14:11:33 PDT 2016
On 21 July 2016 at 14:02, Yuxi Chen via llvm-dev
<llvm-dev at lists.llvm.org> wrote:
> Both llvm-gcc and clang would use llvm as its backend. Dose everyone know
> the difference of bitcode generated by llvm-gcc and llvm?
llvm-gcc used to be a compiler that used the GCC front-end (C parser
etc) to generate LLVM IR and then used the LLVM backends. It's a
long-abandoned project now though (not updated past GCC 4.2), with all
effort going into Clang (or GCC proper!).
You're only even likely to find traces of it on macOS, where
/usr/bin/llvm-gcc exists for backwards-compatibility reasons. However,
that's not really llvm-gcc any more, it's just another way to run
> Or actually they are same, like if I use the same compiler options, like -O4.
You shouldn't be using -O4. At one point I think it was a weird way to
trigger LTO (now you'd use -flto), but it's now only accepted for
compatibility and means the same thing as -O3. It gives you a warning
if you try to use it.
More information about the llvm-dev