Bazel’s Take on (Cc) Shared Libraries
summary
cc_shared_library in Bazel uses aspects to walk dependency edges, emit graph_node_info and combine that with cc_shared_library_info to decide which object files to link and which transitive cc libraries to exclude. the rule is the core rule that relies on aspects, so custom rules that emit cc_info can be wrongly treated as linkable and cause duplicate-link failures. fixes are to provide cc_shared_library_hint_info to control aspect propagation or wrap/hide emitted cc_info so the aspect ignores those rules.
AI-written summary · about
chapters (6)
- 0:00Bazel shared libraries intro
- 1:28Bazel 7 CC shared library changes
- 3:58CC shared library duplicate symbols
- 6:06Bazel aspects and graph info
- 9:00Custom rules and the all-seeing eye problem
- 10:49Controlling dependency visibility
related talks
04mLink compatibility
29mCoeffects for Sharing and Mutation
50mShared Libraries in Windows and Linux
14mGuided Linking: Dynamic Linking without the Costs
43mRust Unlinked: Rustc, Symbols, and Static Libraries
31mToolchains for People in a Hurry: Latest Features of GCC/GLIBC
01h 23mC++ Linkers and the One Definition Rule
16mMind the Gap (Between Your Code and Your Toolchain)
