| # Copyright 2022 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| """BUILD.bazel file for @prebuilt_clang repository.""" |
| |
| load( |
| "@//build/bazel/toolchains/clang:toolchains.bzl", |
| "define_fuchsia_platform_prebuilt_clang_cc_toolchains", |
| "define_host_prebuilt_clang_cc_toolchains", |
| ) |
| load("@fuchsia_build_config//:defs.bzl", "build_config") |
| load( |
| "@rules_fuchsia//common:toolchains/clang/clang_utils_test.bzl", |
| "include_clang_utils_test_suite", |
| ) |
| load( |
| "@rules_fuchsia//common:toolchains/clang/repository_utils.bzl", |
| "setup_clang_repository", |
| ) |
| load(":generated_constants.bzl", "constants") |
| |
| package(default_visibility = ["//visibility:public"]) |
| |
| exports_files( |
| glob( |
| include = ["**/*"], |
| # The MacOS SDK contains files that include colons which confuse Bazel, |
| # which will error, complaining about an invalid label, e.g. |
| # xcode/MacSDK/usr/share/man/mann/ttk::combobox.ntcl |
| exclude = ["xcode/**"], |
| ), |
| ) |
| |
| setup_clang_repository(constants) |
| |
| define_host_prebuilt_clang_cc_toolchains("host_clang", build_config.host_os, build_config.host_arch) |
| |
| define_fuchsia_platform_prebuilt_clang_cc_toolchains("fuchsia_platform_clang", build_config.host_os, build_config.host_arch) |
| |
| include_clang_utils_test_suite( |
| name = "test_suite", |
| ) |