blob: 061a0be4c5e95787827cccd4d37e51320400c036 [file] [log] [blame]
Matthew Riley03a01e32022-05-24 10:16:04 -07001# Part of the Crubit project, under the Apache License v2.0 with LLVM
2# Exceptions. See /LICENSE for license information.
3# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4
5# Provide LLVM with upstream's Bazel build support.
6#
7# refs:
8# https://github.com/llvm/llvm-project/blob/main/utils/bazel/examples/http_archive/WORKSPACE
9# https://github.com/llvm/llvm-project/releases/tag/llvmorg-14.0.0
10
11load("@llvm-raw//utils/bazel:configure.bzl", "llvm_configure", "llvm_disable_optional_support_deps")
12
13# Pass through to LLVM's Bazel configuration to create the repository.
14def llvm_repository(name):
15 if name != "llvm-project":
16 # this *must* be llvm-project, it's hardcoded in the Bazel build
17 # e.g. https://github.com/llvm/llvm-project/blob/aaddfbf9/utils/bazel/llvm-project-overlay/clang/BUILD.bazel#L1473
18 fail("""name must be llvm-project""")
19
20 llvm_configure(name = "llvm-project")
21 llvm_disable_optional_support_deps()