Nice programing

정적 라이브러리가 64 비트 용으로 빌드되었는지 확인하는 방법은 무엇입니까?

nicepro 2020. 10. 25. 13:03
반응형

정적 라이브러리가 64 비트 용으로 빌드되었는지 확인하는 방법은 무엇입니까?


아키텍처에 대한 빌드 설정을으로 설정하여 iOS 용 정적 라이브러리를 빌드했습니다 $(ARCHS_STANDARD_INCLUDING_64_BIT).

.a 라이브러리에 해당 아키텍처가 제대로 포함되어 있는지 확인하고 싶지만 실행 lipo -info하면 다음과 같은 내용이 표시됩니다.

fat 파일 : library.a의 아키텍처는 다음과 같습니다. armv7 armv7s (cputype (16777228) cpusubtype (0))

이것은 arm64가 포함되지 않음을 의미합니까? lipo 명령이 나에게 말할 수 없다면 다른 방법이 있습니까?

최신 명령 줄 도구가 설치된 Xcode 5를 실행하고 있습니다.


예, arm64 슬라이스가 있습니다. 이를 보려면 lipo호스트 시스템 (arm64에 대해 알지 못함)이 아닌 iOS 도구 모음에서 사용해야합니다.

xcrun -sdk iphoneos lipo -info $(FILENAME)

좋은 노인 file도 트릭을 할 수 있습니다.

$ file libTestFlight.a

libTestFlight.a: Mach-O universal binary with 5 architectures
libTestFlight.a (for architecture armv7):   current ar archive random library
libTestFlight.a (for architecture armv7s):  current ar archive random library
libTestFlight.a (for architecture i386):    current ar archive random library
libTestFlight.a (for architecture x86_64):  current ar archive random library
libTestFlight.a (for architecture cputype (16777228) cpusubtype (0)):   current ar archive random library

file아직 애플의 아무도 arm64 cputype을에 추가하지 않은 것 같습니다 .

흥미롭게도 iOS 7 Tech Talk 비디오 ( "Architecting Modern Apps, Part 2", PDF 35 페이지)에서는 작업 파일 도구의 출력을 보여줍니다.

여기에 이미지 설명 입력


에 대한 .framework

lipo -info myFramework.framework/MyFramework

참고 URL : https://stackoverflow.com/questions/18992840/how-to-check-if-a-static-library-is-built-for-64-bit

반응형