yetist / ios-toolchain-based-on-clang-for-linux

Automatically exported from code.google.com/p/ios-toolchain-based-on-clang-for-linux
0 stars 0 forks source link

LTO doesn't work with multiple arch flags #20

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When I try to build an LTO binary with multiple arch flags (targeting OSX) then 
I get
the following:

thomas@thomas-pc:~/tmp$ o64-clang++ -arch i386 -arch x86_64 -O3 -flto test1.cpp 
-c
/usr/bin/x86_64-apple-darwin12.3-lipo: can't figure out the architecture type 
of: /tmp/test1-2b4ff4.o
clang: error: lipo command failed with exit code 1 (use -v to see invocation)

See http://pastebin.com/raw.php?i=dLaAPxVS for -v.

Using "cctools-839-ld64-134.9" built with --target=x86_64-apple-darwin12.3 with 
clang-3.4 (from http://llvm.org/apt/ - also tried 3.2 shipped with 
ubuntu~13.04, but same result).

Tried this on OSX-10.8 with clang-3.2/cctools 839 too, it works fine there.

But it's not a big deal anyway - building LTO binaries with a single arch flag 
works perfectly fine.

Btw: Thank you so much for your great and - up to date - work, please keep it 
up!

Original issue reported on code.google.com by t.poecht...@gmail.com on 3 Oct 2013 at 4:55