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

Experimental Zig support for cross-compiling #32626

Closed
wants to merge 2 commits into from

Conversation

techknowlogick
Copy link
Member

adds some additional make steps, and replaces some xgo for some steps.

Currently zig is failing for darwin targets & linux-arm5, hence why they weren't switched out, and doesn't (yet?) support cross-compiling for freebsd.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Nov 23, 2024
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Nov 23, 2024
Makefile Show resolved Hide resolved
@wxiaoguang
Copy link
Contributor

wxiaoguang commented Nov 24, 2024

I have some questions about the cross-compiling. Is it possible to do native compiling as much as possible? Zig is still at an early stage and there are a lot of 🔍 in release notes.

  • For Linux targets: use github actions qemu (or use pre-cross-compiled musl lib)
  • For FreeBSD targets: use self-hosted Linux action runner and use docker to run a FreeBSD VM via KVM (then we could also test the binary artifacts in the VM)
  • For macOS & Windows: cross-compiling from Linux for them is widely supported, so maybe it isn't a problem.

@wxiaoguang
Copy link
Contributor

And one more thing, should we split the Makefile into small files (or even small scripts)? Now more and more things are being added into the Makefile, and it seems difficult to debug on step (one build).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/internal size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants