Skip to content

Commit 99fba3a

Browse files
A Googlercopybara-github
authored andcommitted
Internal change
PiperOrigin-RevId: 819457208 Change-Id: Iec3cc2806110cf3a4167e6fece5943eff79571a6
1 parent eb99856 commit 99fba3a

2 files changed

Lines changed: 27 additions & 0 deletions

File tree

rules/acls.bzl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ load("//rules/acls:dex2oat_opts.bzl", "CAN_USE_DEX2OAT_OPTIONS")
6161
load("//rules/acls:disable_optimizing_dexer.bzl", "DISABLE_OPTIMIZING_DEXER")
6262
load("//rules/acls:enable_exported_lint_checks.bzl", "ENABLE_EXPORTED_LINT_CHECKS")
6363
load("//rules/acls:force_final_resources.bzl", "FORCE_FINAL_ANDROID_BINARY_RESOURCES")
64+
load("//rules/acls:gpu_override.bzl", "CAN_USE_GPU_OVERRIDE")
6465
load("//rules/acls:install_apps_in_data.bzl", "INSTALL_APPS_IN_DATA")
6566
load("//rules/acls:lint_registry_rollout.bzl", "LINT_REGISTRY_FALLBACK", "LINT_REGISTRY_ROLLOUT")
6667
load("//rules/acls:local_test_multi_proto.bzl", "LOCAL_TEST_MULTI_PROTO_PKG")
@@ -138,6 +139,9 @@ def _in_databinding_allowed(fqn):
138139
def _in_dex2oat_opts(fqn):
139140
return matches(fqn, CAN_USE_DEX2OAT_OPTIONS_DICT)
140141

142+
def _in_gpu_override(fqn):
143+
return matches(fqn, CAN_USE_GPU_OVERRIDE_DICT)
144+
141145
def _in_install_apps_in_data(fqn):
142146
return matches(fqn, AIT_INSTALL_APPS_IN_DATA_DICT)
143147

@@ -255,6 +259,7 @@ ANDROID_TEST_LOCKDOWN_GENERATOR_FUNCTIONS_DICT = make_dict(ANDROID_TEST_LOCKDOWN
255259
ANDROID_TEST_LOCKDOWN_TARGETS_DICT = make_dict(ANDROID_TEST_LOCKDOWN_TARGETS)
256260
B122039567_DICT = make_dict(B122039567)
257261
CAN_USE_DEX2OAT_OPTIONS_DICT = make_dict(CAN_USE_DEX2OAT_OPTIONS)
262+
CAN_USE_GPU_OVERRIDE_DICT = make_dict(CAN_USE_GPU_OVERRIDE)
258263
AIT_INSTALL_APPS_IN_DATA_DICT = make_dict(INSTALL_APPS_IN_DATA)
259264
LOCAL_TEST_MULTI_PROTO_PKG_DICT = make_dict(LOCAL_TEST_MULTI_PROTO_PKG)
260265
TEST_TO_INSTRUMENT_TEST_FALLBACK_DICT = make_dict(TEST_TO_INSTRUMENT_TEST_FALLBACK)
@@ -361,6 +366,7 @@ acls = struct(
361366
in_android_test_lockdown_allowlist = _in_android_test_lockdown_allowlist,
362367
in_databinding_allowed = _in_databinding_allowed,
363368
in_dex2oat_opts = _in_dex2oat_opts,
369+
in_gpu_override = _in_gpu_override,
364370
in_install_apps_in_data = _in_install_apps_in_data,
365371
in_local_test_multi_proto = _in_local_test_multi_proto,
366372
in_test_to_instrument_test_rollout = _in_test_to_instrument_test_rollout,

rules/acls/gpu_override.bzl

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Copyright 2025 The Bazel Authors. All rights reserved.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
"""Targets that are allowed to use the gpu_override attribute."""
15+
16+
load("//rules:visibility.bzl", "PROJECT_VISIBILITY")
17+
18+
visibility(PROJECT_VISIBILITY)
19+
20+
CAN_USE_GPU_OVERRIDE = [
21+
]

0 commit comments

Comments
 (0)