From a49686cb129113924c36a8c79e4193b8a3d533c7 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Fri, 21 Nov 2025 21:29:35 -0800 Subject: [PATCH 1/9] [bazel] Use zstd from the BCR This way if the downstream consuming project uses zstd we make sure they are dedup'd. --- utils/bazel/MODULE.bazel | 3 +- utils/bazel/MODULE.bazel.lock | 17 ++---- utils/bazel/extensions.bzl | 10 ---- .../llvm-project-overlay/lld/BUILD.bazel | 2 +- .../llvm-project-overlay/llvm/BUILD.bazel | 2 +- .../third-party/BUILD.bazel | 40 ++++++++++++++ utils/bazel/third_party_build/zstd.BUILD | 54 ------------------- 7 files changed, 48 insertions(+), 80 deletions(-) create mode 100644 utils/bazel/llvm-project-overlay/third-party/BUILD.bazel delete mode 100644 utils/bazel/third_party_build/zstd.BUILD diff --git a/utils/bazel/MODULE.bazel b/utils/bazel/MODULE.bazel index 1a8327c33d246..bd398deda7a9e 100644 --- a/utils/bazel/MODULE.bazel +++ b/utils/bazel/MODULE.bazel @@ -22,7 +22,6 @@ use_repo( "gmp", "llvm-raw", "llvm_zlib", - "llvm_zstd", "mpc", "mpfr", "nanobind", @@ -34,6 +33,8 @@ use_repo( "vulkan_sdk", ) +bazel_dep(name = "zstd", version = "1.5.7", repo_name = "llvm_zstd") + llvm_configure = use_repo_rule("@llvm-raw//utils/bazel:configure.bzl", "llvm_configure") llvm_configure(name = "llvm-project") diff --git a/utils/bazel/MODULE.bazel.lock b/utils/bazel/MODULE.bazel.lock index 3b196231c6723..c923f3aaea68d 100644 --- a/utils/bazel/MODULE.bazel.lock +++ b/utils/bazel/MODULE.bazel.lock @@ -224,13 +224,15 @@ "https://bcr.bazel.build/modules/zlib/1.2.12/MODULE.bazel": "3b1a8834ada2a883674be8cbd36ede1b6ec481477ada359cd2d3ddc562340b27", "https://bcr.bazel.build/modules/zlib/1.3.1.bcr.5/MODULE.bazel": "eec517b5bbe5492629466e11dae908d043364302283de25581e3eb944326c4ca", "https://bcr.bazel.build/modules/zlib/1.3.1.bcr.5/source.json": "22bc55c47af97246cfc093d0acf683a7869377de362b5d1c552c2c2e16b7a806", - "https://bcr.bazel.build/modules/zlib/1.3.1/MODULE.bazel": "751c9940dcfe869f5f7274e1295422a34623555916eb98c174c1e945594bf198" + "https://bcr.bazel.build/modules/zlib/1.3.1/MODULE.bazel": "751c9940dcfe869f5f7274e1295422a34623555916eb98c174c1e945594bf198", + "https://bcr.bazel.build/modules/zstd/1.5.7/MODULE.bazel": "f5780cdbd6f4c5bb985a20f839844316fe48fb5e463056f372dbc37cfabdf450", + "https://bcr.bazel.build/modules/zstd/1.5.7/source.json": "f72c48184b6528ffc908a5a2bcbf3070c6684f3db03da2182c8ca999ae5f5cfd" }, "selectedYankedVersions": {}, "moduleExtensions": { "//:extensions.bzl%llvm_repos_extension": { "general": { - "bzlTransitiveDigest": "ojj7cD2YU2vcH58jVPVj2juUYn5SvdSNj1pmWb8Xo/k=", + "bzlTransitiveDigest": "05R8ZuqDbhn1LOyXHQzta+x0dI9dEY6RIu21atUo+Kw=", "usagesDigest": "X0yUkkWyxQ2Y5oZVDkRSE/K4YkDWo1IjhHsL+1weKyU=", "recordedFileInputs": {}, "recordedDirentsInputs": {}, @@ -314,17 +316,6 @@ "build_file": "@@+llvm_repos_extension+llvm-raw//utils/bazel/third_party_build:pfm.BUILD" } }, - "llvm_zstd": { - "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", - "attributes": { - "build_file": "@@+llvm_repos_extension+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" - ] - } - }, "pybind11": { "repoRuleId": "@@bazel_tools//tools/build_defs/repo:http.bzl%http_archive", "attributes": { diff --git a/utils/bazel/extensions.bzl b/utils/bazel/extensions.bzl index bb5ce1955f916..e57046530aa89 100644 --- a/utils/bazel/extensions.bzl +++ b/utils/bazel/extensions.bzl @@ -79,16 +79,6 @@ def _llvm_repos_extension_impl(module_ctx): build_file = "@llvm-raw//utils/bazel/third_party_build:pfm.BUILD", ) - 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", - ], - ) - http_archive( name = "pybind11", url = "https://github.com/pybind/pybind11/archive/v2.10.3.zip", diff --git a/utils/bazel/llvm-project-overlay/lld/BUILD.bazel b/utils/bazel/llvm-project-overlay/lld/BUILD.bazel index 162c4f955d150..b903aef10692b 100644 --- a/utils/bazel/llvm-project-overlay/lld/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/lld/BUILD.bazel @@ -105,8 +105,8 @@ cc_library( "//llvm:TargetParser", "//llvm:TransformUtils", "//llvm:config", + "//third_party:zstd", "@llvm_zlib//:zlib", - "@llvm_zstd//:zstd", ], ) diff --git a/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel b/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel index f67e4ea29b51f..b59e6ea973f14 100644 --- a/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/llvm/BUILD.bazel @@ -331,7 +331,7 @@ cc_library( # We unconditionally depend on the custom LLVM zstd wrapper. This will # be an empty library unless zstd is enabled, in which case it will # both provide the necessary dependencies and configuration defines. - "@llvm_zstd//:zstd", + "//third-party:zstd", ], ) diff --git a/utils/bazel/llvm-project-overlay/third-party/BUILD.bazel b/utils/bazel/llvm-project-overlay/third-party/BUILD.bazel new file mode 100644 index 0000000000000..cf7a91fca160f --- /dev/null +++ b/utils/bazel/llvm-project-overlay/third-party/BUILD.bazel @@ -0,0 +1,40 @@ +# This file is licensed under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +load("@bazel_skylib//rules:common_settings.bzl", "bool_flag") +load("@rules_cc//cc:defs.bzl", "cc_library") + +cc_library(name = "empty_lib") + +bool_flag( + name = "llvm_enable_zstd", + build_setting_default = True, +) + +config_setting( + name = "llvm_zstd_enabled", + flag_values = {":llvm_enable_zstd": "true"}, +) + +cc_library( + name = "zstd_wrapper", + defines = select({ + ":llvm_zstd_enabled": [ + "LLVM_ENABLE_ZSTD=1", + "ZSTD_MULTITHREAD", + ], + "//conditions:default": [], + }), + deps = [ + "@llvm_zstd//:zstd", + ], +) + +alias( + name = "zstd", + actual = select({ + ":llvm_zstd_enabled": ":zstd_wrapper", + "//conditions:default": ":empty_lib", + }), + visibility = ["//visibility:public"], +) diff --git a/utils/bazel/third_party_build/zstd.BUILD b/utils/bazel/third_party_build/zstd.BUILD deleted file mode 100644 index 7d022d4226de1..0000000000000 --- a/utils/bazel/third_party_build/zstd.BUILD +++ /dev/null @@ -1,54 +0,0 @@ -# This file is licensed under the Apache License v2.0 with LLVM Exceptions. -# See https://llvm.org/LICENSE.txt for license information. -# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -load("@bazel_skylib//rules:common_settings.bzl", "bool_flag") - -package( - default_visibility = ["//visibility:public"], - # BSD/MIT-like license (for zstd) - licenses = ["notice"], -) - -bool_flag( - name = "llvm_enable_zstd", - build_setting_default = True, -) - -config_setting( - name = "llvm_zstd_enabled", - flag_values = {":llvm_enable_zstd": "true"}, -) - -cc_library( - name = "zstd", - srcs = select({ - ":llvm_zstd_enabled": glob([ - "lib/common/*.c", - "lib/common/*.h", - "lib/compress/*.c", - "lib/compress/*.h", - "lib/decompress/*.c", - "lib/decompress/*.h", - "lib/decompress/*.S", - "lib/dictBuilder/*.c", - "lib/dictBuilder/*.h", - ]), - "//conditions:default": [], - }), - hdrs = select({ - ":llvm_zstd_enabled": [ - "lib/zdict.h", - "lib/zstd.h", - "lib/zstd_errors.h", - ], - "//conditions:default": [], - }), - defines = select({ - ":llvm_zstd_enabled": [ - "LLVM_ENABLE_ZSTD=1", - "ZSTD_MULTITHREAD", - ], - "//conditions:default": [], - }), - strip_include_prefix = "lib", -) From 1bc54ad59ec7429afb973e96b15e7812c6608159 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Fri, 21 Nov 2025 22:24:59 -0800 Subject: [PATCH 2/9] Add cc_library_wrapper --- .../third-party/BUILD.bazel | 22 ++++----- .../third-party/cc_library_wrapper.bzl | 47 +++++++++++++++++++ 2 files changed, 56 insertions(+), 13 deletions(-) create mode 100644 utils/bazel/llvm-project-overlay/third-party/cc_library_wrapper.bzl diff --git a/utils/bazel/llvm-project-overlay/third-party/BUILD.bazel b/utils/bazel/llvm-project-overlay/third-party/BUILD.bazel index cf7a91fca160f..6ad5c71bc1ef9 100644 --- a/utils/bazel/llvm-project-overlay/third-party/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/third-party/BUILD.bazel @@ -3,6 +3,7 @@ # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception load("@bazel_skylib//rules:common_settings.bzl", "bool_flag") load("@rules_cc//cc:defs.bzl", "cc_library") +load(":cc_library_wrapper.bzl", "cc_library_wrapper") cc_library(name = "empty_lib") @@ -16,8 +17,8 @@ config_setting( flag_values = {":llvm_enable_zstd": "true"}, ) -cc_library( - name = "zstd_wrapper", +cc_library_wrapper( + name = "zstd", defines = select({ ":llvm_zstd_enabled": [ "LLVM_ENABLE_ZSTD=1", @@ -25,16 +26,11 @@ cc_library( ], "//conditions:default": [], }), - deps = [ - "@llvm_zstd//:zstd", - ], -) - -alias( - name = "zstd", - actual = select({ - ":llvm_zstd_enabled": ":zstd_wrapper", - "//conditions:default": ":empty_lib", - }), visibility = ["//visibility:public"], + deps = select({ + ":llvm_zstd_enabled": [ + "@llvm_zstd//:zstd", + ], + "//conditions:default": [], + }), ) diff --git a/utils/bazel/llvm-project-overlay/third-party/cc_library_wrapper.bzl b/utils/bazel/llvm-project-overlay/third-party/cc_library_wrapper.bzl new file mode 100644 index 0000000000000..4608bc84c8d9c --- /dev/null +++ b/utils/bazel/llvm-project-overlay/third-party/cc_library_wrapper.bzl @@ -0,0 +1,47 @@ +# This file is licensed under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception + +"""Re-export a cc_library with added LLVM specific settings. + +This re-exports the dependent libraries in a way that satisfies layering_check + +cc_library_wrapper( + name = "library_wrapper", + deps = [ + "@example//:library", + ], + defines = [ + "LLVM_ENABLE_EXAMPLE=1", + ], +) +""" + +load("@rules_cc//cc/common:cc_common.bzl", "cc_common") +load("@rules_cc//cc/common:cc_info.bzl", "CcInfo") + +def _cc_library_wrapper_impl(ctx): + all_cc_infos = [dep[CcInfo] for dep in ctx.attr.deps] + if ctx.attr.defines: + all_cc_infos.append(CcInfo( + compilation_context = cc_common.create_compilation_context( + defines = depset(ctx.attr.defines), + ), + )) + + return cc_common.merge_cc_infos(direct_cc_infos = all_cc_infos) + +cc_library_wrapper = rule( + implementation = _cc_library_wrapper_impl, + attrs = { + "deps": attr.label_list( + doc = "Dependencies to cc_library targets to re-export.", + providers = [CcInfo], + ), + "defines": attr.string_list( + doc = "Additional preprocessor definitions to add to all dependent targets.", + default = [], + ), + }, + doc = "Re-export a cc_library with added LLVM specific settings.", +) From c982f5160eb72f062bb8434a3fb914ac2a222a7d Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Fri, 21 Nov 2025 22:26:14 -0800 Subject: [PATCH 3/9] remove empty_lib --- utils/bazel/llvm-project-overlay/third-party/BUILD.bazel | 3 --- 1 file changed, 3 deletions(-) diff --git a/utils/bazel/llvm-project-overlay/third-party/BUILD.bazel b/utils/bazel/llvm-project-overlay/third-party/BUILD.bazel index 6ad5c71bc1ef9..b53afbc30f560 100644 --- a/utils/bazel/llvm-project-overlay/third-party/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/third-party/BUILD.bazel @@ -2,11 +2,8 @@ # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception load("@bazel_skylib//rules:common_settings.bzl", "bool_flag") -load("@rules_cc//cc:defs.bzl", "cc_library") load(":cc_library_wrapper.bzl", "cc_library_wrapper") -cc_library(name = "empty_lib") - bool_flag( name = "llvm_enable_zstd", build_setting_default = True, From f38b55df928457b251e654bc3746ca52ad8fde9e Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Fri, 21 Nov 2025 22:27:45 -0800 Subject: [PATCH 4/9] set visibility --- .../llvm-project-overlay/third-party/cc_library_wrapper.bzl | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/bazel/llvm-project-overlay/third-party/cc_library_wrapper.bzl b/utils/bazel/llvm-project-overlay/third-party/cc_library_wrapper.bzl index 4608bc84c8d9c..a7c4eb0b2bc53 100644 --- a/utils/bazel/llvm-project-overlay/third-party/cc_library_wrapper.bzl +++ b/utils/bazel/llvm-project-overlay/third-party/cc_library_wrapper.bzl @@ -20,6 +20,8 @@ cc_library_wrapper( load("@rules_cc//cc/common:cc_common.bzl", "cc_common") load("@rules_cc//cc/common:cc_info.bzl", "CcInfo") +visibility("private") + def _cc_library_wrapper_impl(ctx): all_cc_infos = [dep[CcInfo] for dep in ctx.attr.deps] if ctx.attr.defines: From 7c727917975295a5e47cf588e7609acc90b7a844 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Sat, 22 Nov 2025 12:05:06 -0800 Subject: [PATCH 5/9] label typo --- utils/bazel/llvm-project-overlay/lld/BUILD.bazel | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/bazel/llvm-project-overlay/lld/BUILD.bazel b/utils/bazel/llvm-project-overlay/lld/BUILD.bazel index b903aef10692b..8a03266da6327 100644 --- a/utils/bazel/llvm-project-overlay/lld/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/lld/BUILD.bazel @@ -105,7 +105,7 @@ cc_library( "//llvm:TargetParser", "//llvm:TransformUtils", "//llvm:config", - "//third_party:zstd", + "//third-party:zstd", "@llvm_zlib//:zlib", ], ) From 5c600579c8a399c439eb72134b1bb43faabb8109 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Sat, 22 Nov 2025 13:08:51 -0800 Subject: [PATCH 6/9] Advertise CcInfo for cc_shared_library --- .../llvm-project-overlay/third-party/cc_library_wrapper.bzl | 1 + 1 file changed, 1 insertion(+) diff --git a/utils/bazel/llvm-project-overlay/third-party/cc_library_wrapper.bzl b/utils/bazel/llvm-project-overlay/third-party/cc_library_wrapper.bzl index a7c4eb0b2bc53..b484a611571e3 100644 --- a/utils/bazel/llvm-project-overlay/third-party/cc_library_wrapper.bzl +++ b/utils/bazel/llvm-project-overlay/third-party/cc_library_wrapper.bzl @@ -46,4 +46,5 @@ cc_library_wrapper = rule( ), }, doc = "Re-export a cc_library with added LLVM specific settings.", + provides = [CcInfo], ) From 350e17b0c0ffb8d826e5d527e15e79a4a6cbceb8 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Mon, 24 Nov 2025 15:59:55 -0800 Subject: [PATCH 7/9] add zstd.BUILD back --- utils/bazel/MODULE.bazel | 3 +- utils/bazel/third_party_build/zstd.BUILD | 55 ++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 2 deletions(-) create mode 100644 utils/bazel/third_party_build/zstd.BUILD diff --git a/utils/bazel/MODULE.bazel b/utils/bazel/MODULE.bazel index bd398deda7a9e..cf760ba24cb4c 100644 --- a/utils/bazel/MODULE.bazel +++ b/utils/bazel/MODULE.bazel @@ -15,6 +15,7 @@ bazel_dep(name = "rules_cc", version = "0.2.11") bazel_dep(name = "rules_foreign_cc", version = "0.15.1") bazel_dep(name = "rules_python", version = "1.6.3") bazel_dep(name = "rules_shell", version = "0.6.1") +bazel_dep(name = "zstd", version = "1.5.7", repo_name = "llvm_zstd") llvm_repos_extension = use_extension(":extensions.bzl", "llvm_repos_extension") use_repo( @@ -33,8 +34,6 @@ use_repo( "vulkan_sdk", ) -bazel_dep(name = "zstd", version = "1.5.7", repo_name = "llvm_zstd") - llvm_configure = use_repo_rule("@llvm-raw//utils/bazel:configure.bzl", "llvm_configure") llvm_configure(name = "llvm-project") diff --git a/utils/bazel/third_party_build/zstd.BUILD b/utils/bazel/third_party_build/zstd.BUILD new file mode 100644 index 0000000000000..de0d1396c8e8d --- /dev/null +++ b/utils/bazel/third_party_build/zstd.BUILD @@ -0,0 +1,55 @@ +# This file is licensed under the Apache License v2.0 with LLVM Exceptions. +# See https://llvm.org/LICENSE.txt for license information. +# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +load("@bazel_skylib//rules:common_settings.bzl", "bool_flag") +load("@rules_cc//cc:cc_library.bzl", "cc_library") + +package( + default_visibility = ["//visibility:public"], + # BSD/MIT-like license (for zstd) + licenses = ["notice"], +) + +bool_flag( + name = "llvm_enable_zstd", + build_setting_default = True, +) + +config_setting( + name = "llvm_zstd_enabled", + flag_values = {":llvm_enable_zstd": "true"}, +) + +cc_library( + name = "zstd", + srcs = select({ + ":llvm_zstd_enabled": glob([ + "lib/common/*.c", + "lib/common/*.h", + "lib/compress/*.c", + "lib/compress/*.h", + "lib/decompress/*.c", + "lib/decompress/*.h", + "lib/decompress/*.S", + "lib/dictBuilder/*.c", + "lib/dictBuilder/*.h", + ]), + "//conditions:default": [], + }), + hdrs = select({ + ":llvm_zstd_enabled": [ + "lib/zdict.h", + "lib/zstd.h", + "lib/zstd_errors.h", + ], + "//conditions:default": [], + }), + defines = select({ + ":llvm_zstd_enabled": [ + "LLVM_ENABLE_ZSTD=1", + "ZSTD_MULTITHREAD", + ], + "//conditions:default": [], + }), + strip_include_prefix = "lib", +) From c58ddc1246c305a6bbd7568d20cf5e13e59920b4 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Mon, 24 Nov 2025 16:01:29 -0800 Subject: [PATCH 8/9] public --- utils/bazel/llvm-project-overlay/third-party/BUILD.bazel | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils/bazel/llvm-project-overlay/third-party/BUILD.bazel b/utils/bazel/llvm-project-overlay/third-party/BUILD.bazel index b53afbc30f560..bf780b5f3c0bf 100644 --- a/utils/bazel/llvm-project-overlay/third-party/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/third-party/BUILD.bazel @@ -4,6 +4,8 @@ load("@bazel_skylib//rules:common_settings.bzl", "bool_flag") load(":cc_library_wrapper.bzl", "cc_library_wrapper") +package(default_visibility = ["//visibility:public"]) + bool_flag( name = "llvm_enable_zstd", build_setting_default = True, @@ -23,7 +25,6 @@ cc_library_wrapper( ], "//conditions:default": [], }), - visibility = ["//visibility:public"], deps = select({ ":llvm_zstd_enabled": [ "@llvm_zstd//:zstd", From 250fd9087d5aa704bb997459a7648ffbe854b463 Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Mon, 24 Nov 2025 16:06:28 -0800 Subject: [PATCH 9/9] dedup zstd configuration flags --- utils/bazel/third_party_build/zstd.BUILD | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/utils/bazel/third_party_build/zstd.BUILD b/utils/bazel/third_party_build/zstd.BUILD index de0d1396c8e8d..89da165225ad7 100644 --- a/utils/bazel/third_party_build/zstd.BUILD +++ b/utils/bazel/third_party_build/zstd.BUILD @@ -1,7 +1,6 @@ # This file is licensed under the Apache License v2.0 with LLVM Exceptions. # See https://llvm.org/LICENSE.txt for license information. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -load("@bazel_skylib//rules:common_settings.bzl", "bool_flag") load("@rules_cc//cc:cc_library.bzl", "cc_library") package( @@ -10,20 +9,10 @@ package( licenses = ["notice"], ) -bool_flag( - name = "llvm_enable_zstd", - build_setting_default = True, -) - -config_setting( - name = "llvm_zstd_enabled", - flag_values = {":llvm_enable_zstd": "true"}, -) - cc_library( name = "zstd", srcs = select({ - ":llvm_zstd_enabled": glob([ + "@llvm-project//third-party:llvm_zstd_enabled": glob([ "lib/common/*.c", "lib/common/*.h", "lib/compress/*.c", @@ -37,7 +26,7 @@ cc_library( "//conditions:default": [], }), hdrs = select({ - ":llvm_zstd_enabled": [ + "@llvm-project//third-party:llvm_zstd_enabled": [ "lib/zdict.h", "lib/zstd.h", "lib/zstd_errors.h", @@ -45,7 +34,7 @@ cc_library( "//conditions:default": [], }), defines = select({ - ":llvm_zstd_enabled": [ + "@llvm-project//third-party:llvm_zstd_enabled": [ "LLVM_ENABLE_ZSTD=1", "ZSTD_MULTITHREAD", ],