简体   繁体   English

CFLAGS =“-arch armv7”与CFLAGS =“-arch armv7 -arch arm64”

[英]CFLAGS=“-arch armv7” vs CFLAGS=“-arch armv7 -arch arm64”

I want to compile a static library that supports both armv7 and arm64.What are the differences between the following two operations? 我想编译一个同时支持armv7和arm64的静态库。以下两个操作之间有什么区别?

  • CFLAGS="-arch armv7" CFLAGS="-arch armv7" Build the two architectures separately and then use lipo to create a fat static libraries. CFLAGS="-arch armv7" CFLAGS="-arch armv7"构建两个体系结构,然后使用lipo创建胖静态库。

  • CFLAGS="-arch armv7 -arch arm64" Build static libraries that support both architectures at once. CFLAGS="-arch armv7 -arch arm64"构建同时支持两种体系结构的静态库。

There should be no difference. 应该没有区别。 You can examine the libraries produced using the command 您可以检查使用命令生成的库

lipo -detailed_info YOUR_LIBRARY_NAME

Both of them should be fat files. 他们两个都应该是胖文件。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM