83cee23c98
buildifier --lint=fix -r . Change-Id: I6a41858270d20137978f8271c8f6160b51120777 Bug: skia:12541 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/529751 Reviewed-by: Ben Wagner <bungeman@google.com>
53 lines
1.6 KiB
Python
53 lines
1.6 KiB
Python
load("@rules_cc//cc:defs.bzl", "cc_toolchain", "cc_toolchain_suite")
|
|
load(":linux_amd64_toolchain_config.bzl", "provide_linux_amd64_toolchain_config")
|
|
|
|
licenses(["notice"])
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
# https://bazel.build/reference/be/c-cpp#cc_toolchain_suite
|
|
cc_toolchain_suite(
|
|
name = "clang_suite",
|
|
toolchains = {
|
|
# The key is target_cpu|compiler
|
|
# compiler appears to be a string we can choose arbitrarily
|
|
# https://bazel.build/reference/command-line-reference?hl=en#flag--compiler
|
|
"k8|host_is_linux_amd64": ":linux_amd64_host",
|
|
"x86_64|host_is_linux_amd64": ":linux_amd64_host",
|
|
"k8": ":linux_amd64_host",
|
|
# TODO(jmbetancourt)
|
|
# "arm64|host_is_mac_M1": ":mac_M1_host",
|
|
},
|
|
)
|
|
|
|
filegroup(name = "not_implemented")
|
|
|
|
filegroup(
|
|
name = "all_linux_amd64_files",
|
|
srcs = [
|
|
"IWYU_mapping.imp",
|
|
"ar_trampoline.sh",
|
|
"clang_trampoline.sh",
|
|
"lld_trampoline.sh",
|
|
"@clang_linux_amd64//:all_files",
|
|
],
|
|
)
|
|
|
|
provide_linux_amd64_toolchain_config(
|
|
name = "linux_amd64_toolchain_config",
|
|
)
|
|
|
|
# https://bazel.build/reference/be/c-cpp#cc_toolchain
|
|
cc_toolchain(
|
|
name = "linux_amd64_host",
|
|
all_files = ":all_linux_amd64_files",
|
|
ar_files = ":all_linux_amd64_files",
|
|
compiler_files = ":all_linux_amd64_files",
|
|
dwp_files = ":not_implemented",
|
|
linker_files = ":all_linux_amd64_files",
|
|
objcopy_files = ":not_implemented",
|
|
strip_files = ":not_implemented",
|
|
supports_param_files = False,
|
|
toolchain_config = ":linux_amd64_toolchain_config",
|
|
)
|