mirror of
https://github.com/github/codeql.git
synced 2026-07-30 07:04:57 +02:00
CODEQL_PLATFORM is OS-only today (linux->linux64, macos->osx64, windows->win64). ELF has no fat-binary equivalent, so Linux arm64 needs its own string. Add `linux-arm64` for os:linux AND cpu:arm64 while keeping every existing string byte-identical. - Add a public `//misc/bazel:linux_arm64` config_setting (os:linux + cpu:arm64). - Turn `os_select` into `codeql_platform_select`, a full selector over the four CodeQL platforms (`linux64`, `linux_arm64`, `osx64`, `win64`, plus `otherwise`), working in both macro (select) and rule (target_platform_has_constraint) contexts. There is deliberately no fallback between the two Linux slots. - Re-express `os_select` as a thin OS-only wrapper around it (Linux maps to both `linux64` and `linux_arm64`), so its existing swift/xcode callers keep working unchanged. - Add an `_arm64_constraint` entry to OS_DETECTION_ATTRS. - Drive the platform string from `codeql_platform_select` in pkg.bzl's `_detect_platform` and defs.bzl's `codeql_platform`. macOS keeps osx64 for both arch slices (universal binary): the linux_arm64 key requires both constraints, so the OS discriminator dominates. The new branch is dormant on existing CI (no job builds linux-on-arm64), so all current configs produce byte-identical outputs. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com> Copilot-Session: c5c5b0bf-4afa-468c-b2dd-197d80932b4b