| # Copyright (C) 2024 The Android Open Source Project |
| # |
| # 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. |
| |
| """Custom MODULE.bazel definition for GBL. |
| |
| This is a stripped down version of Kleaf's MODULE.bazel because this repository does not build |
| kernel. |
| """ |
| |
| module( |
| name = "uefi-gbl", |
| version = "0.0.0", |
| ) |
| |
| register_toolchains( |
| "//prebuilts/build-tools:py_exec_tools_toolchain", |
| "@gbl_python_toolchain//:py_toolchain", |
| ) |
| |
| bazel_dep( |
| name = "bazel_skylib", |
| ) |
| bazel_dep( |
| name = "gbl", |
| ) |
| |
| python_toolchain_repository = use_repo_rule("//prebuilts/clang/host/linux-x86/kleaf:python_toolchain_repository.bzl", "python_toolchain_repository") |
| |
| python_toolchain_repository( |
| name = "gbl_python_toolchain", |
| toolchain_version_bzl = "@gbl//toolchain:constants.scl", |
| ) |
| |
| bazel_dep( |
| name = "platforms", |
| ) |
| bazel_dep( |
| name = "rules_python", |
| ) |
| bazel_dep( |
| name = "rules_rust", |
| ) |
| |
| local_path_override( |
| module_name = "apple_support", |
| path = "bootable/libbootloader/gbl/fake_modules/apple_support", |
| ) |
| |
| local_path_override( |
| module_name = "bazel_features", |
| path = "external/bazel-contrib-bazel_features", |
| ) |
| |
| local_path_override( |
| module_name = "bazel_skylib", |
| path = "external/bazel-skylib", |
| ) |
| |
| local_path_override( |
| module_name = "gbl", |
| path = "bootable/libbootloader/gbl", |
| ) |
| |
| local_path_override( |
| module_name = "googletest", |
| path = "external/googletest", |
| ) |
| |
| local_path_override( |
| module_name = "platforms", |
| path = "external/bazelbuild-platforms", |
| ) |
| |
| local_path_override( |
| module_name = "rules_cc", |
| path = "external/bazelbuild-rules_cc", |
| ) |
| |
| local_path_override( |
| module_name = "rules_java", |
| path = "bootable/libbootloader/gbl/fake_modules/rules_java", |
| ) |
| |
| local_path_override( |
| module_name = "rules_kotlin", |
| path = "bootable/libbootloader/gbl/fake_modules/rules_kotlin", |
| ) |
| |
| local_path_override( |
| module_name = "rules_license", |
| path = "external/bazelbuild-rules_license", |
| ) |
| |
| local_path_override( |
| module_name = "rules_pkg", |
| path = "external/bazelbuild-rules_pkg", |
| ) |
| |
| local_path_override( |
| module_name = "rules_python", |
| path = "external/bazelbuild-rules_python", |
| ) |
| |
| local_path_override( |
| module_name = "rules_shell", |
| path = "external/bazelbuild-rules_shell", |
| ) |
| |
| local_path_override( |
| module_name = "rules_rust", |
| path = "external/bazelbuild-rules_rust", |
| ) |
| |
| local_path_override( |
| module_name = "rules_rust_bindgen", |
| path = "external/bazelbuild-rules_rust/extensions/bindgen", |
| ) |
| |
| local_path_override( |
| module_name = "protobuf", |
| path = "bootable/libbootloader/gbl/fake_modules/protobuf", |
| ) |
| |
| new_local_repository = use_repo_rule("@bazel_tools//tools/build_defs/repo:local.bzl", "new_local_repository") |
| |
| new_local_repository( |
| name = "rules_rust_tinyjson", |
| build_file = "@rules_rust//util/process_wrapper:BUILD.tinyjson.bazel", |
| path = "external/rust/android-crates-io/crates/tinyjson", |
| ) |
| |
| internal_deps = use_extension("@rules_rust//rust/private:internal_extensions.bzl", "i") |
| |
| override_repo(internal_deps, "rules_rust_tinyjson") |