rules_rust icon indicating copy to clipboard operation
rules_rust copied to clipboard

Should libprofiler_builtins always be linked?

Open keith opened this issue 3 years ago • 0 comments

Currently when producing a static library that depends on a rust_library we always get libprofiler_builtins*.rlib in the output binary. My understanding of this library is that it's likely only necessary in certain configurations like coverage, and otherwise it could be omitted. In the case of linking a rust_binary this likely isn't a problem given that dead stripping / lazy loading archives is probably enough to omit it, but if you distribute the static library this can lead to conflicts with binaries that do need these symbols for coverage data.

Should rules_rust be smarter about only including this library in the case that the configuration requires it?

keith avatar Jul 13 '22 14:07 keith