diff options
-rw-r--r-- | DEPS | 29 | ||||
-rw-r--r-- | build/download_nacl_toolchains.py | 29 |
2 files changed, 58 insertions, 0 deletions
@@ -18,6 +18,18 @@ vars = { # revisions here, but it makes checkdeps confused. We should fix checkdeps. "nacl_chrome_ppapi_revision": "96903", # native_client/DEPS: chrome_ppapi_rev "nacl_tools_revision": "5360", # native_client/DEPS: tools_rev + + # These hashes need to be updated when nacl_toolchain_revision is changed. + # After changing nacl_toolchain_revision, run 'gclient runhooks' to get the + # new values. + "nacl_toolchain_mac_x86_newlib_hash": + "be4cc2baf6eb34c8fe155a1bb61e2acd8ca1e924", + "nacl_toolchain_win_x86_newlib_hash": + "56667d7f653b1005cd5116de3d8e9faf346053cf", + "nacl_toolchain_linux_x86_newlib_hash": + "5e4876a1fa53c7701cdbeef969a99b3ff0b0ddc5", + "nacl_toolchain_revision": "6429", + "libjingle_revision": "77", "libvpx_revision": "96377", "ffmpeg_revision": "96868", @@ -414,4 +426,21 @@ hooks = [ "--file_hash", "x86_32", Var("nacl_irt_hash_x86_32"), "--file_hash", "x86_64", Var("nacl_irt_hash_x86_64")], }, + { + # This downloads binaries for Native Client's newlib toolchain. + # Done in lieu of building the toolchain from scratch as it can take + # anywhere from 30 minutes to 4 hours depending on platform to build. + "pattern": ".", + "action": [ + "python", "src/build/download_nacl_toolchains.py", + "--x86-version", Var("nacl_toolchain_revision"), + "--nacl-newlib-only", + "--file-hash", "mac_x86_newlib", + Var("nacl_toolchain_mac_x86_newlib_hash"), + "--file-hash", "win_x86_newlib", + Var("nacl_toolchain_win_x86_newlib_hash"), + "--file-hash", "linux_x86_newlib", + Var("nacl_toolchain_linux_x86_newlib_hash"), + ], + }, ] diff --git a/build/download_nacl_toolchains.py b/build/download_nacl_toolchains.py new file mode 100644 index 0000000..c096b5e --- /dev/null +++ b/build/download_nacl_toolchains.py @@ -0,0 +1,29 @@ +#!/usr/bin/python +# Copyright (c) 2011 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +"""Shim to run nacl toolchain download script only if there is a nacl dir.""" + +import os +import sys + + +def Main(): + script_dir = os.path.dirname(os.path.abspath(__file__)) + src_dir = os.path.dirname(script_dir) + nacl_dir = os.path.join(src_dir, 'native_client') + nacl_build_dir = os.path.join(nacl_dir, 'build') + download_script = os.path.join(nacl_build_dir, 'download_toolchains.py') + if not os.path.exists(download_script): + print "Can't find '%s'" % download_script + print 'Presumably you are intentionally building without NativeClient.' + print 'Skipping NativeClient toolchain download.' + sys.exit(0) + sys.path.insert(0, nacl_build_dir) + import download_toolchains + download_toolchains.Main() + + +if __name__ == '__main__': + Main() |