C#: support linux-arm64 in autobuild script - #22340
Open
redsun82 wants to merge 1 commit into
Open
Conversation
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Enables C# automatic build detection on native Linux Arm64 runners.
Changes:
- Adds
linux-arm64to the C# autobuild platform allowlist. - Preserves existing behavior for unsupported platforms.
Show a summary per file
| File | Description |
|---|---|
csharp/tools/autobuild.sh |
Allows invoking the packaged C# autobuilder on Linux Arm64. |
Review details
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
- Files reviewed: 1/1 changed files
- Comments generated: 0
- Review effort level: Balanced
hvitved
approved these changes
Aug 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enables the C# extractor's automatic build detection on
linux-arm64. This is the C# analog of #22338 (Go).Problem
The C# extractor's unix wrapper script
csharp/tools/autobuild.shhard-gates onCODEQL_PLATFORMbeinglinux64orosx64. On a native Linux Arm64 runnerCODEQL_PLATFORM=linux-arm64, so it bails out immediately with:This causes automatic build detection for C# to fail on arm64. Unlike Go (which had three gated scripts), C# has only this single gated script — there is no
identify-environment.sh/index.shgate to touch.Fix
Add
linux-arm64to the platform allowlist. The C# autobuilder (Semmle.Autobuild.CSharp) is a portable .NET program invoked fromtools/$CODEQL_PLATFORM/, so once alinux-arm64extractor pack is produced it runs unmodified.Build & packaging
The C# extractor binaries are produced per-
CODEQL_PLATFORMby the Bazel build:publish_binaryinmisc/bazel/csharp.bzlbuildsSemmle.Autobuild.CSharpself-contained and packages it undertools/{CODEQL_PLATFORM}/. The runtime identifier isosx-x64on macOS (intel-pinned for now) and the toolchain/target-resolved default on Linux/Windows — i.e. Linux is not pinned to x64. The Bazel platform machinery (misc/bazel/os.bzl,misc/bazel/pkg.bzl) already understandslinux_arm64and emitstools/linux-arm64/...on an arm64 build, exactly as the shippinglinux64/win64packs do today. This change lifts the last runtime gate; CI on the arm64 leg is the final confirmation.Validation
bash -n csharp/tools/autobuild.shpasses.