Skip to content

Commit 724d74e

Browse files
idefacebook-github-bot
authored andcommitted
Add BITCODE_GENERATION_MODE = bitcode for iOS builds (#1698)
Summary: ## 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. Pull Request resolved: #1698 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). Reviewed By: dreamolight Differential Revision: D27543490 Pulled By: joesus fbshipit-source-id: cfc9363ee505d6ba8cb70f887d9caae886e69342
1 parent e231272 commit 724d74e

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
77

88
## Unreleased
99

10+
### Fixed
11+
12+
- Static library binaries are built with `BITCODE_GENERATION_MODE = bitcode` to fix errors where Xcode is unable to build apps with bitcode enabled. [#1698](https://github.com/facebook/facebook-ios-sdk/pull/1698)
13+
1014
### Important
1115

1216
[Full Changelog](https://github.com/facebook/facebook-ios-sdk/compare/v9.1.0...HEAD)

Configurations/Platform/iOS.xcconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @loader_path/
2727

2828
// Bitcode Support
2929
ENABLE_BITCODE = YES
30+
BITCODE_GENERATION_MODE = bitcode
3031

3132
FB_BITCODE_FLAG = -fembed-bitcode
3233
OTHER_CFLAGS = $(inherited) $(FB_BITCODE_FLAG)

0 commit comments

Comments
 (0)