-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Stop embedding bitcode for iOS in tool #112831
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fails when bitcode strip fails test will only pass during ReleaseUnpackIOS since stripping will now only happen on release, not dependent on kBitcodeFlag.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was moved from the now-deleted darwin_common.dart, bitcode isn't a thing on macOS, so it's not shared. I don't know why I ever added the check to the macOS validation test.
13bdae9 to
ddad8c8
Compare
ddad8c8 to
04a8623
Compare
| } | ||
| _thinFramework(environment, frameworkBinaryPath, archs); | ||
| _bitcodeStripFramework(environment, frameworkBinaryPath); | ||
| if (buildMode == BuildMode.release) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Currently until we remove it) the release version of Flutter.framework has a giant bitcode blob, and now we always want to strip it out.
I deleted the logic passing the Xcode build setting ENABLE_BITCODE down into assemble as kBitcodeFlag. It would only be true if ENABLE_BITCODE was set, AND it was an "install" command, meaning it was archiving.
flutter/packages/flutter_tools/bin/xcode_backend.dart
Lines 336 to 339 in b22db68
| String bitcodeFlag = ''; | |
| if (environment['ENABLE_BITCODE'] == 'YES' && environment['ACTION'] == 'install') { | |
| bitcodeFlag = 'true'; | |
| } |
This was the check in the target that was deleted:
flutter/packages/flutter_tools/lib/src/build_system/targets/ios.dart
Lines 377 to 380 in 723b82e
| void _bitcodeStripFramework(Environment environment, String frameworkBinaryPath) { | |
| if (environment.defines[kBitcodeFlag] == 'true') { | |
| return; | |
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, makes sense. Thanks!
christopherfujino
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
| 'bitcode_strip', | ||
| frameworkBinaryPath, | ||
| '-m', // leave the bitcode marker. | ||
| '-r', // Delete the bitcode segment. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just made this change, totally delete it instead of leaving the marker:
OPTIONS
-r Remove the __LLVM bitcode segment entirely.
-m Remove the bitcode from the __LLVM segment, leaving behind a
marker.
https://developer.apple.com/documentation/xcode-release-notes/xcode-14-release-notes
bcsymbolmapbitcode symbol maps as part offlutter build ios-frameworkFixes #107883
#112828 project migration should be merged first.
Pre-launch Checklist
///).If you need help, consider asking for advice on the #hackers-new channel on Discord.