Cannot build WebRTC M72 with Bitcode

292 views
Skip to first unread message

burak.uz...@gmail.com

unread,
Feb 27, 2019, 2:37:26 AM2/27/19
to discuss-webrtc
Hi,

We need to test bitcode enabled version of WebRTC M72 release. However, we faced with some issues:

1. In '/build/config/ios/BUILD.gn' file 'use_xcode_clang' flag forces to use xcode_clang if we want to enable bitcode. 

if (use_xcode_clang && enable_ios_bitcode && !use_ios_simulator) {
    if (is_debug) {
      common_flags += [ "-fembed-bitcode-marker" ]
    } else {
      common_flags += [ "-fembed-bitcode" ]
    }
  }

When I tried with xcode_clang, xcode-build throws undefined "-Wno-null-pointer-arithmetic".  I tried with Xcode 9 and Xcode 8 and none of them works, unfortunately not tested in Xcode 10 yet, why am I seeing that failure?. I am using script in the 'build_ios_libs.py' file and modified manually to enable bitcode.


2. So I removed xcode_clang flag from the above code in BUILD.gn file and also disabled 'use_xcode_clang' from the 'build_ios_libs.py'. While building, now it throws another error which points all libraries that WebRTC uses should be bitcode enabled. And below library is not bitcode enabled. I dont know whether this is the only library that doesn't contain bitcode, but at least that one blocks right now. 

ld: 'obj/third_party/boringssl/boringssl_asm/chacha-armv8.o' does not contain bitcode. You must rebuild it with bitcode enabled (Xcode setting ENABLE_BITCODE), obtain an updated library from the vendor, or disable bitcode for this target. file 'obj/third_party/boringssl/boringssl_asm/chacha-armv8.o' for architecture arm64


I am using 'gclient sync' command before, so 'tools_webrtc' folder should be synced. What is your suggestions, how can I get bitcode enabled versions of all tools and libraries, is there any other branch that contains bitcode enabled versions of the tools in the 'tools_webrtc' repository, and why Xcode Clang doesn't work on my computer?

Thanks.

Kári Helgason

unread,
Feb 27, 2019, 3:08:02 AM2/27/19
to discuss-webrtc
Hello, thanks for the detailed explanation of your issue.

Unfortunately, due to exactly the issues you are facing, bitcode support in WebRTC is very limited. Many of the libraries we depend on include assembly sources and getting those to assemble with bitcode is problematic.

If this is really something you need, you probably have to disable building with asm sources in boringssl and opus by editing the build files in third_party.

Please ping us back on this thread if you manage to get it working, maybe we can find a way to upstream your changes. :)

Thanks,

--

---
You received this message because you are subscribed to the Google Groups "discuss-webrtc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss-webrt...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/discuss-webrtc/00221837-0029-4d8a-80f7-884e4e13d269%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages