| # Copyright 2024 The Pigweed Authors |
| # |
| # 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 |
| # |
| # https://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. |
| module( |
| name = "maize", |
| ) |
| |
| bazel_dep(name = "rules_rust", version = "0.52.2") |
| bazel_dep(name = "pigweed") |
| bazel_dep(name = "pw_toolchain") |
| |
| # Module overrides |
| # ================ |
| # single_version_override(module_name = "rules_cc", version = "0.0.10") |
| |
| # TODO: https://pwbug.dev/354274498 - nanopb is not yet in the BCR. |
| git_override( |
| module_name = "nanopb", |
| commit = "7c6c581bc6f7406a4f01c3b9853251ff0a68458b", |
| remote = "https://github.com/nanopb/nanopb.git", |
| ) |
| |
| git_override( |
| module_name = "pigweed", |
| commit = "23370ed5ed0e01273080c231ee3475916dc74fba", |
| remote = "https://pigweed.googlesource.com/pigweed/pigweed", |
| ) |
| |
| git_override( |
| module_name = "pw_toolchain", |
| commit = "23370ed5ed0e01273080c231ee3475916dc74fba", |
| remote = "https://pigweed.googlesource.com/pigweed/pigweed", |
| strip_prefix = "pw_toolchain_bazel", |
| ) |
| |
| # Toolchain registration |
| # ====================== |
| # Register Pigweed's C++ toolchains. |
| register_toolchains( |
| "@pigweed//pw_toolchain:cc_toolchain_cortex-m0", |
| "@pigweed//pw_toolchain:cc_toolchain_cortex-m33", |
| "@pigweed//pw_toolchain/host_clang:host_cc_toolchain_linux", |
| "@pigweed//pw_toolchain/host_clang:host_cc_toolchain_macos", |
| dev_dependency = True, |
| ) |
| |
| pw_rust = use_extension("@pigweed//pw_toolchain/rust:extensions.bzl", "pw_rust") |
| pw_rust.toolchain(cipd_tag = "rust_revision:bf9c7a64ad222b85397573668b39e6d1ab9f4a72") |
| use_repo(pw_rust, "pw_rust_toolchains") |
| |
| register_toolchains( |
| "@pw_rust_toolchains//:all", |
| dev_dependency = True, |
| ) |