Skip to content
Snippets Groups Projects
Commit eec05243 authored by John Cater's avatar John Cater Committed by Copybara-Service
Browse files

Remove unneeded BZL file and declare `config_setting` targets directl…

…y in BUILD file.

Closes #24899.

PiperOrigin-RevId: 714169712
Change-Id: Ib0e30ec99fb83118ac29900baaecb1db3d5e0b86
parent c08898ab
No related merge requests found
load("//tools/windows:windows_config.bzl", "create_windows_host_config")
config_setting(
name = "freebsd",
constraint_values = ["@platforms//os:freebsd"],
......@@ -127,6 +125,7 @@ config_setting(
"@platforms//cpu:x86_64",
],
)
config_setting(
name = "windows_arm64",
constraint_values = [
......@@ -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",
......
......@@ -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",
],
)
......@@ -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",
],
)
......@@ -85,7 +83,6 @@ filegroup(
"//tools/python:bzl_srcs",
"//tools/sh:bzl_srcs",
"//tools/test:bzl_srcs",
"//tools/windows:bzl_srcs",
],
)
......
......@@ -21,6 +21,5 @@ filegroup(
"//tools/python:bzl_srcs",
"//tools/sh:bzl_srcs",
"//tools/test:bzl_srcs",
"//tools/windows:bzl_srcs",
],
)
package(default_visibility = ["//visibility:public"])
filegroup(
name = "srcs",
srcs = glob(["**"]),
)
filegroup(
name = "bzl_srcs",
srcs = glob(["*.bzl"]),
)
# Copyright 2022 The Bazel Authors. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
"""Rules to create windows configurations"""
def create_windows_host_config(name = "windows_host_config"):
native.config_setting(
name = "host_windows_x64_constraint",
values = {"host_cpu": "x64_windows"},
)
native.config_setting(
name = "host_windows_arm64_constraint",
values = {"host_cpu": "arm64_windows"},
)
conditions = select({
"host_windows_arm64_constraint": "host_windows_arm64_constraint",
"//conditions:default": "host_windows_x64_constraint",
})
native.alias(name = "host_windows", actual = conditions, visibility = ["//visibility:public"])
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment