Skip to content

Conversation

@jmagman
Copy link
Member

@jmagman jmagman commented Dec 7, 2020

Description

Flutter projects don't actually need to tell the linker about the Flutter framework because CLANG_MODULES_AUTOLINK defaults to YES (inherited from the OS default), which means just importing the Flutter module will link it.

This is why OTHER_LDFLAGS doesn't need to contain -framework Foundation or any other frameworks that are auto-imported.

Will also prevent add-to-app warning flutter_export_environment.sh: line 8: inherited: command not found, which is innocuous, but causes confusion.

Related Issues

Fixes #54769

Tests

Remove OTHER_LDFLAGS tests.

Confirmed this worked in both an existing Objective-C and Swift project.

@jmagman jmagman added platform-ios iOS applications specifically tool Affects the "flutter" command-line tool. See also t: labels. t: xcode "xcodebuild" on iOS and general Xcode project management labels Dec 7, 2020
@jmagman jmagman requested a review from gaaclarke December 7, 2020 19:45
@jmagman jmagman self-assigned this Dec 7, 2020
@google-cla google-cla bot added the cla: yes label Dec 7, 2020
Copy link
Member

@gaaclarke gaaclarke left a comment

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform-ios iOS applications specifically t: xcode "xcodebuild" on iOS and general Xcode project management tool Affects the "flutter" command-line tool. See also t: labels.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flutter framework linker flag should only be set for iOS SDKs

2 participants