bazelbuild / bazelbuild/rules_rust

Should libprofiler_builtins always be linked?

Open
#1,462 0 comments 3 reactions 0 assignees View on GitHub
needs-triage
Dominant language
Starlark
Stars
843
Forks
651
Avg merge
2d 18h
Merged PRs (30d)
15

Description

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?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.