[llvm-dev] archiving LTO objects broken for current Xcode releases

Jack Howarth via llvm-dev llvm-dev at lists.llvm.org
Wed Oct 26 08:06:17 PDT 2016


    The ability to archive object files generated with -flto under
LLVM.org clang 3.9.0 or 4.0svn trunk is broken against the currently
shipping Xcode releases including the upcoming Xcode 8.1 GM.

https://llvm.org/bugs/show_bug.cgi?id=30791

$ clang-3.9 -flto -O1 -c *.i
$ ar cr libtar.a paxerror.o paxexit-status.o paxnames.o rtapelib.o
stdopen.o wordsplit.o xattr-at.o
error: Unknown attribute kind (52) (Producer: 'LLVM3.9.0' Reader:
'LLVM APPLE_1_800.0.42.1_0')
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ar:
internal ranlib command failed

Using MacPorts, I've been able to confirm that archiving LTO object
files now requires a cctools release that has been built against llvm
3.9.0 rather than 3.8.1 to avoid this failure.
     Was this change intentional and is there any possibility of
restoring compatibility with the currently shipping Xcode releases?
          Jack


More information about the llvm-dev mailing list