Skip to content

Expose sysroots as single directory artifacts - #5429

Closed
phlax with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-sysroot-filegroup-issue
Closed

phlax with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-sysroot-filegroup-issue

Conversation

Copilot AI commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

Bazel 9 warns because each sysroot expands into ~5,600 inputs. A single source-directory artifact gives compile actions one sandbox symlink and one merkle-tree node.

  • Layout: Extract Linux and macOS archives under sysroot/, prune :-named and .pl entries, and expose srcs = ["."] through the existing root :sysroot alias.
  • Compatibility: Preserve :headers, :libs, and :toolchain_sysroot via subpackage forwarding. Keep archive selection and hashes unchanged.
  • LLVM: Use direct package labels because LLVM derives its sysroot path from the configured label’s package:
    llvm.sysroot(
        name = "llvm_toolchain",
        label = "@sysroot_linux_amd64//sysroot:sysroot",
        targets = ["linux-x86_64"],
    )
  • Migration and coverage: Document raw-label changes—//:usr/include/stdio.h becomes //sysroot:usr/include/stdio.h—including Envoy’s Rust SDK consumer. Add regression coverage for both Linux architectures and the empty macOS fallback.

Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix sysroot filegroup generation for Bazel builds Expose sysroots as single directory artifacts Oct 15, 2026
Copilot AI requested a review from phlax October 15, 2026 18:45
@phlax phlax closed this Oct 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants