Issue a warning about removing RUSTC from cargo env by build-sbf

This commit is contained in:
Dmitri Makarov 2022-07-13 11:36:59 -07:00 committed by mergify[bot]
parent e3c9c58032
commit 1db17a8874
1 changed files with 3 additions and 0 deletions

View File

@ -536,6 +536,9 @@ fn build_sbf_package(config: &Config, target_directory: &Path, package: &cargo_m
// other than the one linked in BPF toolchain. We have to prevent
// this by removing RUSTC from the child process environment.
if env::var("RUSTC").is_ok() {
warn!(
"Removed RUSTC from cargo environment, because it overrides +sbf cargo command line option."
);
env::remove_var("RUSTC")
}