@@ -4,7 +4,7 @@ use paths::Utf8Path;
4
4
use rustc_hash:: FxHashMap ;
5
5
use toolchain:: Tool ;
6
6
7
- use crate :: { utf8_stdout, CargoWorkspace , ManifestPath , PackageData , Sysroot , TargetKind } ;
7
+ use crate :: { utf8_stdout, ManifestPath , PackageData , Sysroot , TargetKind } ;
8
8
9
9
/// Recreates the compile-time environment variables that Cargo sets.
10
10
///
@@ -51,23 +51,13 @@ pub(crate) fn inject_cargo_env(env: &mut Env) {
51
51
env. set ( "CARGO" , Tool :: Cargo . path ( ) . to_string ( ) ) ;
52
52
}
53
53
54
- pub ( crate ) fn inject_rustc_tool_env (
55
- env : & mut Env ,
56
- cargo : & CargoWorkspace ,
57
- cargo_name : & str ,
58
- kind : TargetKind ,
59
- ) {
54
+ pub ( crate ) fn inject_rustc_tool_env ( env : & mut Env , cargo_name : & str , kind : TargetKind ) {
60
55
_ = kind;
61
56
// FIXME
62
57
// if kind.is_executable() {
63
58
// env.set("CARGO_BIN_NAME", cargo_name);
64
59
// }
65
60
env. set ( "CARGO_CRATE_NAME" , cargo_name. replace ( '-' , "_" ) ) ;
66
- // NOTE: Technically we should set this for all crates, but that will worsen the deduplication
67
- // logic so for now just keeping it proc-macros ought to be fine.
68
- if kind. is_proc_macro ( ) {
69
- env. set ( "CARGO_RUSTC_CURRENT_DIR" , cargo. manifest_path ( ) . parent ( ) . to_string ( ) ) ;
70
- }
71
61
}
72
62
73
63
pub ( crate ) fn cargo_config_env (
0 commit comments