frameworks - Compiling iOS library with bitcode enabled -
i need release framework bitcode enabled turns out hassle. set 'enable bitcode' in project's settings 'yes' , builds cleanly both real device , simulator.
i wanted test library integrated new app created purpose build simulators. when try build real device get:
ld: '/path/to/framework.framework/company(file.o)' not contain bitcode. must rebuild bitcode enabled (xcode setting enable_bitcode), obtain updated library vendor, or disable bitcode target. architecture armv7 clang: error: linker command failed exit code 1 (use -v see invocation)
like said, had built bitcode enabled i'm not sure why happens.
any ideas? thanks
afaik, when build app xcode includes bitcode when make archive, reason - decrease compile time when want debug or test app/library.
to ensure xcode emits bitcode @ each build can add -fembed-bitcode
flag other c flags
, other linker flags
:
also, easiest way check if binary contains bitcode use otool
, grep
:
otool -l binary_name | grep __llvm
you see 1 or more segname __llvm
entries if have bitcode or empty output if not.
Comments
Post a Comment