1# This file is licensed under the Apache License v2.0 with LLVM Exceptions.
2# See https://llvm.org/LICENSE.txt for license information.
3# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
4
5"""An example WORKSPACE for configuring LLVM using a git submodule."""
6
7workspace(name = "submodule_example")
8
9# Or wherever your submodule is located.
10SUBMODULE_PATH = "third_party/llvm-project"
11
12local_repository(
13    name = "llvm-bazel",
14    path = SUBMODULE_PATH + "/utils/bazel",
15)
16
17llvm_configure(
18    name = "llvm-project",
19    src_path = SUBMODULE_PATH,
20    src_workspace = "@submodule_example//:WORKSPACE",
21)
22
23# Disables optional dependencies for Support like zlib and terminfo. You may
24# instead want to configure them using the macros in the corresponding bzl
25# files.
26llvm_disable_optional_support_deps()
27