Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

Transition container image target platform #1963

Merged
merged 1 commit into from
Dec 17, 2021

Commits on Nov 27, 2021

  1. Transition container image target platform

    Transition to the target platform associated with the `architecture` and
    `operating_system` attributes on container image rules.
    
    This change allows for container image rules to build the correct binary for
    the target platform, regardless of the host platform. Container image rules
    would require the use of the `target_compatible_with` attribute to prevent
    mismatching host and target platforms building dependencies incorrectly.
    Additionally, hosts which did not match the target platform had to explicitly
    specify the target platform with the `--platforms` command-line option.
    
    This change fixes the aforementioned issues and
    bazelbuild#690.
    
    Massive thank you to @joneshf for the initial source. It has been adapted to
    automatically select the target platform associated with the container image,
    as opposed to always using `@io_bazel_rules_go//go/toolchain:linux_amd64`.
    uhthomas committed Nov 27, 2021
    Configuration menu
    Copy the full SHA
    6bb7a92 View commit details
    Browse the repository at this point in the history