jakevoytko / crbot

A Discord bot that acts as a call-and-response bot. It reacts to ? commands with the learned response.
MIT License
7 stars 3 forks source link

Cross-compile binary for linux from mac #27

Closed jakevoytko closed 6 years ago

jakevoytko commented 7 years ago

Cross compilation is now supported

https://github.com/bazelbuild/rules_go/issues/70

Allow the binary to be built locally, and deployed and run remotely. This will avoid problems, like the one that I ran into where my local and remote versions of bazel were mismatched.

excavador commented 7 years ago

So, what the correct way to build linux binaries on mac for linux?

jakevoytko commented 7 years ago

^ per the above link, with the right version of bazel, bazel build --cpu k8 $target is supposed to build a Linux binary on Mac

jakevoytko commented 6 years ago

Closing this out, since docker's go_image() rule should replace the need for this. I don't believe this existed when I evaluated docker support in bazel 8 or 9 months ago, so... cool!