blob: 1a6015c5363baad7208dc5b86137f5211fc727f9 [file] [log] [blame]
Rob Mohrbe98ead2019-11-14 07:16:40 -08001# Copyright 2019 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.
Ted Pudlik3bf584b2024-07-29 23:56:48 +000014load("@bazel_skylib//rules:copy_file.bzl", "copy_file")
Chad Norvell6b20a022024-09-20 23:22:30 +000015load("@hedron_compile_commands//:refresh_compile_commands.bzl", "refresh_compile_commands")
Kayce Basquesc15953e2024-12-09 21:01:01 +000016load("@pigweed//pw_build:compatibility.bzl", "incompatible_with_mcu")
17load("@rules_python//sphinxdocs:sphinx_docs_library.bzl", "sphinx_docs_library")
Rob Mohrbe98ead2019-11-14 07:16:40 -080018
Rob Mohr5fc25412021-06-23 09:35:23 -070019licenses(["notice"])
Nathaniel Brougha1113be2021-03-07 09:05:41 +080020
Darren Chanc3dfc392024-04-03 21:10:08 +000021# Needed for releasing //pw_bluetooth_sapphire/fuchsia/bt_host.
22exports_files(
23 ["LICENSE"],
24 visibility = [":__subpackages__"],
25)
26
Nathaniel Brougha1113be2021-03-07 09:05:41 +080027exports_files(
Ted Pudlik44c6eb52024-05-15 22:43:30 +000028 [
29 "pigweed.json",
Kayce Basques819e7582024-10-05 01:07:49 +000030 "PIGWEED_MODULES",
Ted Pudlik44c6eb52024-05-15 22:43:30 +000031 "tsconfig.json",
32 ],
Ted Pudlik64110f52022-01-14 21:09:44 +000033 visibility = [":__subpackages__"],
Nathaniel Brougha1113be2021-03-07 09:05:41 +080034)
Ted Pudlik3bf584b2024-07-29 23:56:48 +000035
36# Symlink to clangd, for user convenience.
37copy_file(
38 name = "copy_clangd",
39 src = "@llvm_toolchain//:bin/clangd",
40 out = "clangd",
41 allow_symlink = True,
42)
Chad Norvell6b20a022024-09-20 23:22:30 +000043
44# The Fuchsia SDK is only supported on Linux hosts, so the target that
45# generates compile commands for targets built for Fuchsia is separate from
46# the more general-purpose `refresh_compile_commands` target.
47refresh_compile_commands(
48 name = "refresh_compile_commands_for_fuchsia_sdk",
49 out_dir = ".compile_commands",
50 target_compatible_with = select({
51 "@platforms//os:linux": [],
52 "//conditions:default": ["@platforms//:incompatible"],
53 }),
54 target_groups = {
55 "fuchsia": [
56 [
57 "//pw_bluetooth_sapphire/fuchsia/bt_host:pkg.arm64",
58 "--config=fuchsia",
59 ],
60 ],
61 },
62)
Kayce Basquesc15953e2024-12-09 21:01:01 +000063
64sphinx_docs_library(
65 name = "docs",
66 srcs = [
67 "Kconfig.zephyr",
68 ],
69 target_compatible_with = incompatible_with_mcu(),
70 visibility = ["//visibility:public"],
71)