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
|
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
@@ -63,7 +63,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
@@ -6,12 +6,6 @@ import("//build/config/gclient_args.gni"
# need to match with autoninja's logic.
use_siso_default = false
-_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_ninja_used) {
- use_siso_default = true
-}
declare_args() {
# Placeholder to allow having use_siso in args.gn file.
|