Skip to content

Commit a2db013

Browse files
committed
Fix build with codspeed
1 parent d3995c8 commit a2db013

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
use turbo_tasks_build::generate_register;
22

33
fn main() {
4+
println!("cargo::rustc-check-cfg=cfg(codspeed)");
5+
46
generate_register();
57
}

turbopack/crates/turbopack-cli/src/main.rs

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,15 @@ static ALLOC: TurboMalloc = TurboMalloc;
2424
fn main() {
2525
let args = Arguments::parse();
2626

27-
tokio::runtime::Builder::new_multi_thread()
28-
.enable_all()
29-
.on_thread_stop(|| {
30-
TurboMalloc::thread_stop();
31-
})
32-
.disable_lifo_slot()
33-
.build()
34-
.unwrap()
35-
.block_on(main_inner(args))
36-
.unwrap();
27+
let mut rt = tokio::runtime::Builder::new_multi_thread();
28+
rt.enable_all().on_thread_stop(|| {
29+
TurboMalloc::thread_stop();
30+
});
31+
32+
#[cfg(not(codspeed))]
33+
rt.disable_lifo_slot();
34+
35+
rt.build().unwrap().block_on(main_inner(args)).unwrap();
3736
}
3837

3938
async fn main_inner(args: Arguments) -> Result<()> {

0 commit comments

Comments
 (0)