You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make libclang attr as optional in the rust_bindgen_toolchain (#3788)
The `libclang` attr is currently used to set env variables for the
underlying `clang-sys` crate to dynamically link libclang. In build
systems that use static linking, these are redundant. Making libclang
attr optional simplifies the toolchain config for static linking.
---------
Co-authored-by: Krasimir Georgiev <krasimir@google.com>
@@ -528,10 +531,11 @@ For additional information, see the [Bazel toolchains documentation](https://doc
528
531
default=True,
529
532
),
530
533
"libclang": attr.label(
531
-
doc="A cc_library that provides bindgen's runtime dependency on libclang.",
534
+
doc="A cc_library providing bindgen's runtime dependency on libclang. This attribute is required for hermeticity when bindgen is dynamically linked. If None, bindgen must be statically linked; else, system libraries will be used instead.",
532
535
cfg="exec",
533
536
providers= [CcInfo],
534
537
allow_files=True,
538
+
mandatory=False,
535
539
),
536
540
"libstdcxx": attr.label(
537
541
doc="A cc_library that satisfies libclang's libstdc++ dependency. This is used to make the execution of clang hermetic. If None, system libraries will be used instead.",
0 commit comments