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

Bazel platforms support #1658

Closed
keith opened this issue Sep 10, 2022 · 7 comments
Closed

Bazel platforms support #1658

keith opened this issue Sep 10, 2022 · 7 comments

Comments

@keith
Copy link
Member

keith commented Sep 10, 2022

This is a tracking issue for supporting bazel's platforms for rules_apple. When relevant issues come up it would be useful to link them here for context.

@keith
Copy link
Member Author

keith commented Sep 10, 2022

@jiawen
Copy link

jiawen commented Jan 5, 2023

We should author a "state of affairs" document for building Apple apps, covering macOS, iOS, and tvOS. Especially relevant to my use case are how multiarch binaries and libraries interact with platforms, and the sharp edges the remain when it comes to objc_library vs cc_library and swift_library. Ideally, this document would include what we imagine the ideal state should be wrt platforms and a roadmap for getting there (e.g., using platform mappings).

@louwers
Copy link

louwers commented May 14, 2023

Oops. I have been trying to debug why my platform constraint variables weren't propagated. Turns out there was a ios_application in the dependency tree. 😅

@keith
Copy link
Member Author

keith commented Dec 18, 2023

In general platforms are supported at this point. You don't need a platform_mappings and with bazel 7.x + the new apple_support toolchain everything should work as expected. If you find otherwise please file an issue!

@keith keith closed this as completed Dec 18, 2023
@jiawen
Copy link

jiawen commented Dec 19, 2023

This is fantastic - a major milestone!

Quick question / suggestion wrt apple_support_toolchain/README.md. When it says

To use the Apple CC toolchain, pull this repository into your build and add this to your .bazelrc:

Does this still apply with Bazel 7?

Additionally, when the instructions say to add

build:macos --apple_crosstool_top=@local_config_apple_cc//:toolchain to .bazelrc

does that mean in general, users should pass --config=macos on the command line (or pass --enable_platform_specific_config?

@keith
Copy link
Member Author

keith commented Dec 19, 2023

Thanks for the comment, I submitted a PR to update the docs here bazelbuild/apple_support#290

That is no longer required for bazel 7+. The build:macos setup is meant to be used with --enable_platform_specific_config

@jiawen
Copy link

jiawen commented Dec 19, 2023

Amazing work as always, thanks!

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

No branches or pull requests

3 participants