File tree Expand file tree Collapse file tree 4 files changed +19
-2
lines changed Expand file tree Collapse file tree 4 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 14
14
15
15
package(default_visibility = ["//visibility:public"])
16
16
17
+ load("@bazel_skylib//rules:native_binary.bzl", "native_binary")
17
18
load("@rules_cc//cc:defs.bzl", "cc_toolchain", "cc_toolchain_suite")
18
19
load("%{ cc_toolchain_config_bzl} ", "cc_toolchain_config")
19
20
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ aliased_libs = [
20
20
]
21
21
22
22
aliased_tools = [
23
+ "clang-apply-replacements" ,
23
24
"clang-format" ,
25
+ "clang-tidy" ,
24
26
"llvm-cov" ,
25
27
]
Original file line number Diff line number Diff line change @@ -23,3 +23,16 @@ def bazel_toolchain_dependencies():
23
23
strip_prefix = "rules_cc-726dd8157557f1456b3656e26ab21a1646653405" ,
24
24
urls = ["https://github.com/bazelbuild/rules_cc/archive/726dd8157557f1456b3656e26ab21a1646653405.tar.gz" ],
25
25
)
26
+
27
+ # Load bazel_skylib if the user has not defined them.
28
+ if not native .existing_rule ("bazel_skylib" ):
29
+ http_archive (
30
+ name = "bazel_skylib" ,
31
+ urls = [
32
+ "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz" ,
33
+ "https://github.com/bazelbuild/bazel-skylib/releases/download/1.3.0/bazel-skylib-1.3.0.tar.gz" ,
34
+ ],
35
+ sha256 = "74d544d96f4a5bb630d465ca8bbcfe231e3594e5aae57e1edbf17a6eb3ca2506" ,
36
+ )
37
+
38
+ # Skip bazel_skylib_workspace because we are not using lib/unittest.bzl
Original file line number Diff line number Diff line change @@ -511,9 +511,10 @@ cc_import(
511
511
tool_target_strs = []
512
512
for name in _aliased_tools :
513
513
template = """
514
- alias (
514
+ native_binary (
515
515
name = "{name}",
516
- actual = "{{llvm_dist_label_prefix}}bin/{name}",
516
+ out = "{name}",
517
+ src = "{{llvm_dist_label_prefix}}bin/{name}",
517
518
)""" .format (name = name )
518
519
tool_target_strs .append (template )
519
520
You can’t perform that action at this time.
0 commit comments