Skip to content

Go: support linux-arm64 in autobuild scripts - #22338

Merged
redsun82 merged 1 commit into
mainfrom
redsun82-go-autobuild-linux-arm64
Aug 13, 2026
Merged

Go: support linux-arm64 in autobuild scripts#22338
redsun82 merged 1 commit into
mainfrom
redsun82-go-autobuild-linux-arm64

Conversation

@redsun82

@redsun82 redsun82 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Part of the native Linux Arm64 support effort. Enables the Go extractor's automatic build detection on linux-arm64.

Problem

The Go extractor's unix wrapper scripts in go/codeql-tools/ (autobuild.sh, index.sh, identify-environment.sh) hard-gate on CODEQL_PLATFORM being linux64 or osx64. On a native Linux Arm64 runner CODEQL_PLATFORM=linux-arm64, so every one of them bails out immediately with:

Automatic build detection for linux-arm64 is not implemented.

This causes codeql database create to fail for Go on arm64 even though the per-platform extractor binaries (go-autobuilder, go-build-runner, go-extractor, etc.) are already built natively for linux-arm64 via prefix = "tools/{CODEQL_PLATFORM}".

Fix

Add linux-arm64 to the platform allowlist in the three scripts. The Go autobuilder/extractor code is arch-agnostic (no hardcoded amd64/GOARCH assumptions), so no further change is needed. macOS remains a universal osx64 build, so no osx-arm64 entry is required.

Validation

Surfaced by running the Go integration tests on a native linux-arm64 runner, where the whole suite failed with the message above; this fix unblocks that slice. bash -n passes on all three modified scripts.

Copilot AI balanced review requested due to automatic review settings August 13, 2026 14:38
@redsun82
redsun82 requested review from a team as code owners August 13, 2026 14:38
@github-actions github-actions Bot added the Go label Aug 13, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Enables Go automatic build detection on native Linux Arm64.

Changes:

  • Adds linux-arm64 to platform allowlists across Go’s Unix tooling scripts.
  • Allows autobuilding, indexing, and environment detection to use native Arm64 binaries.
Show a summary per file
File Description
go/codeql-tools/autobuild.sh Enables Linux Arm64 autobuilding.
go/codeql-tools/index.sh Enables Linux Arm64 indexing.
go/codeql-tools/identify-environment.sh Enables Linux Arm64 environment detection.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 3/3 changed files
  • Comments generated: 0
  • Review effort level: Balanced

The go autobuilder, extractor and identify-environment tools are
arch-native and their per-platform binaries are already built for
linux-arm64, but the unix wrapper scripts hard-gated on linux64/osx64
and bailed with "Automatic build detection ... is not implemented" on
arm64. Allow linux-arm64 so Go extraction works on native Linux Arm64.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@redsun82
redsun82 force-pushed the redsun82-go-autobuild-linux-arm64 branch from a27bb8a to 33c26b0 Compare August 13, 2026 15:11

@jketema jketema left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@redsun82
redsun82 merged commit 8eb1ae9 into main Aug 13, 2026
11 checks passed
@redsun82
redsun82 deleted the redsun82-go-autobuild-linux-arm64 branch August 13, 2026 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants