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
5 """An example WORKSPACE for configuring LLVM using a git submodule."""
7 workspace(name = "submodule_example")
9 SKYLIB_VERSION = "1.0.3"
11 load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
14 name = "bazel_skylib",
15 sha256 = "97e70364e9249702246c0e9444bccdc4b847bed1eb03c5a3ece4f83dfe6abc44",
17 "https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version = SKYLIB_VERSION),
18 "https://github.com/bazelbuild/bazel-skylib/releases/download/{version}/bazel-skylib-{version}.tar.gz".format(version = SKYLIB_VERSION),
24 build_file_content = "# empty",
25 # Or wherever your submodule is located.
26 path = "third_party/llvm-project",
29 load("@llvm-raw//utils/bazel:configure.bzl", "llvm_configure")
31 llvm_configure(name = "llvm-project")
33 load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
38 build_file = "@llvm-raw//utils/bazel/third_party_build:zlib-ng.BUILD",
39 sha256 = "e36bb346c00472a1f9ff2a0a4643e590a254be6379da7cddd9daeb9a7f296731",
40 strip_prefix = "zlib-ng-2.0.7",
42 "https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.0.7.zip",
49 build_file = "@llvm-raw//utils/bazel/third_party_build:zstd.BUILD",
50 sha256 = "7c42d56fac126929a6a85dbc73ff1db2411d04f104fae9bdea51305663a83fd0",
51 strip_prefix = "zstd-1.5.2",
53 "https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz",