-
Notifications
You must be signed in to change notification settings - Fork 434
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]>
- Loading branch information
Showing
5 changed files
with
31 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters