Lightweight coding agent that runs in your terminal
Rust
Use local MSVC toolchains for native Windows Bazel tests (#53443)
Eric Traut3ece80b784c7
diff --git a/.bazelrc b/.bazelrcindex d30b1fa1ca..b7698b896e 100644--- a/.bazelrc+++ b/.bazelrc@@ -231,11 +231,12 @@ common:v8-target-arm64 --@v8//bazel/config:v8_target_cpu=arm64# the matching runtime objects.common:rusty-v8-upstream-libcxx --@v8//:v8_use_rusty_v8_custom_libcxx=True-# Native Windows archive builds inherit the runner's MSVC SDK environment.+# Native Windows MSVC builds inherit the runner's MSVC SDK environment.# Client environment capture and repository discovery happen before target# transitions, so these runner settings cannot live in runtime_package.bzl.-# The archive target selects its own MSVC host platform and native toolchains.+# Hermetic LLVM targets the GNU ABI on Windows even on an MSVC platform.build:ci-windows-msvc --repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=0+build:ci-windows-msvc --extra_toolchains=@local_config_cc//:cc-toolchain-x64_windows,@local_config_cc//:cc-toolchain-arm64_windowsbuild:ci-windows-msvc --action_env=PATHbuild:ci-windows-msvc --host_action_env=PATHbuild:ci-windows-msvc --action_env=INCLUDEdiff --git a/.github/workflows/bazel.yml b/.github/workflows/bazel.ymlindex ede5a7f070..2f4b09deb1 100644--- a/.github/workflows/bazel.yml+++ b/.github/workflows/bazel.yml@@ -251,8 +251,8 @@ jobs:test-windows-native-main:# Native Windows Bazel tests are slower and frequently approach the# 30-minute PR budget. Run this only for post-merge commits to main and give- # it a larger timeout.- if: github.event_name == 'push' && github.ref == 'refs/heads/main'+ # it a larger timeout. Also allow manual runs for native toolchain changes.+ if: (github.event_name == 'push' && github.ref == 'refs/heads/main') || github.event_name == 'workflow_dispatch'timeout-minutes: 40runs-on:group: ${{ github.event.repository.name }}-runners@@ -290,6 +290,7 @@ jobs:bazel_test_args=(test+ --config=ci-windows-msvc--platforms=//:windows_x86_64_msvc--test_tag_filters=-argument-comment-lint--test_verbose_timeout_warnings