Skip to content

Provide way to disable transition to default platform #2792

@jhance

Description

@jhance

rules_apple has a default transition to a mac osx platform. In our case, I believe it is transitioning to the same platform as our normal OSX build, but this is a pain as we want to skip targets on other platforms if they aren't compatible.

It seems that transitioning makes target_compatible_with take no effect, the target doesn't get filtered out, and then bazel raises a confusing error (in this case about there not being a toolchain to compile for OSX with host platform linux-x64), rather than skipping the target. I want the target to be filtered out by bazel's normal handling of targets incompatible with the target platform, to make things like bazel build --nobuild //... and bazel test //... work on every platform target for a multi-architecture codebase that has some parts that are OSX-specific.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions