Skip to content

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
@fluttergithubbot fluttergithubbot added the c: contributor-productivity Team-specific productivity, code health, technical debt. 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.

final String emptyBitcodeMarker = lines
.skip(index - 1)
.take(3)
.firstWhere(
Copy link
Contributor

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
Contributor

@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
Contributor

@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 c: contributor-productivity Team-specific productivity, code health, technical debt. platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

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