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

Cross compilation: explicitly exclude package / rule from a toolchain #6043

Closed
guibou opened this issue Aug 30, 2018 · 3 comments
Closed

Cross compilation: explicitly exclude package / rule from a toolchain #6043

guibou opened this issue Aug 30, 2018 · 3 comments
Labels
P2 We'll consider working on this in future. (Assignee optional) team-Configurability platforms, toolchains, cquery, select(), config transitions

Comments

@guibou
Copy link
Contributor

guibou commented Aug 30, 2018

Description of the problem / feature request:

The rules in my repository can be built by a few of the --compiler / --cpu combinations available. For example:

  • Most of my "desktop" programs can accept all the --compiler (e.g. clang, gcc), but only the --cpu default.
  • Some rules are only compatibles with some --cpu / --compiler tuples. For example, I have rules which only works for arm32bit / gcc.

I cannot use bazel build //... because it will try to use the default --compiler / --cpu to build all my targets. I must explicitly list all target I want to build.

The only workaround I'm aware of is to, for each rule, add a tags = ["manual"] conditionally using a select query. That's painful.

Could you add a way to, per package, tags rules by the list of toolchain (i.e. the --cpu / --compiler) for which these rules can be built.

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

I'm trying to simplify my workflow which involves a lot of boilerplate external scripts which call bazel and a lot of boilerplate inside. Mostly, I have a continuous integration process which fails to test a few rules each time I forget to list these new rules explicitly in the build process.

What operating system are you running Bazel on?

Linux.

What's the output of bazel info release?

I'm using a patched bazel 0.15, but I have seen nothing on the release note of 0.16 or 0.17rc related to this issue.

@jin jin added team-Configurability platforms, toolchains, cquery, select(), config transitions untriaged labels Aug 30, 2018
@gregestren
Copy link
Contributor

This should be addressed pretty effectively by the configurability roadmap in the sections on flagless multiplatform builds.

We also have precedent for skipping targets under //... that don't match the current platform.

@gregestren gregestren added P2 We'll consider working on this in future. (Assignee optional) and removed untriaged labels Oct 4, 2018
@guibou
Copy link
Contributor Author

guibou commented Oct 5, 2018

@gregestren I saw the configurability roadmap and I'm looking forward for this plateforms attribute. Thank you.

@aiuto
Copy link
Contributor

aiuto commented Jun 8, 2020

This is essentially a duplicate of #3780

@aiuto aiuto closed this as completed Jun 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P2 We'll consider working on this in future. (Assignee optional) team-Configurability platforms, toolchains, cquery, select(), config transitions
Projects
None yet
Development

No branches or pull requests

4 participants