[LLVMdev] Is -O4 supposed to work on linux ?

Nick Lewycky nicholas at mxc.ca
Thu Aug 26 08:12:36 PDT 2010

Romain Pechayre wrote:
>   Hello all,
> Just a quick question for which I think the answer is "NO". I am
> currently experiencing clang on a RHE linux x86_64 server. It seems to
> work very fine (great news, and thank you), but when I try to build
> using -O4 flag, I get an error telling me that it is "not possible to
> emit LLVM bit-code files to linker". I came across some post in this
> mailing list that made me think that it was because all system linker
> did not support LTO and that the feature is essentially supported on Mac
> os X.
> However, when using the online demo, LTO is enabled and the results says
> among other things:
> target triple = " x86_64-linux-gnu"
> Can you explain me why it does not work in my case and why it does in
> others ?

The online demo doesn't use the system linker, it just runs the LTO 

As for getting a binutils ld which can use LLVM, see 


More information about the llvm-dev mailing list