Matthew Riley | 03a01e3 | 2022-05-24 10:16:04 -0700 | [diff] [blame] | 1 | # 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 | |
| 11 | load("@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. |
| 14 | def 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() |