mirror of
https://github.com/servo/servo.git
synced 2025-06-25 09:34:32 +01:00
Auto merge of #16035 - emilio:parallel-log-no-fun, r=upsuper
stylo: Sequentialize binding generation if logging is enabled. Otherwise the log is useless, and it's even slower than in parallel mode due to the high lock contention. <!-- Reviewable:start --> --- This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/16035) <!-- Reviewable:end -->
This commit is contained in:
commit
9fdebf0934
1 changed files with 14 additions and 9 deletions
|
@ -772,11 +772,15 @@ mod bindings {
|
|||
|
||||
pub fn generate() {
|
||||
use self::common::*;
|
||||
use std::fs;
|
||||
use std::thread;
|
||||
use std::{env, fs, thread};
|
||||
println!("cargo:rerun-if-changed=build_gecko.rs");
|
||||
fs::create_dir_all(&*OUTDIR_PATH).unwrap();
|
||||
bindings::setup_logging();
|
||||
if env::var("STYLO_BUILD_LOG").is_ok() {
|
||||
bindings::generate_structs(BuildType::Debug);
|
||||
bindings::generate_structs(BuildType::Release);
|
||||
bindings::generate_bindings();
|
||||
} else {
|
||||
let threads = vec![
|
||||
thread::spawn(|| bindings::generate_structs(BuildType::Debug)),
|
||||
thread::spawn(|| bindings::generate_structs(BuildType::Release)),
|
||||
|
@ -786,3 +790,4 @@ pub fn generate() {
|
|||
t.join().unwrap();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue