16 Commits

Author SHA1 Message Date
Jordan Rupprecht
d82d502ae5
[bazel] Port #149148 (#150435) 2025-07-24 09:58:34 -05:00
Benjamin Kramer
e89cd500b2 [bazel] Port 7a4cb9bac50c8c19ec0d4ab7f186ef086064a549 2025-02-24 17:43:42 +01:00
Haojian Wu
91c5de7fb8 [bazel] Fix the broken bazel build for clang-tidy after e45e091b90896023584b303539bd8ae16d8932b3 2024-12-30 09:05:21 +01:00
Pranav Kant
5d81b14900 [clang-tidy][bazel] Fix #120547 2024-12-25 06:14:04 +00:00
Keith Smiley
61f8a7f618
[bazel] Port 4f0ad8d80a04faabc715d355744ba887c74e37f1 (#111034) 2024-10-03 11:00:15 -07:00
Haojian Wu
1738cc61c3 [bazel] Port for 1038db6f02289e128c498769091718dd0e6e6fea 2024-07-08 21:24:32 +02:00
Dmitri Gribenko
684ca6a25a [bazel] Format defs.bzl 2024-03-25 13:35:36 +01:00
Keith Smiley
72c729f354
[bazel] Add support for --incompatible_disallow_empty_glob (#85999)
This bazel flag, that should be flipped in an upcoming release
https://github.com/bazelbuild/bazel/pull/15327, fails if globs have no
matches. This helps find libraries where you are accidentally not
including files because of typos. This change removes the various globs
that were not matching anything, and uncovered some targets that were
doing nothing because their source files were deleted. There are a few
cases where globs were intentionally optional in the case of loops that
expanded to different potential options, so those now use `allow_empty =
True`. This allows downstream consumers to also flip this flags for
their own builds, where previously this would fail in LLVM instead.

The downside to this change is that if files are added in these
relatively standard locations, manual work will have to be done to add
this patterns back. If folks prefer we could instead add `allow_empty =
True` to every glob.
2024-03-22 09:51:20 -07:00
denglesberg-splunk
3b54337be5
Replace exec_tools with tools in bazel genrule. (#77510)
As of the Bazel 6.x series, there is no difference between the
`exec_tools` and `tools`. Bazel 7 removes the `exec_tools` attribute
entirely. This commit updates to use the cannonical attribute name to
allow building `clang-tidy``with bazel 7.0.0, though it does not change
the default bazel version which remains at 6.1.2.

See also https://github.com/bazelbuild/bazel/issues/19132 for more
information.
2024-01-19 09:12:54 +01:00
Adrian Kuegel
1040750193 [clang][Bazel] Add missing dependency after a563ced78bb4bda31babb85e88a89b49ffd61a90 2023-08-11 09:35:33 +02:00
Pranav Kant
53e3380786 [Bazel] Fix build 2023-06-13 22:44:11 +00:00
Haojian Wu
c5564a0075 [bazel] Add include-cleaner targets, fix clang-tidy build for c28506ba4b6961950849f8fdecd0cf7e503a14f9 2023-06-02 19:38:08 +02:00
Aaron Siddhartha Mondal
68697ac274
[bazel] Fix missing deps for layering check
Reviewed By: #bazel_build, stellaraccident

Differential Revision: https://reviews.llvm.org/D150058
2023-05-07 05:56:59 +02:00
Aaron Siddhartha Mondal
004c76155c [bazel] Don't alwayslink clang-tidy libraries
These libraries are only ever used in clang-tidy itself, so there is no
need to unconditionally keep all symbols.

Reviewed By: GMNGeoffrey, #bazel_build

Differential Revision: https://reviews.llvm.org/D145258
2023-03-09 08:45:08 +01:00
Guillaume Chatelet
7a282bd2aa [bazel] Fix missing dependency in clang-tools-extra/clang-tidy:llvmlibc 2023-02-15 13:54:45 +00:00
Jathu Satkunarajah
f702822371 [bazel] create a clang-tidy binary target
Create a binary target for clang-tidy. Tested by running:

```
$ bazel build --config=generic_clang @llvm-project//clang-tools-extra/...
$ bazel test --config=generic_clang @llvm-project//clang-tools-extra/...
$ bazel run --config=generic_clang @llvm-project//clang-tools-extra/clang-tidy -- --help
```

Reviewed By: #bazel_build, aaronmondal

Differential Revision: https://reviews.llvm.org/D143804
2023-02-15 13:56:06 +01:00