-
Notifications
You must be signed in to change notification settings - Fork 4.4k
iOS platform constraints locations #15041
Description
In order to use bazel toolchains with Apple platforms, we have to define the core set of platforms it supports. This is mostly done by https://github.com/bazelbuild/bazel/blob/96c8a9073807c9e97635ddafe2ed0365a9318d6f/tools/osx/crosstool/BUILD.toolchains
The issue is that since M1 macs were released there are now overlapping OS + CPU combos, like ios + arm64 that need more specific information for whether or not the build is for a physical device, or the simulator. To support this, these custom constraints exist: https://github.com/bazelbuild/apple_support/blob/2ec0ef3eb2954371596fbb1a225fb244fcde31a9/constraints/BUILD#L12-L26
Since they live in apple_support today, and bazel does not take them into account, as far as I can tell this setup isn't able to do what we want. It seems to me that we either need to move these constraints into bazel, and annotate the toolchains here, or move the toolchain definitions out of bazel and into apple_support (or another location?).
I'm hoping we can use this issue to decide on this, which will help make some more progress on toolchain support for Apple platforms.