Skip to content

bazel: split wee8 prebuilts by stdlib and select the correct archive for gcc - #5051

Closed
phlax with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-30125649-398289295-d0dd3661-e70e-4218-900c-e60cffd9da3d
Closed

bazel: split wee8 prebuilts by stdlib and select the correct archive for gcc#5051
phlax with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-30125649-398289295-d0dd3661-e70e-4218-900c-e60cffd9da3d

Conversation

Copilot AI commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

//v8:wee8_smoke_test was consuming a libc++-built prebuilt archive on gcc/libstdc++ legs because wee8 prebuilts were keyed only by cpu/os. This changes wee8 packaging and selection to treat stdlib as part of the artifact identity, while keeping the existing libc++ artifact name stable.

  • What changes

    • //v8:wee8_package_linux_x86_64 now produces both x86_64 variants in a single build via a Starlark transition:
      • v8-wee8-<version>-linux-x86_64.tar.xz (existing libc++ artifact, preserved)
      • v8-wee8-<version>-linux-x86_64-libstdcxx.tar.xz
    • aarch64 remains libc++ only and keeps the existing artifact name.
  • Packaging / transition

    • Adds an outgoing transition in bazel/v8/wee8_package.bzl that flips //compile:use_gcc_toolchain for the libstdc++ package edge.
    • The transition also sets //command_line_option:extra_toolchains, so the gcc toolchains are selected within the transitioned configuration; no extra CI matrix leg is needed.
  • Prebuilt repository layout

    • setup_wee8_prebuilt now instantiates:
      • @wee8_prebuilt_x86_64
      • @wee8_prebuilt_x86_64_libstdcxx
      • @wee8_prebuilt_aarch64
    • VERSIONS["wee8_sha256"] and the release update logic are keyed by both arch and stdlib.
    • Missing prebuilt hashes no longer generate a text file named lib/libwee8.a; the repo instead exposes an explicitly incompatible target with a clear message.
  • Consumer selection

    • bazel/v8/BUILD now defines //v8:wee8 locally and selects on both platform and //compile:use_gcc_toolchain.
    • On linux/x86_64:
      • default config resolves to the libc++ prebuilt
      • --config=gcc resolves to the libstdc++ prebuilt
    • On linux/aarch64 + gcc:
      • selection fails explicitly instead of silently falling through to the libc++ archive
  • Module / workspace wiring

    • Wires wee8 prebuilt repos into both WORKSPACE and MODULE.bazel so the same prebuilt selection model exists in workspace and bzlmod modes.
    • Adds a small bzlmod extension for fixed-name wee8 prebuilt repos.
  • CI / release metadata

    • Updates package-v8 artifact globs to upload the new stdlib-qualified tarball alongside the existing libc++ artifact.
    • Raises --experimental_ui_max_stdouterr_bytes in the Bazel CI invocation for diagnosable link failures.
    • Updates release SHA extraction to understand the new artifact naming scheme.

Example of the new selection shape:

alias(
    name = "wee8",
    actual = select({
        ":linux_x86_64_gcc": "@wee8_prebuilt_x86_64_libstdcxx//:wee8",
        ":linux_x86_64": "@wee8_prebuilt_x86_64//:wee8",
        ":linux_aarch64_gcc": ":wee8_aarch64_gcc_unsupported",
        ":linux_aarch64": "@wee8_prebuilt_aarch64//:wee8",
        "//conditions:default": "@v8//:wee8",
    }),
)

@netlify

netlify Bot commented Aug 13, 2026

Copy link
Copy Markdown

Deploy Preview for nifty-bassi-e26446 ready!

Name Link
🔨 Latest commit 88e6721
🔍 Latest deploy log https://app.netlify.com/projects/nifty-bassi-e26446/deploys/6a7dd5281ac7d40008354c94
😎 Deploy Preview https://deploy-preview-5051--nifty-bassi-e26446.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
Copilot AI changed the title [WIP] Copilot Request bazel: split wee8 prebuilts by stdlib and select the correct archive for gcc Aug 13, 2026
Copilot AI requested a review from phlax August 13, 2026 14:33
@phlax phlax closed this Aug 13, 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