commit | 0e1297d31e2140c5b97d44cb292f135b64944355 | [log] [tgz] |
---|---|---|
author | yuzhy8701 <18453608+yuzhy8701@users.noreply.github.com> | Tue Aug 06 05:11:29 2024 -0700 |
committer | GitHub <noreply@github.com> | Tue Aug 06 12:11:29 2024 +0000 |
tree | 638791f2bef1518dc937bbeff8a3841d1e8a9d9f | |
parent | 70e8729ce89056dea0033a98c14c74cc7f996b31 [diff] |
Introduce feature `rules_rust_link_cc`. (#2723) This feature is similar to `rules_rust_unsupported_feature`. The difference is that, `rules_rust_unsupported_feature` gets disabled if *any* rust is involved, while this feature gets disabled if *only* rust is involved. My use case for this feature is to static link to c++ / objc stdlibs. They are needed only when any C object is being linked, and will produce invalid rust_proc_macro if linked blindly. This implementation uses the fact that `DepInfo.transitive_noncrates` would be empty unless there is a `cc_library` or `cc_import` in the (transitive) deps. As a side effect, `collect_deps()` can no longer use the output of `_are_linkstamps_supported()` so it now always returns a populated linkstamp depset, to be discarded later if linkstamps are not supported. --------- Co-authored-by: scentini <rosica@google.com>
This repository provides rules for building Rust projects with Bazel.
General discussions and announcements take place in the GitHub Discussions, but there are additional places where community members gather to discuss rules_rust
.
Please refer to the full documentation.