Skip to content

Commit b3240b0

Browse files
committed
feat(bazel): still support cross-compiling for Windows
This allows us to compile the Angular CLI tests for Windows target platform, allowing us to execute the CLI tests outside Bazel in native Windows environments.
1 parent 0000d92 commit b3240b0

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

bazel/git-toolchain/BUILD.bazel

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,18 @@ toolchain(
7474
toolchain = ":git_macos_arm64",
7575
toolchain_type = ":toolchain_type",
7676
)
77+
78+
toolchain(
79+
name = "git_windows_toolchain",
80+
# TODO(devversion): Consult with Bazel team on best practices.
81+
# Toolchain selection isn't able to cross-compile if we require Windows
82+
# also as execution platform. This shouldn't be necessary because the toolchain
83+
# is only used for target platform execution (not to be confused with Bazel execution).
84+
# exec_compatible_with = [],
85+
target_compatible_with = [
86+
"@platforms//os:windows",
87+
"@platforms//cpu:x86_64",
88+
],
89+
toolchain = ":git_windows",
90+
toolchain_type = ":toolchain_type",
91+
)

bazel/remote-execution/BUILD.bazel

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ platform(
77
constraint_values = [
88
"@platforms//os:linux",
99
"@platforms//cpu:x86_64",
10-
"@bazel_tools//tools/cpp:clang",
1110
],
1211
exec_properties = {
1312
# We use the official Puppeteer docker image that supports launching browsers. Note that we

0 commit comments

Comments
 (0)