Skip to content

Add BITCODE_GENERATION_MODE = bitcode for iOS builds#1698

Closed
ide wants to merge 1 commit intofacebook:masterfrom
expo:bitcode
Closed

Add BITCODE_GENERATION_MODE = bitcode for iOS builds#1698
ide wants to merge 1 commit intofacebook:masterfrom
expo:bitcode

Conversation

@ide
Copy link
Copy Markdown
Contributor

@ide ide commented Mar 24, 2021

Pull Request Details

Even though -fembed-bitcode is specified and the binaries have __LLVM segments for bitcode, Xcode fails when building an app with bitcode enabled.

Adding this option to iOS builds alongside the -fembed-bitcode flags eliminates this error and Xcode does not fail upon not finding bitcode in FBSDKLoginKit.framework.

See #1679.

Test Plan

Test Plan: Ran scripts/run.sh release github static, unzipped the built FBSDKLoginKit framework, manually copied the FBSDKLoginKit binary into the Pods folder of an app that depends on the FacebookSDK pod, built an app archive. Previously got an error saying,

ld: bitcode bundle could not be generated because '/Pods/FacebookSDK/FBSDKLoginKit.framework/FBSDKLoginKit(LoginManager.o)' was built without full bitcode.

After copying the newly built library binary in, this error went away (ran into other build errors but I believe they are not caused by this commit).

Even though `-fembed-bitcode` is specified and the binaries have `__LLVM` segments for bitcode, Xcode fails when building an app with bitcode enabled.

Adding this option to iOS builds alongside the `-fembed-bitcode` flags eliminates this error and Xcode does not fail upon not finding bitcode in FBSDKLoginKit.framework.
@brentvatne
Copy link
Copy Markdown

@joesus: For some context on why we are interested in this - we enable bitcode in all apps built with Expo and in the Expo Go development app. We're trying to ship our quarterly release right now but have run up against this issue.

@shamilovtim
Copy link
Copy Markdown

We just hit this, would love some eyes on this.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@joesus has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Copy Markdown
Contributor

@joesus merged this pull request in 724d74e.

@ide ide deleted the bitcode branch April 3, 2021 00:41
@joesus joesus mentioned this pull request Apr 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants