I'm using Xcode to prelink a collection of object files (*.o
) and static libraries (*.a
), all containing bitcode, into a single static library using Single-Object Prelinking.
In doing so, the resulting prelinked file does not contain bitcode.
The prelinking command and options emitted by Xcode looks like this:
ld -r -arch arm64 -bitcode_bundle -bitcode_verify -syslibroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS13.6.sdk
a.o
b.o
...
x.a
y.a
-o libABC-arm64-master.o
The documentation for the bitcode_bundle
option indicates that it "requires all the object files, static libraries and user frameworks/dylibs contain bit-code". I have used otool
to verify that all of the constituent files contain bitcode.
No errors are raised or logged the by the ld
command, even when I test it directly from the command line, separately from Xcode.
I'm stumped. And any help or suggestions would be appreciated.
Update: In further testing, I can create a prelinked file containing only any single .o
file, and the final prelinked file WILL contain bitcode. However, including any two of those .o
files, each of which contains bitcode, causes the prelinked file to contain NO bitcode.