xref: /aosp_15_r20/external/pigweed/WORKSPACE (revision 61c4878ac05f98d0ceed94b57d316916de578985)
1*61c4878aSAndroid Build Coastguard Worker# Copyright 2021 The Pigweed Authors
2*61c4878aSAndroid Build Coastguard Worker#
3*61c4878aSAndroid Build Coastguard Worker# Licensed under the Apache License, Version 2.0 (the "License"); you may not
4*61c4878aSAndroid Build Coastguard Worker# use this file except in compliance with the License. You may obtain a copy of
5*61c4878aSAndroid Build Coastguard Worker# the License at
6*61c4878aSAndroid Build Coastguard Worker#
7*61c4878aSAndroid Build Coastguard Worker#     https://www.apache.org/licenses/LICENSE-2.0
8*61c4878aSAndroid Build Coastguard Worker#
9*61c4878aSAndroid Build Coastguard Worker# Unless required by applicable law or agreed to in writing, software
10*61c4878aSAndroid Build Coastguard Worker# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
11*61c4878aSAndroid Build Coastguard Worker# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
12*61c4878aSAndroid Build Coastguard Worker# License for the specific language governing permissions and limitations under
13*61c4878aSAndroid Build Coastguard Worker# the License.
14*61c4878aSAndroid Build Coastguard Worker
15*61c4878aSAndroid Build Coastguard Workerworkspace(
16*61c4878aSAndroid Build Coastguard Worker    name = "pigweed",
17*61c4878aSAndroid Build Coastguard Worker)
18*61c4878aSAndroid Build Coastguard Worker
19*61c4878aSAndroid Build Coastguard Workerload("@bazel_tools//tools/build_defs/repo:git.bzl", "git_repository")
20*61c4878aSAndroid Build Coastguard Workerload("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
21*61c4878aSAndroid Build Coastguard Workerload(
22*61c4878aSAndroid Build Coastguard Worker    "//pw_env_setup/bazel/cipd_setup:cipd_rules.bzl",
23*61c4878aSAndroid Build Coastguard Worker    "cipd_repository",
24*61c4878aSAndroid Build Coastguard Worker)
25*61c4878aSAndroid Build Coastguard Worker
26*61c4878aSAndroid Build Coastguard Worker# Setup Fuchsia SDK.
27*61c4878aSAndroid Build Coastguard Worker# Required by: bt-host.
28*61c4878aSAndroid Build Coastguard Worker# Used in modules: //pw_bluetooth_sapphire.
29*61c4878aSAndroid Build Coastguard Worker# NOTE: These blocks cannot feasibly be moved into a macro.
30*61c4878aSAndroid Build Coastguard Worker# See https://github.com/bazelbuild/bazel/issues/1550
31*61c4878aSAndroid Build Coastguard Workergit_repository(
32*61c4878aSAndroid Build Coastguard Worker    name = "fuchsia_infra",
33*61c4878aSAndroid Build Coastguard Worker    # ROLL: Warning: this entry is automatically updated.
34*61c4878aSAndroid Build Coastguard Worker    # ROLL: Last updated 2024-11-16.
35*61c4878aSAndroid Build Coastguard Worker    # ROLL: By https://cr-buildbucket.appspot.com/build/8731076857971632145.
36*61c4878aSAndroid Build Coastguard Worker    commit = "a627dc11a73d74754d9a66a3b80b6f352c94d723",
37*61c4878aSAndroid Build Coastguard Worker    remote = "https://fuchsia.googlesource.com/fuchsia-infra-bazel-rules",
38*61c4878aSAndroid Build Coastguard Worker)
39*61c4878aSAndroid Build Coastguard Worker
40*61c4878aSAndroid Build Coastguard Workerload("@fuchsia_infra//:workspace.bzl", "fuchsia_infra_workspace")
41*61c4878aSAndroid Build Coastguard Worker
42*61c4878aSAndroid Build Coastguard Workerfuchsia_infra_workspace()
43*61c4878aSAndroid Build Coastguard Worker
44*61c4878aSAndroid Build Coastguard WorkerFUCHSIA_SDK_VERSION = "version:25.20241025.4.1"
45*61c4878aSAndroid Build Coastguard Worker
46*61c4878aSAndroid Build Coastguard Workercipd_repository(
47*61c4878aSAndroid Build Coastguard Worker    name = "fuchsia_sdk",
48*61c4878aSAndroid Build Coastguard Worker    path = "fuchsia/sdk/core/fuchsia-bazel-rules/linux-amd64",
49*61c4878aSAndroid Build Coastguard Worker    tag = FUCHSIA_SDK_VERSION,
50*61c4878aSAndroid Build Coastguard Worker)
51*61c4878aSAndroid Build Coastguard Worker
52*61c4878aSAndroid Build Coastguard Workerregister_toolchains("@fuchsia_sdk//:fuchsia_toolchain_sdk")
53*61c4878aSAndroid Build Coastguard Worker
54*61c4878aSAndroid Build Coastguard Workercipd_repository(
55*61c4878aSAndroid Build Coastguard Worker    name = "fuchsia_products_metadata",
56*61c4878aSAndroid Build Coastguard Worker    path = "fuchsia/development/product_bundles/v2",
57*61c4878aSAndroid Build Coastguard Worker    tag = FUCHSIA_SDK_VERSION,
58*61c4878aSAndroid Build Coastguard Worker)
59*61c4878aSAndroid Build Coastguard Worker
60*61c4878aSAndroid Build Coastguard Workerload("//pw_build/bazel_internal/fuchsia_sdk_workspace:products.bzl", "fuchsia_products_repository")
61*61c4878aSAndroid Build Coastguard Worker
62*61c4878aSAndroid Build Coastguard Workerfuchsia_products_repository(
63*61c4878aSAndroid Build Coastguard Worker    name = "fuchsia_products",
64*61c4878aSAndroid Build Coastguard Worker    metadata_file = "@fuchsia_products_metadata//:product_bundles.json",
65*61c4878aSAndroid Build Coastguard Worker)
66*61c4878aSAndroid Build Coastguard Worker
67*61c4878aSAndroid Build Coastguard Workercipd_repository(
68*61c4878aSAndroid Build Coastguard Worker    name = "fuchsia_clang",
69*61c4878aSAndroid Build Coastguard Worker    path = "fuchsia/development/fuchsia_clang/linux-amd64",
70*61c4878aSAndroid Build Coastguard Worker    tag = "git_revision:aea60ab94db4729bad17daa86ccfc411d48a1699",
71*61c4878aSAndroid Build Coastguard Worker)
72*61c4878aSAndroid Build Coastguard Worker
73*61c4878aSAndroid Build Coastguard Worker# TODO: b/354268150 - googletest is in the BCR, but its MODULE.bazel doesn't
74*61c4878aSAndroid Build Coastguard Worker# express its dependency on the Fuchsia SDK correctly.
75*61c4878aSAndroid Build Coastguard Workergit_repository(
76*61c4878aSAndroid Build Coastguard Worker    name = "com_google_googletest",
77*61c4878aSAndroid Build Coastguard Worker    commit = "3b6d48e8d5c1d9b3f9f10ac030a94008bfaf032b",
78*61c4878aSAndroid Build Coastguard Worker    remote = "https://pigweed.googlesource.com/third_party/github/google/googletest",
79*61c4878aSAndroid Build Coastguard Worker)
80*61c4878aSAndroid Build Coastguard Worker
81*61c4878aSAndroid Build Coastguard Worker# Required by fuzztest
82*61c4878aSAndroid Build Coastguard Workerhttp_archive(
83*61c4878aSAndroid Build Coastguard Worker    name = "com_googlesource_code_re2",
84*61c4878aSAndroid Build Coastguard Worker    sha256 = "f89c61410a072e5cbcf8c27e3a778da7d6fd2f2b5b1445cd4f4508bee946ab0f",
85*61c4878aSAndroid Build Coastguard Worker    strip_prefix = "re2-2022-06-01",
86*61c4878aSAndroid Build Coastguard Worker    url = "https://github.com/google/re2/archive/refs/tags/2022-06-01.tar.gz",
87*61c4878aSAndroid Build Coastguard Worker)
88*61c4878aSAndroid Build Coastguard Worker
89*61c4878aSAndroid Build Coastguard Worker# Required by fuzztest
90*61c4878aSAndroid Build Coastguard Workerhttp_archive(
91*61c4878aSAndroid Build Coastguard Worker    name = "com_google_absl",
92*61c4878aSAndroid Build Coastguard Worker    sha256 = "338420448b140f0dfd1a1ea3c3ce71b3bc172071f24f4d9a57d59b45037da440",
93*61c4878aSAndroid Build Coastguard Worker    strip_prefix = "abseil-cpp-20240116.0",
94*61c4878aSAndroid Build Coastguard Worker    url = "https://github.com/abseil/abseil-cpp/releases/download/20240116.0/abseil-cpp-20240116.0.tar.gz",
95*61c4878aSAndroid Build Coastguard Worker)
96*61c4878aSAndroid Build Coastguard Worker
97*61c4878aSAndroid Build Coastguard Worker# TODO: https://pwbug.dev/365103864 - Fuzztest is not in the BCR yet (also see
98*61c4878aSAndroid Build Coastguard Worker# https://github.com/google/fuzztest/issues/950).
99*61c4878aSAndroid Build Coastguard Workerhttp_archive(
100*61c4878aSAndroid Build Coastguard Worker    name = "com_google_fuzztest",
101*61c4878aSAndroid Build Coastguard Worker    strip_prefix = "fuzztest-6eb010c7223a6aa609b94d49bfc06ac88f922961",
102*61c4878aSAndroid Build Coastguard Worker    url = "https://github.com/google/fuzztest/archive/6eb010c7223a6aa609b94d49bfc06ac88f922961.zip",
103*61c4878aSAndroid Build Coastguard Worker)
104