bazelbuild / rules_go

Go rules for Bazel
Apache License 2.0
1.36k stars 636 forks source link

Add linux/ppc64le to GOARCH constraints #3975

Closed c16a closed 4 days ago

c16a commented 5 days ago

This also updates platforms module dependency to 0.0.10

What type of PR is this? Bug fix

What does this PR do? Why is it needed? This PR adds support to cross-compile for linux/ppc64le target.

Which issues(s) does this PR fix?

Fixes #854 and fixes #1186

c16a commented 5 days ago

@fmeum it's my first PR on this repo, but I was wondering why the Ubuntu 18.04 LTS job alone doesn't seem to be picking up my newly added @platforms//cpu:ppc64le? Rest of the jobs seem to be passing.

I verified that the platform target indeed exists in the platforms module.

https://github.com/bazelbuild/platforms/blob/05ec3a3df23fde62471f8288e344cc021dd87bab/cpu/BUILD#L147-L150

fmeum commented 5 days ago

@c16a That job runs with an old version of Bazel (5.4.0) and doesn't use Bzlmod. I suspect that you also have to add a suitable version of platforms to this macro: https://github.com/bazelbuild/rules_go/blob/93f29a542553f50787233cac7d9006ce300d4079/go/private/repositories.bzl#L24

c16a commented 4 days ago

Thanks, passed now!

@fmeum good to merge?

c16a commented 4 days ago

Also might fix #3626