| # Copyright 2021 The Bazel Authors. |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| package(default_visibility = ["//visibility:public"]) |
| |
| # Some targets may need to directly depend on these files. |
| exports_files(glob([ |
| "bin/*", |
| "lib/*", |
| ])) |
| |
| ## LLVM toolchain files |
| |
| filegroup( |
| name = "clang", |
| srcs = [ |
| "bin/clang", |
| "bin/clang++", |
| "bin/clang-cpp", |
| ], |
| ) |
| |
| filegroup( |
| name = "ld", |
| srcs = [ |
| "bin/ld.lld", |
| ], |
| ) |
| |
| filegroup( |
| name = "include", |
| srcs = glob([ |
| "include/c++/**", |
| "lib/clang/*/include/**", |
| ]), |
| ) |
| |
| filegroup( |
| name = "bin", |
| srcs = glob(["bin/**"]), |
| ) |
| |
| filegroup( |
| name = "lib", |
| srcs = glob( |
| [ |
| "lib/lib*.a", |
| "lib/clang/*/lib/**/*.a", |
| ], |
| exclude = [ |
| "lib/libLLVM*.a", |
| "lib/libclang*.a", |
| "lib/liblld*.a", |
| ], |
| ) + glob( |
| [ |
| "lib/lib*.dylib", |
| "lib/clang/*/lib/**/*.dylib", |
| ], |
| allow_empty = True, |
| ), |
| ) |
| |
| filegroup( |
| name = "ar", |
| srcs = ["bin/llvm-ar"], |
| ) |
| |
| filegroup( |
| name = "as", |
| srcs = [ |
| "bin/clang", |
| "bin/llvm-as", |
| ], |
| ) |
| |
| filegroup( |
| name = "nm", |
| srcs = ["bin/llvm-nm"], |
| ) |
| |
| filegroup( |
| name = "objcopy", |
| srcs = ["bin/llvm-objcopy"], |
| ) |
| |
| filegroup( |
| name = "objdump", |
| srcs = ["bin/llvm-objdump"], |
| ) |
| |
| filegroup( |
| name = "profdata", |
| srcs = ["bin/llvm-profdata"], |
| ) |
| |
| filegroup( |
| name = "dwp", |
| srcs = ["bin/llvm-dwp"], |
| ) |
| |
| filegroup( |
| name = "ranlib", |
| srcs = ["bin/llvm-ranlib"], |
| ) |
| |
| filegroup( |
| name = "readelf", |
| srcs = ["bin/llvm-readelf"], |
| ) |
| |
| filegroup( |
| name = "strip", |
| srcs = ["bin/llvm-strip"], |
| ) |