Skip to content

Provide the host CPU to repository rules #14685

@uhthomas

Description

@uhthomas

Description of the problem / feature request:

Repository rules already have access to repository_os which allows rules to change their behaviour based on the exec OS. Repository rules should also know the exec architecture. Repository rules currently work around this limitation by uname -m, which isn't ideal. See rules_go.

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

Repository rules create potentially brittle and strange workarounds to get the exec CPU. There is no standardisation and no official guidance on how best to create repository rules which target multiple platforms.

What operating system are you running Bazel on?

Linux x86_64

What's the output of bazel info release?

❯ bazel info release
Starting local Bazel server and connecting to it...
release 5.0.0

Have you found anything relevant by searching the web?

Replace this line with your answer.

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

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2We'll consider working on this in future. (Assignee optional)help wantedSomeone outside the Bazel team could own thisteam-ExternalDepsExternal dependency handling, remote repositiories, WORKSPACE file.type: feature request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions