Skip to content

C#: support linux-arm64 in autobuild script - #22340

Open
redsun82 wants to merge 1 commit into
mainfrom
redsun82-csharp-autobuild-linux-arm64
Open

C#: support linux-arm64 in autobuild script#22340
redsun82 wants to merge 1 commit into
mainfrom
redsun82-csharp-autobuild-linux-arm64

Conversation

@redsun82

@redsun82 redsun82 commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

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.sh hard-gates on CODEQL_PLATFORM being linux64 or osx64. On a native Linux Arm64 runner CODEQL_PLATFORM=linux-arm64, so it bails out immediately with:

Automatic build detection for linux-arm64 is not implemented.

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.sh gate to touch.

Fix

Add linux-arm64 to the platform allowlist. The C# autobuilder (Semmle.Autobuild.CSharp) is a portable .NET program invoked from tools/$CODEQL_PLATFORM/, so once a linux-arm64 extractor pack is produced it runs unmodified.

Build & packaging

The C# extractor binaries are produced per-CODEQL_PLATFORM by the Bazel build: publish_binary in misc/bazel/csharp.bzl builds Semmle.Autobuild.CSharp self-contained and packages it under tools/{CODEQL_PLATFORM}/. The runtime identifier is osx-x64 on 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 understands linux_arm64 and emits tools/linux-arm64/... on an arm64 build, exactly as the shipping linux64/win64 packs do today. This change lifts the last runtime gate; CI on the arm64 leg is the final confirmation.

Validation

bash -n csharp/tools/autobuild.sh passes.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings August 13, 2026 15:54
@redsun82
redsun82 requested a review from a team as a code owner August 13, 2026 15:54
@github-actions github-actions Bot added the C# 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 C# automatic build detection on native Linux Arm64 runners.

Changes:

  • Adds linux-arm64 to 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

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.

2 participants