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::*;
254
254
255
255
mod tool;
256
256
pub use tool:: Tool ;
257
- use tool:: ToolFamily ;
257
+ use tool:: { CompilerFamilyLookupCache , ToolFamily } ;
258
258
259
259
mod tempfile;
260
260
@@ -277,7 +277,7 @@ struct BuildCache {
277
277
env_cache : RwLock < HashMap < Box < str > , Env > > ,
278
278
apple_sdk_root_cache : RwLock < HashMap < Box < str > , Arc < OsStr > > > ,
279
279
apple_versions_cache : RwLock < HashMap < Box < str > , Arc < str > > > ,
280
- cached_compiler_family : RwLock < HashMap < Box < Path > , ToolFamily > > ,
280
+ cached_compiler_family : RwLock < CompilerFamilyLookupCache > ,
281
281
known_flag_support_status_cache : RwLock < HashMap < CompilerFlag , bool > > ,
282
282
target_info_parser : target:: TargetInfoParser ,
283
283
}
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ use crate::{
16
16
Error , ErrorKind , OutputKind ,
17
17
} ;
18
18
19
+ pub ( crate ) type CompilerFamilyLookupCache = HashMap < Box < Path > , ToolFamily > ;
20
+
19
21
/// Configuration used to represent an invocation of a C compiler.
20
22
///
21
23
/// This can be used to figure out what compiler is in use, what the arguments
@@ -40,7 +42,7 @@ pub struct Tool {
40
42
impl Tool {
41
43
pub ( crate ) fn new (
42
44
path : PathBuf ,
43
- cached_compiler_family : & RwLock < HashMap < Box < Path > , ToolFamily > > ,
45
+ cached_compiler_family : & RwLock < CompilerFamilyLookupCache > ,
44
46
cargo_output : & CargoOutput ,
45
47
out_dir : Option < & Path > ,
46
48
) -> Self {
@@ -57,7 +59,7 @@ impl Tool {
57
59
pub ( crate ) fn with_args (
58
60
path : PathBuf ,
59
61
args : Vec < String > ,
60
- cached_compiler_family : & RwLock < HashMap < Box < Path > , ToolFamily > > ,
62
+ cached_compiler_family : & RwLock < CompilerFamilyLookupCache > ,
61
63
cargo_output : & CargoOutput ,
62
64
out_dir : Option < & Path > ,
63
65
) -> Self {
You can’t perform that action at this time.
0 commit comments