1# Copyright (C) 2024 The Android Open Source Project
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
15"""Custom MODULE.bazel definition for GBL.
16
17Ideally, MODULE.bazel from Kleaf should be used instead because Kleaf is the
18root module. However, rules_rust_tinyjson and other crates needs to be resolved
19properly so it can be vendored.
20
21Do not fork this file for other projects!
22"""
23
24# TODO(b/328465178): Use MODULE.bazel from Kleaf instead.
25
26module(
27    name = "uefi-gbl",
28    version = "0.0.0",
29)
30
31kernel_toolchain_ext = use_extension("//build/kernel/kleaf:kernel_toolchain_ext.bzl", "kernel_toolchain_ext")
32use_repo(kernel_toolchain_ext, "kernel_toolchain_info")
33use_repo(kernel_toolchain_ext, "kleaf_clang_toolchain")
34use_repo(kernel_toolchain_ext, "kleaf_host_tools")
35
36register_toolchains(
37    "@kleaf_clang_toolchain//:all",
38    "//build/kernel:hermetic_tools_toolchain",
39    "//prebuilts/build-tools:py_toolchain",
40)
41
42bazel_dep(
43    name = "bazel_skylib",
44)
45bazel_dep(
46    name = "platforms",
47)
48bazel_dep(
49    name = "rules_cc",
50)
51
52local_path_override(
53    module_name = "apple_support",
54    path = "external/bazelbuild-apple_support",
55)
56
57local_path_override(
58    module_name = "bazel_skylib",
59    path = "external/bazel-skylib",
60)
61
62local_path_override(
63    module_name = "platforms",
64    path = "external/bazelbuild-platforms",
65)
66
67local_path_override(
68    module_name = "rules_cc",
69    path = "external/bazelbuild-rules_cc",
70)
71
72local_path_override(
73    module_name = "rules_java",
74    path = "external/bazelbuild-rules_java",
75)
76
77local_path_override(
78    module_name = "rules_license",
79    path = "external/bazelbuild-rules_license",
80)
81
82local_path_override(
83    module_name = "rules_python",
84    path = "external/bazelbuild-rules_python",
85)
86