bazelbuild / bazelbuild/rules_rust
rustc_compile_action doesn't pass default_shell_env
- Dominant language
- Starlark
- Stars
- 843
- Forks
- 651
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 15
Description
I have a CC toolchain where most of the "tools" are actually shell script wrappers that ensure only toolchain provided libraries are loaded. This involves some calls to readlink and dirname. rust_compile_actions doesn't set `use_default_shell_env` to True and as a result, these fail when rustc calls clang which in turn calls ld.lld. I found that setting `use_default_shell_env = True` resolved my issue.` Is this a change that can be made? Or should we consider adding a setting to either the rust toolchain or add another provider that can be applied to CC toolchains so we can let users configure this?
https://github.com/bazelbuild/rules_rust/blob/aa4b3a862a8200c9422b7f7e050b12c7ef2c2a61/rust/private/rustc.bzl#L1258
Contributor guide
Assessment
This issue has not been assessed yet.