简体   繁体   English

如何将“胖”库变成“非胖”库?

[英]How do I turn a “fat” library into a “non-fat” library?

I'm trying to remove a duplicate object from a library with armv6 and armv7 architectures, ie, 我正在尝试使用armv6和armv7架构从库中删除重复的对象,即

$ lipo -info libx.a Architectures in the fat file: libx.a are: armv6 armv7 $ lipo -info libx.a胖文件中的体系结构:libx.a是:armv6 armv7

As expected, "ar d" does not work directly so I used "lipo -extract" to split the library. 正如预期的那样,“ar d”不能直接使用,因此我使用“lipo -extract”来拆分库。 However, the resulting libraries are still 'fat' architecture. 但是,由此产生的库仍然是“胖”架构。

$ ar d libx-armv6.a offendingduplicate.o ar: libx-armv6.a is a fat file (use libtool(1) or lipo(1) and ar(1) on it) ar: libx-armv6.a: Inappropriate file type or format $ ar d libx-armv6.a offendingduplicate.o ar:libx-armv6.a是一个胖文件(使用libtool(1)或lipo(1)和ar(1))ar:libx-armv6.a:不恰当文件类型或格式

$ lipo -info x-armv6.a Architectures in the fat file: libx.a are: armv6 $ lipo -info x-armv6.a胖文件中的架构:libx.a是:armv6

How can I un-fattify the library? 我怎么能不图书馆? (You can imagine the sorts of links that come up when you search for 'remove lipo fat file' in Google. Help!!) (您可以想象在Google中搜索“删除脂肪文件”时出现的各种链接。帮助!)

I am not familiar with lipo , but from its man page , it looks like you should be able to do this: 我不熟悉lipo ,但是从它的手册页看起来你应该能够做到这一点:

lipo libx.a -thin armv6 -output libx-armv6.a
lipo libx.a -thin armv7 -output libx-armv7.a

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

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