Sync vs_toolschain.py up with Chromium.
win8sdk got renamed to win_sdk. Also minor fixes from upstream, mostly pylint. Upstream also no longer keeps the toolchain hash in a separate file. Change-Id: Iefc8bb6a487f0cdb13fcf3131b0fba317ca6548b Reviewed-on: https://boringssl-review.googlesource.com/4982 Reviewed-by: Adam Langley <agl@google.com>
This commit is contained in:
parent
39da3172e4
commit
efad697813
@ -1 +0,0 @@
|
|||||||
ee7d718ec60c2dc5d255bbe325909c2021a7efef
|
|
@ -34,8 +34,9 @@ def SetEnvironmentAndGetRuntimeDllDirs():
|
|||||||
|
|
||||||
toolchain = toolchain_data['path']
|
toolchain = toolchain_data['path']
|
||||||
version = toolchain_data['version']
|
version = toolchain_data['version']
|
||||||
version_is_pro = version[-1] != 'e'
|
win_sdk = toolchain_data.get('win_sdk')
|
||||||
win8sdk = toolchain_data['win8sdk']
|
if not win_sdk:
|
||||||
|
win_sdk = toolchain_data['win8sdk']
|
||||||
wdk = toolchain_data['wdk']
|
wdk = toolchain_data['wdk']
|
||||||
# TODO(scottmg): The order unfortunately matters in these. They should be
|
# TODO(scottmg): The order unfortunately matters in these. They should be
|
||||||
# split into separate keys for x86 and x64. (See CopyVsRuntimeDlls call
|
# split into separate keys for x86 and x64. (See CopyVsRuntimeDlls call
|
||||||
@ -49,10 +50,10 @@ def SetEnvironmentAndGetRuntimeDllDirs():
|
|||||||
# otheroptions.express
|
# otheroptions.express
|
||||||
# values there.
|
# values there.
|
||||||
gyp_defines_dict = gyp.NameValueListToDict(gyp.ShlexEnv('GYP_DEFINES'))
|
gyp_defines_dict = gyp.NameValueListToDict(gyp.ShlexEnv('GYP_DEFINES'))
|
||||||
gyp_defines_dict['windows_sdk_path'] = win8sdk
|
gyp_defines_dict['windows_sdk_path'] = win_sdk
|
||||||
os.environ['GYP_DEFINES'] = ' '.join('%s=%s' % (k, pipes.quote(str(v)))
|
os.environ['GYP_DEFINES'] = ' '.join('%s=%s' % (k, pipes.quote(str(v)))
|
||||||
for k, v in gyp_defines_dict.iteritems())
|
for k, v in gyp_defines_dict.iteritems())
|
||||||
os.environ['WINDOWSSDKDIR'] = win8sdk
|
os.environ['WINDOWSSDKDIR'] = win_sdk
|
||||||
os.environ['WDK_DIR'] = wdk
|
os.environ['WDK_DIR'] = wdk
|
||||||
# Include the VS runtime in the PATH in case it's not machine-installed.
|
# Include the VS runtime in the PATH in case it's not machine-installed.
|
||||||
runtime_path = ';'.join(vs2013_runtime_dll_dirs)
|
runtime_path = ';'.join(vs2013_runtime_dll_dirs)
|
||||||
@ -63,9 +64,8 @@ def SetEnvironmentAndGetRuntimeDllDirs():
|
|||||||
def _GetDesiredVsToolchainHashes():
|
def _GetDesiredVsToolchainHashes():
|
||||||
"""Load a list of SHA1s corresponding to the toolchains that we want installed
|
"""Load a list of SHA1s corresponding to the toolchains that we want installed
|
||||||
to build with."""
|
to build with."""
|
||||||
sha1path = os.path.join(script_dir, 'toolchain_vs2013.hash')
|
# Use Chromium's VS2013.
|
||||||
with open(sha1path, 'rb') as f:
|
return ['ee7d718ec60c2dc5d255bbe325909c2021a7efef']
|
||||||
return f.read().strip().splitlines()
|
|
||||||
|
|
||||||
|
|
||||||
def FindDepotTools():
|
def FindDepotTools():
|
||||||
@ -85,7 +85,6 @@ def Update():
|
|||||||
bool(int(os.environ.get('DEPOT_TOOLS_WIN_TOOLCHAIN', '1')))
|
bool(int(os.environ.get('DEPOT_TOOLS_WIN_TOOLCHAIN', '1')))
|
||||||
if sys.platform in ('win32', 'cygwin') and depot_tools_win_toolchain:
|
if sys.platform in ('win32', 'cygwin') and depot_tools_win_toolchain:
|
||||||
depot_tools_path = FindDepotTools()
|
depot_tools_path = FindDepotTools()
|
||||||
json_data_file = os.path.join(script_dir, 'win_toolchain.json')
|
|
||||||
get_toolchain_args = [
|
get_toolchain_args = [
|
||||||
sys.executable,
|
sys.executable,
|
||||||
os.path.join(depot_tools_path,
|
os.path.join(depot_tools_path,
|
||||||
|
Loading…
Reference in New Issue
Block a user