Skip to content

Feature Request - Migrate to CcInfo instead of ObjcProvider for Objective-C linking  #757

@luispadron

Description

@luispadron

migrate ObjcProvider linking info to CcLinkingContext. It controls whether native Objective-C/C++ rules will use linking info from ObjcProvider or CcInfo (which contains the CcLinkingContext). If the flag is false, bazel will get its linking info from ObjcProvider (pre-migration behavior). If the flag is true, bazel will get its linking info from CcInfo (post-migration behavior).

Migrating other rules:

Rules that generate linking info need to generate them in CcInfo. These are typically calls to apple_common.new_objc_provider(). Only calls that produce linking info require migration.

Rules that use linking info need use them from CcInfo. These are typically references to fields in ObjcProviderApi.

Rules that produce AppleDynamicFrameworkInfo and AppleExecutableBinaryInfo need to add CcInfos that provide the linking info to them.

See bazelbuild/bazel#16939 for details. For examples for how to migrate, see (1) above links, (2) rules_swift which has lots of examples of how the same linking info is represented in ObjcProvider and CcInfo.

More info: bazelbuild/bazel#17377

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions