https://pantsbuild.org/ logo
#general
Title
# general
f

flat-queen-95161

07/16/2022, 9:46 AM
is something like this possible?
Copy code
go_binary(
    name="bin",
)

go_binary(
    name="bin-linux",
    env="GOOS=linux GOARCH=amd64"
)
h

happy-kitchen-89482

07/16/2022, 8:51 PM
I don't think this is possible at the moment, but I also think it would be straightforward to add, if we got the modeling right. E.g., does the cross-compilation information live on
go_binary
or on
go_package
, or both? We'd just have to figure out how to represent this in the targets. @witty-crayon-22786 @fast-nail-55400 thoughts?
It would make total sense to support this for the docker use-case
In fact, it would even make sense to do this automatically when Pants knows it's about to embed the go binary in a docker image. But one thing at a time...
3 Views