1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83
|
This is a mix of commit fd011815c455976b15e31966f826628b4f9f61d4
("don't keep use_reclient=true with .reproxy_tmp") pulled from upstream
plus a revert of upstream's 49b23faa16ad14e96601aea8772c7279fcbd6b44
("sysroot.gni: Use path_exists() rather than exec_script("dir_exists.py")
in order to work on older gn that lacks path_exists().
--- a/build/config/sysroot.gni
+++ b/build/config/sysroot.gni
@@ -61,7 +61,9 @@ if (sysroot == "") {
_script_arch = "amd64"
}
assert(
- path_exists(sysroot),
+ exec_script("//build/dir_exists.py",
+ [ rebase_path(sysroot) ],
+ "string") == "True",
"Missing sysroot ($sysroot). To fix, run: build/linux/sysroot_scripts/install-sysroot.py --arch=$_script_arch")
}
} else if (is_mac) {
--- /dev/null
+++ b/build/dir_exists.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python3
+# Copyright 2011 The Chromium Authors
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+"""Writes True if the argument is a directory."""
+
+import os.path
+import sys
+
+def main():
+ sys.stdout.write(_is_dir(sys.argv[1]))
+ return 0
+
+def _is_dir(dir_name):
+ return str(os.path.isdir(dir_name))
+
+def DoMain(args):
+ """Hook to be called from gyp without starting a separate python
+ interpreter."""
+ return _is_dir(args[0])
+
+if __name__ == '__main__':
+ sys.exit(main())
--- a/build/dotfile_settings.gni
+++ b/build/dotfile_settings.gni
@@ -24,6 +24,7 @@ build_dotfile_settings = {
"//build/config/mac/mac_sdk.gni",
"//build/config/mac/rules.gni",
"//build/config/posix/BUILD.gn",
+ "//build/config/sysroot.gni",
"//build/config/win/BUILD.gn",
"//build/config/win/visual_studio_version.gni",
"//build/rust/analyze.gni",
--- a/build/toolchain/siso.gni
+++ b/build/toolchain/siso.gni
@@ -7,11 +7,6 @@ import("//build/config/gclient_args.gni"
use_siso_default = false
_is_google_corp_machine = false
-if (path_exists("/usr/bin/gcert") || # linux
- path_exists("/usr/local/bin/gcert") || # mac
- path_exists("/c:/gnubby/bin/gcert.exe")) {
- _is_google_corp_machine = true
-}
_is_bot = false
if (getenv("SWARMING_HEADLESS") != "" || getenv("SWARMING_BOT_ID") != "" ||
@@ -19,13 +14,6 @@ if (getenv("SWARMING_HEADLESS") != "" ||
_is_bot = true
}
-_is_ninja_used = path_exists(rebase_path(".ninja_deps", root_build_dir))
-
-if (path_exists("//build/config/siso/.sisoenv") &&
- defined(build_with_chromium) && build_with_chromium &&
- (_is_google_corp_machine || _is_bot) && !_is_ninja_used) {
- use_siso_default = true
-}
declare_args() {
# Placeholder to allow having use_siso in args.gn file.
|