@@ -20,6 +20,7 @@ use super::job::{
20
20
use super :: standard_lib;
21
21
use super :: timings:: Timings ;
22
22
use super :: { BuildContext , BuildPlan , CompileMode , Context , Unit } ;
23
+ use crate :: core:: compiler:: ProfileKind ;
23
24
use crate :: core:: { PackageId , TargetKind } ;
24
25
use crate :: handle_error;
25
26
use crate :: util;
@@ -41,10 +42,10 @@ pub struct JobQueue<'a, 'cfg> {
41
42
compiled : HashSet < PackageId > ,
42
43
documented : HashSet < PackageId > ,
43
44
counts : HashMap < PackageId , usize > ,
44
- is_release : bool ,
45
45
progress : Progress < ' cfg > ,
46
46
next_id : u32 ,
47
47
timings : Timings < ' a , ' cfg > ,
48
+ profile_kind : ProfileKind ,
48
49
}
49
50
50
51
pub struct JobState < ' a > {
@@ -145,10 +146,10 @@ impl<'a, 'cfg> JobQueue<'a, 'cfg> {
145
146
compiled : HashSet :: new ( ) ,
146
147
documented : HashSet :: new ( ) ,
147
148
counts : HashMap :: new ( ) ,
148
- is_release : bcx. build_config . release ,
149
149
progress,
150
150
next_id : 0 ,
151
151
timings,
152
+ profile_kind : bcx. build_config . profile_kind . clone ( ) ,
152
153
}
153
154
}
154
155
@@ -416,15 +417,15 @@ impl<'a, 'cfg> JobQueue<'a, 'cfg> {
416
417
}
417
418
self . progress . clear ( ) ;
418
419
419
- let build_type = if self . is_release { "release" } else { "dev" } ;
420
+ let build_type = self . profile_kind . name ( ) ;
420
421
// NOTE: this may be a bit inaccurate, since this may not display the
421
422
// profile for what was actually built. Profile overrides can change
422
423
// these settings, and in some cases different targets are built with
423
424
// different profiles. To be accurate, it would need to collect a
424
425
// list of Units built, and maybe display a list of the different
425
426
// profiles used. However, to keep it simple and compatible with old
426
427
// behavior, we just display what the base profile is.
427
- let profile = cx. bcx . profiles . base_profile ( self . is_release ) ;
428
+ let profile = cx. bcx . profiles . base_profile ( & self . profile_kind ) ? ;
428
429
let mut opt_type = String :: from ( if profile. opt_level . as_str ( ) == "0" {
429
430
"unoptimized"
430
431
} else {
0 commit comments