How to check if a static library is built for 64-bit?

Joel Fischer picture Joel Fischer · Sep 25, 2013 · Viewed 48.6k times · Source

I just built a static library for iOS with the build setting for Architectures set to $(ARCHS_STANDARD_INCLUDING_64_BIT).

I want to make sure that the .a library is properly including that architecture, but when i run lipo -info on it, I see:

Architectures in the fat file: library.a are: armv7 armv7s (cputype (16777228) cpusubtype (0))

Does this mean that arm64 isn't included? If the lipo command can't tell me, is there another way to tell?

I'm running Xcode 5 with the latest Command Line Tools installed.

Answer

Stephen Canon picture Stephen Canon · Sep 25, 2013

Yes, an arm64 slice is there. To see it, you need to use lipo from the iOS toolchain, not from the host system (which doesn’t know about arm64):

xcrun -sdk iphoneos lipo -info $(FILENAME)