[lldb-dev] Bitcode linking with static libs + ARM assembly on Xcode 7

Sridhar sridhar124 at gmail.com
Tue Jul 28 18:19:15 PDT 2015


Hi,

I am not sure if this is the right place to post but wanted to give a try.

I have a static library created by the following commands which has ARM
assembly code.

bash-3.2$
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
-x assembler-with-cpp -arch armv7 -fmessage-length=0
-fdiagnostics-show-note-include-stack -fmacro-backtrace-limit=0 -fmodules
-gmodules -fmodules-prune-interval=86400
-Wnon-modular-include-in-framework-module
-Werror=non-modular-include-in-framework-module -Wno-trigraphs
-fpascal-strings -O0 -fno-common -Wno-missing-field-initializers
-Wno-missing-prototypes -Werror=return-type -Wunreachable-code
-Werror=deprecated-objc-isa-usage -Werror=objc-root-class
-Wno-missing-braces -Wparentheses -Wswitch -Wunused-function
-Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value
-Wempty-body -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow
-Wno-four-char-constants -Wno-conversion -Wconstant-conversion
-Wint-conversion -Wbool-conversion -Wenum-conversion -Wshorten-64-to-32
-Wno-newline-eof -DDEBUG=1 -isysroot

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk
-fstrict-aliasing -Wdeprecated-declarations -miphoneos-version-min=9.0 -g
-Wno-sign-conversion -I/Users/sridhar/src/arm64/webrtc43/ios/src
-Iwebrtc/common_audio/resampler/include
-Iwebrtc/common_audio/signal_processing/include -isysroot
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.0.sdk
-fembed-bitcode -fvisibility=hidden -MMD -MT dependencies -MF
webrtc/common_audio/signal_processing/common_audio.complex_bit_reverse_arm.d
-c webrtc/common_audio/signal_processing/complex_bit_reverse_arm.S -o
webrtc/common_audio/signal_processing/common_audio.complex_bit_reverse_arm.o


*and then using libtool created archive file :*

bash-3.2$
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool
-static -o libcommon_audio.a
webrtc/common_audio/signal_processing/common_audio.complex_bit_reverse_arm.o


Then I tried to use the static lib into an iOS app with bitcode enabled.
The following is the error from Xcode build output :

*ld: could not open bitcode temp file:
/Users/sridhar/src/arm64/webrtc43/ios/src/libcommon_audio.a(common_audio.complex_bit_reverse_arm.o)
for architecture armv7*

This is only happening with "ARM" assembly symbols, plain C symbols are
fine.

May be @Greg have a clue on this.

Thanks,
Sri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20150728/e11b0d09/attachment.html>


More information about the lldb-dev mailing list