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

apple_common.multi_arch_split should transition on platforms instead of crosstool_top #11181

Closed
steeve opened this issue Apr 21, 2020 · 2 comments
Labels
untriaged z-team-Apple Deprecated. Send to rules_apple, or label team-Rules-CPP + platform:apple

Comments

@steeve
Copy link
Contributor

steeve commented Apr 21, 2020

Description of the problem / feature request:

Let apple_common.multi_arch_split transition on platforms/constraints instead of crosstool_top/cpu.

Feature requests: what underlying problem are you trying to solve with this feature?

According to osx_archs.bzl, Apple toolchains are already constraint aware and thus can be selected by specifying a platform.

However, according to AppleCrosstoolTransition, apple_common.multi_arch_split is still implemented by transiting crosstool_top and cpu instead of platforms.

This creates weird cases for downstream rules which have to transition on crosstool_top/cpu instead of letting the constraints apply directly to their toolchains as well.
For instance, rules could expose CcInfo and thus be used as dependencies of a rule using multi_arch_split.
See bazel-contrib/rules_go#2451.

Looking at rules_apple, I see the starlark transitions are are implemented but apple_common.multi_arch_split is still used.

What operating system are you running Bazel on?

macOS

What's the output of bazel info release?

release 3.0.0

Any other information, logs, or outputs that you want to share?

  1. Add automatic platform detection from inbound crosstool_top and cpu bazel-contrib/rules_go#2451
@aiuto aiuto added z-team-Apple Deprecated. Send to rules_apple, or label team-Rules-CPP + platform:apple untriaged labels Apr 22, 2020
@jmmv
Copy link
Contributor

jmmv commented Apr 23, 2020

@katre , could you triage? I see you are involved in the review of #2451 and I know little about this stuff right now.

@steeve
Copy link
Contributor Author

steeve commented Apr 23, 2020

Closing, wrong dup of #11180. Sorry for the noise.

@steeve steeve closed this as completed Apr 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged z-team-Apple Deprecated. Send to rules_apple, or label team-Rules-CPP + platform:apple
Projects
None yet
Development

No branches or pull requests

3 participants