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 1414
1515package(default_visibility = ["//visibility:public"])
1616
17+ load("@bazel_skylib//rules:native_binary.bzl", "native_binary")
1718load("@rules_cc//cc:defs.bzl", "cc_toolchain", "cc_toolchain_suite")
1819load("%{ cc_toolchain_config_bzl} ", "cc_toolchain_config")
1920
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ aliased_libs = [
2020]
2121
2222aliased_tools = [
23+ "clang-apply-replacements" ,
2324 "clang-format" ,
25+ "clang-tidy" ,
2426 "llvm-cov" ,
2527]
Original file line number Diff line number Diff line change @@ -23,3 +23,16 @@ def bazel_toolchain_dependencies():
2323 strip_prefix = "rules_cc-726dd8157557f1456b3656e26ab21a1646653405" ,
2424 urls = ["https://github.com/bazelbuild/rules_cc/archive/726dd8157557f1456b3656e26ab21a1646653405.tar.gz" ],
2525 )
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(
511511 tool_target_strs = []
512512 for name in _aliased_tools :
513513 template = """
514- alias (
514+ native_binary (
515515 name = "{name}",
516- actual = "{{llvm_dist_label_prefix}}bin/{name}",
516+ out = "{name}",
517+ src = "{{llvm_dist_label_prefix}}bin/{name}",
517518)""" .format (name = name )
518519 tool_target_strs .append (template )
519520
You can’t perform that action at this time.
0 commit comments