-
-
Notifications
You must be signed in to change notification settings - Fork 683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to cross compile go for linux in Mac OS #1401
Comments
If you're building a pure Go project (no cgo, C/C++ dependencies, or external linking), you can cross-compile with If part of your build requires a cross C/C++ compiler or linker, in addition to setting |
Thanks @jayconrod - that works. Wondering if this can be simplified so that it is easy to remember. |
@kramasamy We've been talking with the Bazel team about improvements to cross-compilation, mostly in the context of multi-configuration builds. I think we'll have more capabilities in the future, but I don't expect the command line interface to change too much. For now, I added a FAQ so it's easier to find out how to do this. |
Sorry to necro-post, is there any example of a CROSS tool from linux to compile to Mac with cgo deps? |
@prestonvanloon You might take a look at https://github.com/grailbio/bazel-toolchain. They have a full LLVM toolchain for several platforms. Not sure if it supports cross-compilation, but it might make a good template for CROSSTOOL authoring in any case. |
Getting the following errors - any help is appreciated. I am using bazel 0.11.1 and go rules version 0.10.0
The text was updated successfully, but these errors were encountered: