File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -198,9 +198,16 @@ pub fn version() -> Result<Version> {
198
198
/// Returns the `rustc` SemVer version and additional metadata
199
199
/// like the git short hash and build date.
200
200
pub fn version_meta ( ) -> Result < VersionMeta > {
201
- let cmd = env:: var_os ( "RUSTC" ) . unwrap_or_else ( || OsString :: from ( "rustc" ) ) ;
201
+ let rustc = env:: var_os ( "RUSTC" ) . unwrap_or_else ( || OsString :: from ( "rustc" ) ) ;
202
+ let cmd = if let Some ( wrapper) = env:: var_os ( "RUSTC_WRAPPER" ) {
203
+ let mut cmd = Command :: new ( wrapper) ;
204
+ cmd. arg ( rustc) ;
205
+ cmd
206
+ } else {
207
+ Command :: new ( rustc)
208
+ } ;
202
209
203
- VersionMeta :: for_command ( Command :: new ( cmd) )
210
+ VersionMeta :: for_command ( cmd)
204
211
}
205
212
206
213
/// Parses a "rustc -vV" output string and returns
You can’t perform that action at this time.
0 commit comments