mirror of
https://github.com/denoland/rusty_v8.git
synced 2024-11-21 15:04:33 -05:00
fix building in the presence of depot_tools (#757)
This commit is contained in:
parent
cb07d4f914
commit
ab04be75f3
1 changed files with 11 additions and 2 deletions
13
build.rs
13
build.rs
|
@ -316,9 +316,18 @@ fn print_link_flags() {
|
|||
}
|
||||
}
|
||||
|
||||
// Chromium depot_tools contains helpers
|
||||
// which delegate to the "relevant" `buildtools`
|
||||
// directory when invoked, so they don't count.
|
||||
fn not_in_depot_tools(p: PathBuf) -> bool {
|
||||
!p.as_path().to_str().unwrap().contains("depot_tools")
|
||||
}
|
||||
|
||||
fn need_gn_ninja_download() -> bool {
|
||||
let has_ninja = which("ninja").is_ok() || env::var_os("NINJA").is_some();
|
||||
let has_gn = which("gn").is_ok() || env::var_os("GN").is_some();
|
||||
let has_ninja = which("ninja").map_or(false, not_in_depot_tools)
|
||||
|| env::var_os("NINJA").is_some();
|
||||
let has_gn = which("gn").map_or(false, not_in_depot_tools)
|
||||
|| env::var_os("GN").is_some();
|
||||
|
||||
!has_ninja || !has_gn
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue