xref: /aosp_15_r20/external/bazelbuild-rules_rust/bindgen/transitive_repositories.bzl (revision d4726bddaa87cc4778e7472feed243fa4b6c267f)
1*d4726bddSHONG Yifan"""Transitive dependencies for the Rust `bindgen` rules"""
2*d4726bddSHONG Yifan
3*d4726bddSHONG Yifanload("@llvm-raw//utils/bazel:configure.bzl", "llvm_configure", "llvm_disable_optional_support_deps")
4*d4726bddSHONG Yifan
5*d4726bddSHONG Yifan# buildifier: disable=unnamed-macro
6*d4726bddSHONG Yifandef rust_bindgen_transitive_dependencies():
7*d4726bddSHONG Yifan    """Declare transitive dependencies needed for bindgen."""
8*d4726bddSHONG Yifan
9*d4726bddSHONG Yifan    llvm_configure(
10*d4726bddSHONG Yifan        name = "llvm-project",
11*d4726bddSHONG Yifan        repo_mapping = {"@llvm_zlib": "@zlib"},
12*d4726bddSHONG Yifan        targets = [
13*d4726bddSHONG Yifan            "AArch64",
14*d4726bddSHONG Yifan            "X86",
15*d4726bddSHONG Yifan        ],
16*d4726bddSHONG Yifan    )
17*d4726bddSHONG Yifan
18*d4726bddSHONG Yifan    # Disables optional dependencies for Support like zlib and terminfo. You may
19*d4726bddSHONG Yifan    # instead want to configure them using the macros in the corresponding bzl
20*d4726bddSHONG Yifan    # files.
21*d4726bddSHONG Yifan    llvm_disable_optional_support_deps()
22