Skip to content

Commit

Permalink
SDK厂商在支持 bitcode过程中可能出现的警告问题
Browse files Browse the repository at this point in the history
  • Loading branch information
ChenYilong committed Sep 28, 2015
1 parent 83dcc7a commit d6434a8
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1165,6 +1165,24 @@ clang: error: linker command failed with exit code 1 (use -v to see invocation)

那么 SDK 厂商如何支持 bitcode 呢?答案是只要在 Xcode7上重新编译一下就 ok 了。(请确保默认开启的 bitcode 没有去主动关闭)

但是如果仅仅是编译一下,则会出现下类似的如下警告:

![enter image description here](http://image17-c.poco.cn/mypoco/myphoto/20150928/17/1733887242015092817143106.jpg?1462x120_120
)



> ld: warning: full bitcode bundle could not be generated because 'Lookback(Lookback.o)' was built only with bitcode marker. The library must be generated from Xcode archive build with bitcode enabled (Xcode setting ENABLE_BITCODE)



警告的消除步骤:

模拟器、真机分开打包,SDK在build的时候,让模拟器与真机分开build,模拟器不设置bitcode的参数,真机的加上,然后再合起来。(“合起来”指的是指令集,好比 x86_64 i386 跟 armv7 arm64合起来。)用命令行打包的话 加上这个参数OTHER_CFLAGS=“-fembed-bitcode”。

详情可移步:[ ***How do I xcodebuild a static library with Bitcode enabled?*** ](http://stackoverflow.com/a/31486233/3395008)


更多信息,请移步

1. [bitcode 苹果官方文档][16]
Expand Down

0 comments on commit d6434a8

Please sign in to comment.