Skip to content

Commit

Permalink
Remove unneeded BZL file and declare config_setting targets directl…
Browse files Browse the repository at this point in the history
…y in BUILD file.

Closes #24899.

PiperOrigin-RevId: 714169712
Change-Id: Ib0e30ec99fb83118ac29900baaecb1db3d5e0b86
  • Loading branch information
katre authored and copybara-github committed Jan 10, 2025
1 parent c08898a commit eec0524
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 51 deletions.
22 changes: 19 additions & 3 deletions src/conditions/BUILD.tools
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
load("//tools/windows:windows_config.bzl", "create_windows_host_config")

config_setting(
name = "freebsd",
constraint_values = ["@platforms//os:freebsd"],
Expand Down Expand Up @@ -127,6 +125,7 @@ config_setting(
"@platforms//cpu:x86_64",
],
)

config_setting(
name = "windows_arm64",
constraint_values = [
Expand All @@ -142,7 +141,24 @@ config_setting(
visibility = ["//visibility:public"],
)

create_windows_host_config()
config_setting(
name = "host_windows_x64_constraint",
values = {"host_cpu": "x64_windows"},
)

config_setting(
name = "host_windows_arm64_constraint",
values = {"host_cpu": "arm64_windows"},
)

alias(
name = "host_windows",
actual = select({
":host_windows_arm64_constraint": ":host_windows_arm64_constraint",
"//conditions:default": ":host_windows_x64_constraint",
}),
visibility = ["//visibility:public"],
)

config_setting(
name = "remote",
Expand Down
3 changes: 0 additions & 3 deletions tools/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ filegroup(
"//tools/test:srcs",
"//tools/test/CoverageOutputGenerator/java/com/google/devtools/coverageoutputgenerator:srcs",
"//tools/test/CoverageOutputGenerator/javatests/com/google/devtools/coverageoutputgenerator:srcs",
"//tools/windows:srcs",
"//tools/zip:srcs",
],
)
Expand Down Expand Up @@ -66,7 +65,6 @@ filegroup(
"//tools/sh:embedded_tools",
"//tools/test:embedded_tools",
"//tools/test/CoverageOutputGenerator/java/com/google/devtools/coverageoutputgenerator:embedded_tools",
"//tools/windows:srcs",
"//tools/zip:srcs",
],
)
Expand All @@ -85,7 +83,6 @@ filegroup(
"//tools/python:bzl_srcs",
"//tools/sh:bzl_srcs",
"//tools/test:bzl_srcs",
"//tools/windows:bzl_srcs",
],
)

Expand Down
1 change: 0 additions & 1 deletion tools/BUILD.tools
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@ filegroup(
"//tools/python:bzl_srcs",
"//tools/sh:bzl_srcs",
"//tools/test:bzl_srcs",
"//tools/windows:bzl_srcs",
],
)
11 changes: 0 additions & 11 deletions tools/windows/BUILD

This file was deleted.

33 changes: 0 additions & 33 deletions tools/windows/windows_config.bzl

This file was deleted.

0 comments on commit eec0524

Please sign in to comment.