@@ -409,6 +409,7 @@ pub struct TargetCfgs {
409409 pub all_targets : HashSet < String > ,
410410 pub all_archs : HashSet < String > ,
411411 pub all_oses : HashSet < String > ,
412+ pub all_oses_and_envs : HashSet < String > ,
412413 pub all_envs : HashSet < String > ,
413414 pub all_abis : HashSet < String > ,
414415 pub all_families : HashSet < String > ,
@@ -433,6 +434,7 @@ impl TargetCfgs {
433434 let mut all_targets = HashSet :: new ( ) ;
434435 let mut all_archs = HashSet :: new ( ) ;
435436 let mut all_oses = HashSet :: new ( ) ;
437+ let mut all_oses_and_envs = HashSet :: new ( ) ;
436438 let mut all_envs = HashSet :: new ( ) ;
437439 let mut all_abis = HashSet :: new ( ) ;
438440 let mut all_families = HashSet :: new ( ) ;
@@ -441,6 +443,7 @@ impl TargetCfgs {
441443 for ( target, cfg) in targets. into_iter ( ) {
442444 all_archs. insert ( cfg. arch . clone ( ) ) ;
443445 all_oses. insert ( cfg. os . clone ( ) ) ;
446+ all_oses_and_envs. insert ( cfg. os_and_env ( ) ) ;
444447 all_envs. insert ( cfg. env . clone ( ) ) ;
445448 all_abis. insert ( cfg. abi . clone ( ) ) ;
446449 for family in & cfg. families {
@@ -459,6 +462,7 @@ impl TargetCfgs {
459462 all_targets,
460463 all_archs,
461464 all_oses,
465+ all_oses_and_envs,
462466 all_envs,
463467 all_abis,
464468 all_families,
@@ -506,6 +510,12 @@ pub struct TargetCfg {
506510 panic : PanicStrategy ,
507511}
508512
513+ impl TargetCfg {
514+ pub ( crate ) fn os_and_env ( & self ) -> String {
515+ format ! ( "{}-{}" , self . os, self . env)
516+ }
517+ }
518+
509519fn default_os ( ) -> String {
510520 "none" . into ( )
511521}
0 commit comments