Skip to content

Commit 5257dd3

Browse files
committed
fix: add explicit C++ toolchain configuration for Linux CI
Enable cc_configure extension to auto-detect system C++ toolchains. This resolves the 'No matching toolchains found for @@bazel_tools//tools/cpp:toolchain_type' error on Linux CI where file_operations_component (Rust binary) needs C++ linking. Local macOS works because apple_support provides C++ toolchains automatically, but Linux CI needs explicit configuration.
1 parent 7285cf6 commit 5257dd3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

MODULE.bazel

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ bazel_dep(name = "platforms", version = "0.0.11")
1818
bazel_dep(name = "rules_cc", version = "0.1.1")
1919
bazel_dep(name = "bazel_skylib", version = "1.7.1")
2020

21+
# Enable C++ toolchain auto-configuration for cross-platform support
22+
cc_configure = use_extension("@rules_cc//cc:extensions.bzl", "cc_configure")
23+
2124
# WebAssembly and component support
2225
bazel_dep(name = "rules_rust", version = "0.62.0")
2326
bazel_dep(name = "rules_go", version = "0.55.1")
@@ -76,7 +79,8 @@ register_toolchains(
7679
"@wasi_sdk//:cc_toolchain",
7780
)
7881

79-
# Register default C++ toolchains for file operations component - force cache invalidation
82+
# Register C++ toolchains explicitly for cross-platform compatibility
83+
# This ensures Linux CI has proper C++ toolchain resolution for Rust binaries
8084
register_toolchains("@bazel_tools//tools/cpp:all")
8185

8286
# Note: Rust dependencies are provided by rules_wasm_component

0 commit comments

Comments
 (0)