@@ -409,6 +409,7 @@ pub struct TargetCfgs {
409
409
pub all_targets : HashSet < String > ,
410
410
pub all_archs : HashSet < String > ,
411
411
pub all_oses : HashSet < String > ,
412
+ pub all_oses_and_envs : HashSet < String > ,
412
413
pub all_envs : HashSet < String > ,
413
414
pub all_abis : HashSet < String > ,
414
415
pub all_families : HashSet < String > ,
@@ -433,6 +434,7 @@ impl TargetCfgs {
433
434
let mut all_targets = HashSet :: new ( ) ;
434
435
let mut all_archs = HashSet :: new ( ) ;
435
436
let mut all_oses = HashSet :: new ( ) ;
437
+ let mut all_oses_and_envs = HashSet :: new ( ) ;
436
438
let mut all_envs = HashSet :: new ( ) ;
437
439
let mut all_abis = HashSet :: new ( ) ;
438
440
let mut all_families = HashSet :: new ( ) ;
@@ -441,6 +443,7 @@ impl TargetCfgs {
441
443
for ( target, cfg) in targets. into_iter ( ) {
442
444
all_archs. insert ( cfg. arch . clone ( ) ) ;
443
445
all_oses. insert ( cfg. os . clone ( ) ) ;
446
+ all_oses_and_envs. insert ( cfg. os_and_env ( ) ) ;
444
447
all_envs. insert ( cfg. env . clone ( ) ) ;
445
448
all_abis. insert ( cfg. abi . clone ( ) ) ;
446
449
for family in & cfg. families {
@@ -459,6 +462,7 @@ impl TargetCfgs {
459
462
all_targets,
460
463
all_archs,
461
464
all_oses,
465
+ all_oses_and_envs,
462
466
all_envs,
463
467
all_abis,
464
468
all_families,
@@ -506,6 +510,12 @@ pub struct TargetCfg {
506
510
panic : PanicStrategy ,
507
511
}
508
512
513
+ impl TargetCfg {
514
+ pub ( crate ) fn os_and_env ( & self ) -> String {
515
+ format ! ( "{}-{}" , self . os, self . env)
516
+ }
517
+ }
518
+
509
519
fn default_os ( ) -> String {
510
520
"none" . into ( )
511
521
}
0 commit comments