1# Copyright 2021 The Pigweed Authors 2# 3# Licensed under the Apache License, Version 2.0 (the "License"); you may not 4# use this file except in compliance with the License. You may obtain a copy of 5# the License at 6# 7# https://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, WITHOUT 11# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the 12# License for the specific language governing permissions and limitations under 13# the License. 14 15workspace( 16 name = "pigweed", 17) 18 19load("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository") 20load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") 21 22# TODO: b/383856665 - rules_fuchsia requires host_platform. Once this is fixed 23# we can remove this entry. 24load("@platforms//host:extension.bzl", "host_platform_repo") 25 26host_platform_repo( 27 name = "host_platform", 28) 29 30# Setup Fuchsia SDK. 31git_repository( 32 name = "fuchsia_infra", 33 # ROLL: Warning: this entry is automatically updated. 34 # ROLL: Last updated 2025-03-01. 35 # ROLL: By https://cr-buildbucket.appspot.com/build/8721564176113964977. 36 commit = "c87230dc243641ef09022e6df8ca4693aff6b3cb", 37 remote = "https://fuchsia.googlesource.com/fuchsia-infra-bazel-rules", 38) 39 40# fuchsia_infra_workspace is a macro, not a repository rule, so we can't call 41# it from MODULE.bazel. 42load("@fuchsia_infra//:workspace.bzl", "fuchsia_infra_workspace") 43 44fuchsia_infra_workspace() 45 46# Required by fuzztest 47http_archive( 48 name = "com_googlesource_code_re2", 49 sha256 = "f89c61410a072e5cbcf8c27e3a778da7d6fd2f2b5b1445cd4f4508bee946ab0f", 50 strip_prefix = "re2-2022-06-01", 51 url = "https://github.com/google/re2/archive/refs/tags/2022-06-01.tar.gz", 52) 53 54# Required by fuzztest 55http_archive( 56 name = "com_google_absl", 57 sha256 = "338420448b140f0dfd1a1ea3c3ce71b3bc172071f24f4d9a57d59b45037da440", 58 strip_prefix = "abseil-cpp-20240116.0", 59 url = "https://github.com/abseil/abseil-cpp/releases/download/20240116.0/abseil-cpp-20240116.0.tar.gz", 60) 61 62# Required by fuzztest 63http_archive( 64 name = "rules_proto", 65 sha256 = "14a225870ab4e91869652cfd69ef2028277fc1dc4910d65d353b62d6e0ae21f4", 66 strip_prefix = "rules_proto-7.1.0", 67 url = "https://github.com/bazelbuild/rules_proto/releases/download/7.1.0/rules_proto-7.1.0.tar.gz", 68) 69 70# TODO: https://pwbug.dev/365103864 - Fuzztest is not in the BCR yet (also see 71# https://github.com/google/fuzztest/issues/950). 72http_archive( 73 name = "com_google_fuzztest", 74 strip_prefix = "fuzztest-6eb010c7223a6aa609b94d49bfc06ac88f922961", 75 url = "https://github.com/google/fuzztest/archive/6eb010c7223a6aa609b94d49bfc06ac88f922961.zip", 76) 77