File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ use command_helpers::*;
254254
255255mod tool;
256256pub use tool:: Tool ;
257- use tool:: ToolFamily ;
257+ use tool:: { CompilerFamilyLookupCache , ToolFamily } ;
258258
259259mod tempfile;
260260
@@ -277,7 +277,7 @@ struct BuildCache {
277277 env_cache : RwLock < HashMap < Box < str > , Env > > ,
278278 apple_sdk_root_cache : RwLock < HashMap < Box < str > , Arc < OsStr > > > ,
279279 apple_versions_cache : RwLock < HashMap < Box < str > , Arc < str > > > ,
280- cached_compiler_family : RwLock < HashMap < Box < Path > , ToolFamily > > ,
280+ cached_compiler_family : RwLock < CompilerFamilyLookupCache > ,
281281 known_flag_support_status_cache : RwLock < HashMap < CompilerFlag , bool > > ,
282282 target_info_parser : target:: TargetInfoParser ,
283283}
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ use crate::{
1616 Error , ErrorKind , OutputKind ,
1717} ;
1818
19+ pub ( crate ) type CompilerFamilyLookupCache = HashMap < Box < Path > , ToolFamily > ;
20+
1921/// Configuration used to represent an invocation of a C compiler.
2022///
2123/// This can be used to figure out what compiler is in use, what the arguments
@@ -40,7 +42,7 @@ pub struct Tool {
4042impl Tool {
4143 pub ( crate ) fn new (
4244 path : PathBuf ,
43- cached_compiler_family : & RwLock < HashMap < Box < Path > , ToolFamily > > ,
45+ cached_compiler_family : & RwLock < CompilerFamilyLookupCache > ,
4446 cargo_output : & CargoOutput ,
4547 out_dir : Option < & Path > ,
4648 ) -> Self {
@@ -57,7 +59,7 @@ impl Tool {
5759 pub ( crate ) fn with_args (
5860 path : PathBuf ,
5961 args : Vec < String > ,
60- cached_compiler_family : & RwLock < HashMap < Box < Path > , ToolFamily > > ,
62+ cached_compiler_family : & RwLock < CompilerFamilyLookupCache > ,
6163 cargo_output : & CargoOutput ,
6264 out_dir : Option < & Path > ,
6365 ) -> Self {
You can’t perform that action at this time.
0 commit comments