Skip to content
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

Fix windows cross-compilation with CGO #5485

Merged
merged 1 commit into from
Feb 4, 2021
Merged

Conversation

awly
Copy link
Contributor

@awly awly commented Feb 4, 2021

Install mingw-w64 cross-compiler toolchain in the buildbox and pass
magic flags to go build to use it.

Fixes make -C build.assets release OS=windows.

Install `mingw-w64` cross-compiler toolchain in the buildbox and pass
magic flags to `go build` to use it.
libsqlite3-0 \
locales \
make \
mingw-w64 \
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to reviewers: this is the only new package added.
Everything else is formatting.

Copy link
Contributor

@webvictim webvictim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. I tested the resulting tsh.exe on a Windows box and it worked as expected.

It's a shame that this will break straight cross-compiling on Linux (without the extra options) but given that we only build release binaries using Docker via Drone it isn't a huge issue.

@awly awly merged commit 075c3fa into master Feb 4, 2021
@awly awly deleted the andrew/mfa-windows-build branch February 4, 2021 21:30
Joerger pushed a commit that referenced this pull request Feb 9, 2021
Install `mingw-w64` cross-compiler toolchain in the buildbox and pass
magic flags to `go build` to use it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants