Understanding architecture results from lipo tool
Asked Answered
F

1

4

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?

Frangipani answered 7/3, 2014 at 18:22 Comment(0)
B
4

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)
Beardless answered 7/3, 2014 at 19:35 Comment(2)
How come it isn't displaying the proper name then - I see some people report this would just write "armv7 armv7s arm64"? I installed the latest XCode command-line tools already...Frangipani
@John Do you have multiple versions of Xcode installed ? It's seems that the command line tools are not properly installed… Try using xcrun -r lipo -info /path/to/libhlsl2glsl.aBeardless

© 2022 - 2024 — McMap. All rights reserved.