How do i compile a static library (fat) for armv6, armv7 and i386

后端 未结 4 1369
后悔当初
后悔当初 2020-12-01 02:23

I know this question has been posed several times, but my goal is slightly different with regard to what I have found searching the web. Specifically, I am already able to b

4条回答
  •  感动是毒
    2020-12-01 02:58

    Make sure to have your build settings set to Valid Architectures: armv6 armv7 and Architectures: Optimized (armv6 armv7). This should result in a binary optimized for both v6 & v7. If you're not sure it worked out, just set the Architectures: Standard (armv6) and compare the file sizes. Optimized should produce double the size (when I remember rightly).

    You also always can use lipo -info on your binary to see all the included architecures.

    Running it on a distribution build of my app gives me:

    ullrich ~/Code/.../build/Distribution-iphoneos/My.app (streaming)$ lipo -info My
    Architectures in the fat file: My are: armv6 armv7 
    

提交回复
热议问题