[PATCH] D156654: [bazel] Update example workspace files with dependencies

Aiden Grossman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 31 01:42:36 PDT 2023


aidengrossman created this revision.
Herald added a project: All.
aidengrossman requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

Currently, the example workspace files do not work properly. The llvm_disable_optional_support_deps option was removed in 7b5d6cd <https://reviews.llvm.org/rG7b5d6cd7fcac2b9e06338f2497fed9039360924a> and zlib and zstd have been needed-by-default dependencies for a while, so it would make sense to show definitions in the example bazel workspace files, especially given the version sensitivity of the zlib-ng build. This patch removes the use of dated build config flags and adds dependency definitions to both of the example workspaces.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D156654

Files:
  utils/bazel/examples/http_archive/WORKSPACE
  utils/bazel/examples/submodule/WORKSPACE


Index: utils/bazel/examples/submodule/WORKSPACE
===================================================================
--- utils/bazel/examples/submodule/WORKSPACE
+++ utils/bazel/examples/submodule/WORKSPACE
@@ -24,6 +24,29 @@
     path = "third_party/llvm-project",
 )

-load("@llvm-raw//utils/bazel:configure.bzl", "llvm_configure", "llvm_disable_optional_support_deps")
+load("@llvm-raw//utils/bazel:configure.bzl", "llvm_configure")

 llvm_configure(name = "llvm-project")
+
+maybe(
+    http_archive,
+    name = "llvm_zlib",
+    build_file = "@llvm-raw//utils/bazel/third_party_build:zlib-ng.BUILD",
+    sha256 = "e36bb346c00472a1f9ff2a0a4643e590a254be6379da7cddd9daeb9a7f296731",
+    strip_prefix = "zlib-ng-2.0.7",
+    urls = [
+        "https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.0.7.zip",
+    ],
+)
+
+maybe(
+    http_archive,
+    name = "llvm_zstd",
+    build_file = "@llvm-raw//utils/bazel/third_party_build:zstd.BUILD",
+    sha256 = "7c42d56fac126929a6a85dbc73ff1db2411d04f104fae9bdea51305663a83fd0",
+    strip_prefix = "zstd-1.5.2",
+    urls = [
+        "https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz"
+    ],
+)
+
Index: utils/bazel/examples/http_archive/WORKSPACE
===================================================================
--- utils/bazel/examples/http_archive/WORKSPACE
+++ utils/bazel/examples/http_archive/WORKSPACE
@@ -35,6 +35,29 @@
     urls = ["https://github.com/llvm/llvm-project/archive/{commit}.tar.gz".format(commit = LLVM_COMMIT)],
 )

-load("@llvm-raw//utils/bazel:configure.bzl", "llvm_configure", "llvm_disable_optional_support_deps")
+load("@llvm-raw//utils/bazel:configure.bzl", "llvm_configure")

 llvm_configure(name = "llvm-project")
+
+maybe(
+    http_archive,
+    name = "llvm_zlib",
+    build_file = "@llvm-raw//utils/bazel/third_party_build:zlib-ng.BUILD",
+    sha256 = "e36bb346c00472a1f9ff2a0a4643e590a254be6379da7cddd9daeb9a7f296731",
+    strip_prefix = "zlib-ng-2.0.7",
+    urls = [
+        "https://github.com/zlib-ng/zlib-ng/archive/refs/tags/2.0.7.zip",
+    ],
+)
+
+maybe(
+    http_archive,
+    name = "llvm_zstd",
+    build_file = "@llvm-raw//utils/bazel/third_party_build:zstd.BUILD",
+    sha256 = "7c42d56fac126929a6a85dbc73ff1db2411d04f104fae9bdea51305663a83fd0",
+    strip_prefix = "zstd-1.5.2",
+    urls = [
+        "https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-1.5.2.tar.gz"
+    ],
+)
+


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D156654.545538.patch
Type: text/x-patch
Size: 2438 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230731/b60386f3/attachment.bin>


More information about the llvm-commits mailing list