Skip to content
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

Generate bitcode for plugin frameworks for flutter build ios-framework #49102

Merged
merged 3 commits into from
Jan 22, 2020

Conversation

jmagman
Copy link
Member

@jmagman jmagman commented Jan 18, 2020

Description

  1. The plugin frameworks didn't have bitcode embedded because they were being built, not archived. Add BITCODE_GENERATION_MODE when building to force marker or actual bitcode, depending on configuration.

  2. While building the Flutter plugins, they were linking on the last version of Flutter.framework copied from flutter build/run. So if you ran flutter build ios --debug then flutter build ios-framework, the Release plugins would not compile with bitcode since they were linking on the debug version of Flutter.framework, which does not contain bitcode.

Related Issues

Fixes #48092

Tests

  • Added bitcode checks to build_ios_framework_module_test integration test.

Checklist

  • I read the [Contributor Guide] and followed the process outlined there for submitting PRs.
  • I signed the [CLA].
  • I read and followed the [Flutter Style Guide], including [Features we expect every widget to implement].
  • I read the [Tree Hygiene] wiki page, which explains my responsibilities.
  • I updated/added relevant documentation (doc comments with ///).
  • All existing and new tests are passing.
  • The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
  • I am willing to follow-up on review comments in a timely manner.

Breaking Change

  • No, no existing tests failed, so this is not a breaking change.
  • Yes, this is a breaking change. If not, delete the remainder of this section.

@jmagman jmagman added tool Affects the "flutter" command-line tool. See also t: labels. a: existing-apps Integration with existing apps via the add-to-app flow labels Jan 18, 2020
@jmagman jmagman self-assigned this Jan 18, 2020
@jmagman jmagman added this to Awaiting triage in Tools - existing app integration review via automation Jan 18, 2020
@jmagman jmagman added this to Awaiting triage in Add-to-app - iOS tool review via automation Jan 18, 2020
@fluttergithubbot fluttergithubbot added the team Infra upgrades, team productivity, code health, technical debt. See also team: labels. label Jan 18, 2020
Comment on lines -269 to -272
Directory outputDirectory,
BuildMode mode,
Directory iPhoneBuildOutput,
Directory simulatorBuildOutput,
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These params were unused.

@jmagman jmagman moved this from Awaiting triage to Engineer reviewed in Add-to-app - iOS tool review Jan 18, 2020
@jmagman jmagman moved this from Awaiting triage to Engineer reviewed in Tools - existing app integration review Jan 18, 2020
final String emptyBitcodeMarker = lines
.skip(index - 1)
.take(3)
.firstWhere(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is fun

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks I had "fun" writing it.

Copy link
Member

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we testing the flow of:

flutter build ios --debug
flutter build ios-framework # verify bitcode

?

Copy link
Member Author

@jmagman jmagman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we testing the flow of:

flutter build ios --debug
flutter build ios-framework # verify bitcode

?

You mean to prove the Release plugins are linking against the Release version of Flutter.framework? No, but that's a good idea (though will add a good chunk of time to this test).

Copy link
Member

@christopherfujino christopherfujino left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fluttergithubbot fluttergithubbot merged commit 2a7d577 into flutter:master Jan 22, 2020
@jmagman jmagman deleted the bitcode branch January 22, 2020 00:42
@jmagman jmagman added the platform-ios iOS applications specifically label Aug 21, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 21, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a: existing-apps Integration with existing apps via the add-to-app flow platform-ios iOS applications specifically team Infra upgrades, team productivity, code health, technical debt. See also team: labels. tool Affects the "flutter" command-line tool. See also t: labels.
Projects
Add-to-app - iOS tool review
  
Engineer reviewed
Development

Successfully merging this pull request may close these issues.

Add2App [Option A&B] with plugins failed to build because plugins was built without full bitcode
4 participants