Taylor Cramer | 3d45cca | 2024-08-08 16:28:36 +0000 | [diff] [blame] | 1 | # Copyright 2024 The Pigweed Authors |
Ted Pudlik | c108b6e | 2023-10-11 23:46:56 +0000 | [diff] [blame] | 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 Pudlik | c108b6e | 2023-10-11 23:46:56 +0000 | [diff] [blame] | 14 | |
Taylor Cramer | 3d45cca | 2024-08-08 16:28:36 +0000 | [diff] [blame] | 15 | load("@bazel_skylib//rules:copy_file.bzl", "copy_file") |
| 16 | load("@hedron_compile_commands//:refresh_compile_commands.bzl", "refresh_compile_commands") |
| 17 | load("@pigweed//pw_build:compatibility.bzl", "incompatible_with_mcu") |
| 18 | |
| 19 | package(default_visibility = ["//visibility:public"]) |
| 20 | |
| 21 | copy_file( |
| 22 | name = "copy_clangd", |
| 23 | src = "@pigweed//pw_toolchain/host_clang:clangd", |
| 24 | out = "clangd", |
| 25 | allow_symlink = True, |
| 26 | ) |
| 27 | |
| 28 | refresh_compile_commands( |
| 29 | name = "refresh_compile_commands", |
| 30 | out_dir = ".compile_commands", |
| 31 | target_compatible_with = incompatible_with_mcu(), |
| 32 | target_groups = { |
| 33 | "host_simulator": [ |
| 34 | "//apps/blinky:simulator_blinky", |
| 35 | "//modules/blinky:blinky_test", |
| 36 | ], |
| 37 | "rp2040": [ |
| 38 | "//apps/blinky:rp2040_blinky.elf", |
| 39 | [ |
| 40 | "//modules/blinky:blinky_test", |
| 41 | "--config=rp2040", |
| 42 | ], |
| 43 | ], |
| 44 | }, |
| 45 | ) |
| 46 | |
| 47 | filegroup( |
| 48 | name = "pw_console_config", |
| 49 | srcs = [ |
| 50 | ".pw_console.yaml", |
| 51 | ], |
Ted Pudlik | c108b6e | 2023-10-11 23:46:56 +0000 | [diff] [blame] | 52 | ) |