Stop embedding bitcode for iOS in tool#112831
Stop embedding bitcode for iOS in tool#112831auto-submit[bot] merged 2 commits intoflutter:masterfrom
Conversation
There was a problem hiding this comment.
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.
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.
(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
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
There was a problem hiding this comment.
Ahh, makes sense. Thanks!
| 'bitcode_strip', | ||
| frameworkBinaryPath, | ||
| '-m', // leave the bitcode marker. | ||
| '-r', // Delete the bitcode segment. |
There was a problem hiding this comment.
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.