Understanding architecture results from lipo tool

自闭症网瘾萝莉.ら 提交于 2019-12-11 03:56:51

问题


I built an Xcode project for armv7, armv7s arm64. I ran lipo -info on the resulting .a file:

Architectures in the fat file: Release-iphoneos/libhlsl2glsl.a are: armv7 (cputype (12) cpusubtype (11)) (cputype (16777228) cpusubtype (0))

What is this telling me?


回答1:


It's display cputype and cpusubtype that you gets by using the functions sysctlor syctlbyname. See mach/machine.h for defined values :

for cputype, 12 is for ARM CPU

#define CPU_TYPE_ARM ((cpu_type_t) 12)

16777228 (aka 0x100000C) is for ARM64 CPU : CPU_TYPE_ARM | CPU_ARCH_ABI64

#define CPU_ARCH_ABI64  0x01000000 /* 64 bit ABI */

for cpusubtype :

#define CPU_SUBTYPE_ARM_V7S ((cpu_subtype_t) 11) /* Swift */

#define CPU_SUBTYPE_ARM_ALL ((cpu_subtype_t) 0)


来源:https://stackoverflow.com/questions/22257772/understanding-architecture-results-from-lipo-tool

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!