[cfe-dev] Using Clang -O4 with CMake

David Chisnall theraven at sucs.org
Sat Jun 19 11:35:56 PDT 2010


On 19 Jun 2010, at 19:23, Clark Gaebel wrote:

> Is there any way to do this without using gold? I'd rather not enable an
> experimental linker.

You can add -emit-llvm to your CFLAGS, then use llvm-link to link the resulting bitcode files together, use opt to produce an optimised version, and then llc to generate the native code, which you then pass to the linker.  It's a bit more effort (and involves spawning a lot of processes, so will be slower), but should have the same end result.

David

-- Sent from my IBM 1620



More information about the cfe-dev mailing list