bazelbuild / bazelbuild/rules_rust
Is bindgen object merging necessary?
- Dominant language
- Starlark
- Stars
- 843
- Forks
- 651
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 15
Description
In https://github.com/bazelbuild/rules_rust/pull/2361 we have added logic (that became the default since then) to merge object files of `cc_lib` into the `rlib` produced by bindgen rules. The problem this is solving is related to some annoying ordering errors when using both Bazel and Cargo on a project using bindgen in a build script.
I can't say I understand exactly what the problem is, but it has bitten us recently (hence https://github.com/bazelbuild/rules_rust/pull/2959). But intuitively, if the problem is related to link ordering when build scripts are involved, maybe a better fix would be to propagate CcInfo from build scripts?
Any information/repro instructions of the original problem will be super useful.
@UebelAndre @krasimirgg
Contributor guide
Assessment
This issue has not been assessed yet.