Skip to content

experimental_platform_in_output_dir #27575

@mai93

Description

@mai93

Motivation

This is part of removing dependencies on legacy --cpu flag and moving towards platforms.

Description

--experimental_platform_in_output_dir is set to Auto by default which enables the output path for only execution configuration to be computed based on the target platform (--platforms) instead of --cpu.

For example: this changes blaze-out/k8-opt-exec/... paths so the k8 part comes from --platforms instead of --cpu.

If the platform has a mapping specified via --experimental_override_platform_cpu_name (old name: --experimental_override_name_platform_in_output_dir), this will be used in the output path. Otherwise, if --experimental_use_platforms_in_output_dir_legacy_heuristic is enabled, the platform name is used. If not, the hashCode of the unambiguous form of the platform label is used.

Incompatible Flag

experimental_platform_in_output_dir

Migration Guide

Update places that expect old output path to support the new prefix or use --experimental_override_platform_cpu_name to map the platform to a specific value that matches the old path prefix.

In which Bazel LTS version will this incompatible change be enabled?

Bazel 9

Additional Context

No response

TODO List

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2We'll consider working on this in future. (Assignee optional)incompatible-changeIncompatible/breaking changeteam-Configurabilityplatforms, toolchains, cquery, select(), config transitions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions