File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed
Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,7 @@ pub struct Config {
5151 pub cargo_target : Option < String > ,
5252 pub cargo_features : Vec < String > ,
5353 pub cargo_cfg_overrides : Vec < String > ,
54+ pub flame_log : Option < PathBuf > ,
5455 pub verbose : u8 ,
5556 pub compression : Compression ,
5657 pub inputs : Vec < PathBuf > ,
Original file line number Diff line number Diff line change @@ -181,8 +181,12 @@ fn cwd() -> anyhow::Result<AbsPathBuf> {
181181}
182182
183183fn main ( ) -> anyhow:: Result < ( ) > {
184+ let mut cfg = config:: Config :: extract ( ) . context ( "failed to load configuration" ) ?;
185+ if cfg. qltest {
186+ qltest:: prepare ( & mut cfg) ?;
187+ }
184188 let start = Instant :: now ( ) ;
185- let flame_layer = if let Ok ( path) = std :: env :: var ( "CODEQL_EXTRACTOR_RUST_OPTION_FLAME_LOG" ) {
189+ let flame_layer = if let Some ( path) = & cfg . flame_log {
186190 tracing_flame:: FlameLayer :: with_file ( path) . ok ( )
187191 } else {
188192 None
@@ -193,11 +197,6 @@ fn main() -> anyhow::Result<()> {
193197 ) )
194198 . with ( flame_layer. map ( |x| x. 0 ) )
195199 . init ( ) ;
196-
197- let mut cfg = config:: Config :: extract ( ) . context ( "failed to load configuration" ) ?;
198- if cfg. qltest {
199- qltest:: prepare ( & mut cfg) ?;
200- }
201200 info ! ( "{cfg:#?}\n " ) ;
202201
203202 let traps = trap:: TrapFileProvider :: new ( & cfg) . context ( "failed to set up trap files" ) ?;
You can’t perform that action at this time.
0 commit comments