Skip to content
This repository has been archived by the owner on Mar 23, 2021. It is now read-only.

proposal: support cross compiling #63

Open
myitcv opened this issue Feb 18, 2019 · 3 comments
Open

proposal: support cross compiling #63

myitcv opened this issue Feb 18, 2019 · 3 comments
Labels
enhancement New feature or request

Comments

@myitcv
Copy link
Owner

myitcv commented Feb 18, 2019

In #62, we fixed -run to use runtime.GOOS and runtime.GOARCH.

At the time of writing, cross compiling with gobin does not work. Nor are the cache paths it uses (either globally or module-locally) GOOS/GOARCH-aware.

This issue is a proposal to fully support cross-compiled binaries with gobin.

  • we will need to refactor the way we go install in order not to trip over the fact that you cannot go install with GOBIN set when GOOS and GOARCH differ from runtime.GOOS and runtime.GOARCH respectively
  • we will need to introduce GOOS and GOARCH into our cache paths
@myitcv myitcv added the enhancement New feature or request label Feb 18, 2019
@myitcv
Copy link
Owner Author

myitcv commented Feb 24, 2019

As part of this we should explicitly say we do not (currently) support build tags, and consequently set GOFLAGS="" in all of our go commands.

@myitcv
Copy link
Owner Author

myitcv commented May 10, 2019

We should add support for -tags and GOFLAGS. The more I think about it, the more I'm convinced that actually the right thing to do is also to install everything to a fully obfuscated path.

@myitcv
Copy link
Owner Author

myitcv commented May 10, 2019

Per @rogpeppe - we could instead only flip to using an obfuscated path in case GOOS, GOARCH, GOFLAGS etc differ from the "defaults".

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant