bazelbuild / bazelbuild/rules_rust
`--@rules_rust//:extra_rustc_flags` are not propagated to cargo build scripts.
Open
bug
needs-triage
- Dominant language
- Starlark
- Stars
- 843
- Forks
- 651
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 15
Description
`--@rules_rust//:extra_rustc_flags` (nor `--@rules_rust//:extra_exec_rustc_flags` for that matter) are not propagated to cargo build scripts, so they are missing from `CARGO_ENCODED_RUSTFLAGS`, which can result in failed feature detection.
I expect that `extra_exec_rustc_flags` should be used when building cargo build scripts, but `extra_rustc_flags` should be passed when running cargo build scripts, so that they match `rustc_flags` used for building real targets.
cc @djmarcin @krasimirgg
Contributor guide
Assessment
This issue has not been assessed yet.