[cfe-dev] Using Clang -O4 with CMake

Rafael Espindola espindola at google.com
Sat Jun 19 21:39:07 PDT 2010


> 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.


One thing that is different is that gold (or the Apple linker) knows
what symbols are used and can optimize:

http://llvm.org/releases/2.6/docs/LinkTimeOptimization.html

> David
>
> -- Sent from my IBM 1620
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>


Cheers,
-- 
Rafael Ávila de Espíndola




More information about the cfe-dev mailing list