go plugin: Add support for cross-compilation
Metadata
Current evaluation
Merged after approval, enabling cross-compilation for the Go plugin via snapcraft's --target-arch flag. Six files were modified with 144 additions and 11 deletions.
Suggested action: —
No scores available.
Issue body
Support doing `snapcraft snap --target-arch=` with parts using the **go** plugin
Evaluation history
| Date | Model | Scores | Action | Summary |
|---|---|---|---|---|
| qwen/qwen3.6-35b-a3b | — | — | Merged after approval, enabling cross-compilation for the Go plugin via snapcraft's --target-arch flag. Six files were modified with 144 additions and 11 deletions. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged: adds cross-compilation support to the go plugin, enabling snapcraft to build Go parts using the --target-arch flag. | |
| qwen3.6-35b-a3b-mtp-q6 | — | — | Merged pull request adding cross-compilation support to the Go plugin, enabling snapcraft snap --target-arch= for Go parts. |
Update history
No update history recorded yet.
Related issues
| Issue | Project | State | Summary | Similarity |
|---|---|---|---|---|
| #1343 go plugin: Cross compile with CGo | snapcraft | merged | Merged to enable cross-compilation for Go plugins when CGo is enabled. Approved by one reviewer, the change updates seven files with 83 additions and 7 deletions to correctly handle CGo flags during cross builds. | |
| #1253 go plugin: cross-compilation support | snapcraft | closed | Superseded. The author split the changes into four smaller pull requests: go plugin cross-compilation support, CGo cross-compilation, multi-arch build dependencies, and foreign arch setup. | |
| #1350 rust plugin: Add support for cross-compilation | snapcraft | merged | Cross-compilation support added to the Rust plugin for snapcraft's --target-arch flag. Approved and merged despite unresolved comments and lack of ARM hardware testing. | |
| #78 plugins: add go plugin (CRAFT-48) | craft-parts | merged | Merged a Go plugin for go.mod-based projects, adapted from Snapcraft V2. Approved by two reviewers, passed CI, and introduced 425 additions across seven files. Co-authored by Sergio Schvezov. | |
| #694 docs: add docs for 'go' plugin | craft-parts | merged | Merged documentation for the 'go' plugin, featuring a build-time example for Snapcraft and Rockcraft. Approved by two reviewers, the update adds 97 lines across two files. | |
| #271 plugins: support "go generate" in go parts | craft-parts | merged | Merged. Integrates go generate into the GoPlugin build step to execute code generation prior to compilation. Approved by a reviewer, passed CI checks, and modified five files. The change is backward compatible and resolves CRAFT-1316. | |
| #1858785 go plugin doesn't strip binaries | snapcraft (launchpad) | open | Feature request to add an option to strip binaries built by the go plugin to reduce snap size. 6.6 years old with zero comments and no labels; the go plugin has since been removed from snapcraft, making the request moot. |