bazelbuild / rules_cc

C++ Rules for Bazel
https://bazel.build
Apache License 2.0
182 stars 90 forks source link

cc_shared_library publishes CcInfo #99

Closed jlaxson closed 1 year ago

jlaxson commented 3 years ago

The core mechanism of cc_shared_library is nice in that it decouples the libraries you actually depend on from the linking and library structure. However I run into several cases where I'd really just like cc_shared_library to behave like a fancy cc_library:

This adds a CcInfo provider to cc_shared_library so it can be used anywhere an existing cc_library can. Separately, I'll PR to bazel to detect a CcSharedLibraryInfo provider in deps and automatically add it to dynamic_deps.

oquenchil commented 3 years ago

The CcInfo provider was omitted on purpose. cc_shared_library is a very heavy rule that flattens nested sets, we wanted to avoid people adding a cc_shared_libraries in the middle of a huge dependency graph. Perhaps this design decision will be revisited in the future but not now.

oquenchil commented 1 year ago

The CcInfo provider was omitted on purpose. cc_shared_library is a very heavy rule that flattens nested sets, we wanted to avoid people adding a cc_shared_libraries in the middle of a huge dependency graph. Perhaps this design decision will be revisited in the future but not now.

Closed for this reason.