Skip to content

Conversation

jlaxson
Copy link
Contributor

@jlaxson jlaxson commented Nov 18, 2022

The current aliases hardcode the bazel host os, which does not work when cross compiling. For example, when building for linux from bazel running macos, referencing @python3_9//:libpython would reference the macos library, not the linux one.

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

I don't know this can be tested without cross compile infrastructure set up in this repo. Existing tests should verify that it continues to work when not cross compiling.

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature (please, look at the "Scope of the project" section in the README.md file)
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

The main repository alias references only the host platform.

What is the new behavior?

Using labels from the central repository will correctly reference the python toolchain corresponding to the current target/exec platform.

Does this PR introduce a breaking change?

  • Yes
  • No?

Other information

The current aliases hardcode the bazel host os, which does not work when cross compiling.
@jlaxson jlaxson requested a review from f0rmiga as a code owner November 18, 2022 21:19
@f0rmiga
Copy link
Member

f0rmiga commented Nov 21, 2022

I think this patch is safe. We will soon see how it affects #846.

@f0rmiga f0rmiga merged commit 7e3c89c into bazel-contrib:main Nov 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants