bazelbuild / bazelbuild/rules_rust

Link actions don't get link_flags files propagated from transitive cargo_build_script targets

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

Description

This code diligently forwards all link search path files transitively from `cargo_build_script` targets, but not the link flag files from them: https://github.com/bazelbuild/rules_rust/blob/1469cd7cb2394dbd2869ff50578aa34c776897cc/rust/private/rustc.bzl#L1458-L1493

This is buggy in two ways:
1. We _should_ be propagating all of the transitive `BuildInfo.link_flags` up to the link action (but _only_ the link action, not compile actions)
2. We _shouldn't_ be propagating all of the transitive `BuildInfo. link_search_path_files`s to compile actions, only up to the link action.

The first matters quite a bit. The second is a relatively minor detail.

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.