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

Update toolchains support for latest rules_apple and transitions #848

Merged
merged 1 commit into from
Mar 15, 2024

Conversation

luispadron
Copy link
Collaborator

@luispadron luispadron commented Mar 6, 2024

Prepares our mac and xplat toolchains for Bazel 7

Changes:

  • Replace usage of "@bazel_tools//tools/cpp:current_cc_toolchain" with "@build_bazel_rules_apple//apple:default_cc_toolchain_forwarder"
  • Rename _toolchain to _mac_toolchain, this matches rules_apple and better represents that the toolchain is for the host platform
  • Add cfg = "exec" to the mac and xplat toolchains
    • This is required to fix toolchain resolution errors on Bazel 7. These toolchains are for the host and so exec is correct here. This is the same cfg they use in rules_apple

@luispadron luispadron force-pushed the luis/update-toolchains branch 2 times, most recently from 00f0c42 to 917bd6b Compare March 7, 2024 03:08
@luispadron luispadron marked this pull request as ready for review March 7, 2024 03:30
luispadron added a commit that referenced this pull request Mar 7, 2024
@luispadron luispadron merged commit 5dccf6c into master Mar 15, 2024
7 checks passed
@luispadron luispadron deleted the luis/update-toolchains branch March 15, 2024 18:41
luispadron added a commit that referenced this pull request Apr 18, 2024
In Bazel 7+ `ObjcProvider` no longer supports/provides the required
linking attributes.

The migrations is detailed here:
bazelbuild/bazel#16939. In summary, as part of
the migration, the `ObjcProvider` fields which previously provided
linking related information are now now longer providing that info. In
addition to this, a new flag:
`--incompatible_objc_linking_info_migration` was added to further delete
these link attrs from the `ObjcProvider` making it an error if the attr
is used or set.

The goal of this PR is to address support for `ObjcProvider` migration
and to instead use the correct linking information from `CcInfo`. This
will support both Bazel 6/7+. It does not try to support
`--incompatible_objc_linking_info_migration` as that requires more
changes and should be a separate PR

Depends on: 

- #848 
- #847
luispadron added a commit that referenced this pull request Apr 18, 2024
This PR adds 7.1.0 as a tested version in CI. It additionally updates
the README to specify the next release will officially support Bazel 7+

Depends on: 

- #848 
- #847
- #850 

Closes #795
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants