Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Understanding architecture results from lipo tool

Tags:

xcode

ios

lipo

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?

like image 513
Mr. Boy Avatar asked Oct 17 '25 03:10

Mr. Boy


1 Answers

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)
like image 64
Emmanuel Avatar answered Oct 19 '25 19:10

Emmanuel