summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
Diffstat (limited to 'build')
-rw-r--r--build/toolchain/get_concurrent_links.py6
-rw-r--r--build/toolchain/win/setup_toolchain.py17
-rw-r--r--build/vs_toolchain.py2
3 files changed, 10 insertions, 15 deletions
diff --git a/build/toolchain/get_concurrent_links.py b/build/toolchain/get_concurrent_links.py
index 629d67d..6a40101 100644
--- a/build/toolchain/get_concurrent_links.py
+++ b/build/toolchain/get_concurrent_links.py
@@ -7,6 +7,7 @@
import os
import re
+import subprocess
import sys
def GetDefaultConcurrentLinks():
@@ -31,8 +32,7 @@ def GetDefaultConcurrentLinks():
("sullAvailExtendedVirtual", ctypes.c_ulonglong),
]
- stat = MEMORYSTATUSEX()
- stat.dwLength = ctypes.sizeof(stat)
+ stat = MEMORYSTATUSEX(dwLength=ctypes.sizeof(MEMORYSTATUSEX))
ctypes.windll.kernel32.GlobalMemoryStatusEx(ctypes.byref(stat))
mem_limit = max(1, stat.ullTotalPhys / (4 * (2 ** 30))) # total / 4GB
@@ -55,7 +55,7 @@ def GetDefaultConcurrentLinks():
# A static library debug build of Chromium's unit_tests takes ~2.7GB, so
# 4GB per ld process allows for some more bloat.
return max(1, avail_bytes / (4 * (2 ** 30))) # total / 4GB
- except:
+ except Exception:
return 1
else:
# TODO(scottmg): Implement this for other platforms.
diff --git a/build/toolchain/win/setup_toolchain.py b/build/toolchain/win/setup_toolchain.py
index 569f4da..9bf7f07 100644
--- a/build/toolchain/win/setup_toolchain.py
+++ b/build/toolchain/win/setup_toolchain.py
@@ -8,15 +8,13 @@ import re
import subprocess
import sys
-"""
-Copies the given "win tool" (which the toolchain uses to wrap compiler
-invocations) and the environment blocks for the 32-bit and 64-bit builds on
-Windows to the build directory.
-
-The arguments are the visual studio install location and the location of the
-win tool. The script assumes that the root build directory is the current dir
-and the files will be written to the current directory.
-"""
+# Copies the given "win tool" (which the toolchain uses to wrap compiler
+# invocations) and the environment blocks for the 32-bit and 64-bit builds on
+# Windows to the build directory.
+#
+# The arguments are the visual studio install location and the location of the
+# win tool. The script assumes that the root build directory is the current dir
+# and the files will be written to the current directory.
def _ExtractImportantEnvironment(output_of_set):
@@ -104,7 +102,6 @@ def main():
'<visual studio path> <win tool path> <win sdk path> '
'<runtime dirs> <cpu_arch>')
sys.exit(2)
- vs_path = sys.argv[1]
tool_source = sys.argv[2]
win_sdk_path = sys.argv[3]
runtime_dirs = sys.argv[4]
diff --git a/build/vs_toolchain.py b/build/vs_toolchain.py
index 5373f03..6f49e7c 100644
--- a/build/vs_toolchain.py
+++ b/build/vs_toolchain.py
@@ -37,7 +37,6 @@ def SetEnvironmentAndGetRuntimeDllDirs():
toolchain = toolchain_data['path']
version = toolchain_data['version']
- version_is_pro = version[-1] != 'e'
win8sdk = toolchain_data['win8sdk']
wdk = toolchain_data['wdk']
# TODO(scottmg): The order unfortunately matters in these. They should be
@@ -168,7 +167,6 @@ def Update():
if sys.platform in ('win32', 'cygwin') and depot_tools_win_toolchain:
import find_depot_tools
depot_tools_path = find_depot_tools.add_depot_tools_to_path()
- json_data_file = os.path.join(script_dir, 'win_toolchain.json')
get_toolchain_args = [
sys.executable,
os.path.join(depot_tools_path,