libv8 4.5.95.5 → 5.0.71.48.0beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +45 -19
- data/CHANGELOG.md +14 -0
- data/README.md +30 -15
- data/Rakefile +7 -6
- data/ext/libv8/arch.rb +5 -4
- data/ext/libv8/builder.rb +25 -19
- data/ext/libv8/compiler.rb +6 -33
- data/ext/libv8/location.rb +7 -8
- data/lib/libv8/version.rb +1 -1
- data/libv8.gemspec +1 -1
- data/patches/build-standalone-static-library.patch +14 -0
- data/patches/disable-building-tests.patch +48 -10
- data/patches/fPIC-for-static.patch +3 -3
- data/release/x86-linux/Vagrantfile +8 -4
- data/release/x86_64-freebsd10/Vagrantfile +86 -0
- data/release/x86_64-linux/Vagrantfile +8 -4
- data/spec/compiler_spec.rb +5 -29
- data/spec/support/compiler_helpers.rb +2 -4
- data/vendor/depot_tools/.gitignore +15 -3
- data/vendor/depot_tools/OWNERS +2 -2
- data/vendor/depot_tools/PRESUBMIT.py +4 -2
- data/vendor/depot_tools/WATCHLISTS +6 -0
- data/vendor/depot_tools/apply_issue.py +70 -38
- data/vendor/depot_tools/bootstrap/win/README.md +66 -0
- data/vendor/depot_tools/bootstrap/win/git-bash.template.sh +12 -0
- data/vendor/depot_tools/bootstrap/win/git.template.bat +5 -0
- data/vendor/depot_tools/bootstrap/win/profile.d.python.sh +20 -0
- data/vendor/depot_tools/bootstrap/win/win_tools.bat +96 -45
- data/vendor/depot_tools/breakpad.py +6 -141
- data/vendor/depot_tools/buildbucket.py +45 -31
- data/vendor/depot_tools/cbuildbot +1 -0
- data/vendor/depot_tools/checkout.py +2 -1
- data/vendor/depot_tools/chrome_set_ver +1 -0
- data/vendor/depot_tools/cit +8 -0
- data/vendor/depot_tools/cit.bat +11 -0
- data/vendor/depot_tools/cit.py +120 -0
- data/vendor/depot_tools/codereview.settings +0 -2
- data/vendor/depot_tools/commit_queue +1 -5
- data/vendor/depot_tools/commit_queue.bat +1 -4
- data/vendor/depot_tools/commit_queue.py +78 -29
- data/vendor/depot_tools/cpplint.py +22 -14
- data/vendor/depot_tools/cros +1 -0
- data/vendor/depot_tools/cros_sdk +1 -0
- data/vendor/depot_tools/depot-tools-auth.py +3 -3
- data/vendor/depot_tools/download_from_google_storage.py +101 -21
- data/vendor/depot_tools/drover.py +2 -3
- data/vendor/depot_tools/fetch.py +31 -27
- data/vendor/depot_tools/{recipes → fetch_configs}/android.py +4 -4
- data/vendor/depot_tools/fetch_configs/breakpad.py +45 -0
- data/vendor/depot_tools/{recipes → fetch_configs}/chromium.py +3 -3
- data/vendor/depot_tools/{recipes/recipe_util.py → fetch_configs/config_util.py} +3 -3
- data/vendor/depot_tools/fetch_configs/crashpad.py +41 -0
- data/vendor/depot_tools/{recipes → fetch_configs}/dart.py +3 -3
- data/vendor/depot_tools/{recipes/pdfium.py → fetch_configs/dartino.py} +14 -13
- data/vendor/depot_tools/{recipes → fetch_configs}/dartium.py +3 -3
- data/vendor/depot_tools/{recipes → fetch_configs}/depot_tools.py +3 -3
- data/vendor/depot_tools/fetch_configs/gyp.py +42 -0
- data/vendor/depot_tools/{recipes → fetch_configs}/infra.py +3 -3
- data/vendor/depot_tools/{recipes → fetch_configs}/infra_internal.py +3 -3
- data/vendor/depot_tools/{recipes → fetch_configs}/ios.py +4 -4
- data/vendor/depot_tools/{recipes → fetch_configs}/mojo.py +3 -3
- data/vendor/depot_tools/{recipes → fetch_configs}/nacl.py +3 -3
- data/vendor/depot_tools/{recipes → fetch_configs}/naclports.py +3 -3
- data/vendor/depot_tools/fetch_configs/pdfium.py +40 -0
- data/vendor/depot_tools/{recipes → fetch_configs}/skia.py +3 -3
- data/vendor/depot_tools/{recipes → fetch_configs}/skia_buildbot.py +3 -3
- data/vendor/depot_tools/fetch_configs/syzygy.py +41 -0
- data/vendor/depot_tools/{recipes → fetch_configs}/v8.py +3 -3
- data/vendor/depot_tools/{recipes → fetch_configs}/webrtc.py +3 -3
- data/vendor/depot_tools/{recipes → fetch_configs}/webrtc_android.py +4 -4
- data/vendor/depot_tools/{recipes → fetch_configs}/webrtc_ios.py +4 -4
- data/vendor/depot_tools/fix_encoding.py +6 -6
- data/vendor/depot_tools/gcl.py +11 -21
- data/vendor/depot_tools/gclient +10 -0
- data/vendor/depot_tools/gclient-new-workdir.py +7 -38
- data/vendor/depot_tools/gclient.bat +2 -2
- data/vendor/depot_tools/gclient.py +85 -65
- data/vendor/depot_tools/gclient_scm.py +83 -10
- data/vendor/depot_tools/gclient_utils.py +5 -1
- data/vendor/depot_tools/gerrit_util.py +243 -26
- data/vendor/depot_tools/git-auto-svn +1 -1
- data/vendor/depot_tools/git-cache +1 -1
- data/vendor/depot_tools/git-cherry-pick-upload +1 -1
- data/vendor/depot_tools/git-cl +1 -1
- data/vendor/depot_tools/git-drover +6 -0
- data/vendor/depot_tools/git-find-releases +6 -0
- data/vendor/depot_tools/git-footers +1 -1
- data/vendor/depot_tools/git-freeze +1 -1
- data/vendor/depot_tools/git-gs +1 -1
- data/vendor/depot_tools/git-hyper-blame +6 -0
- data/vendor/depot_tools/git-map +1 -1
- data/vendor/depot_tools/git-map-branches +1 -1
- data/vendor/depot_tools/git-mark-merge-base +1 -1
- data/vendor/depot_tools/git-nav-downstream +1 -1
- data/vendor/depot_tools/git-new-branch +1 -1
- data/vendor/depot_tools/git-number +1 -1
- data/vendor/depot_tools/git-rebase-update +1 -1
- data/vendor/depot_tools/git-rename-branch +1 -1
- data/vendor/depot_tools/git-reparent-branch +1 -1
- data/vendor/depot_tools/git-retry +1 -1
- data/vendor/depot_tools/git-squash-branch +1 -1
- data/vendor/depot_tools/git-thaw +1 -1
- data/vendor/depot_tools/git-try +1 -1
- data/vendor/depot_tools/git-upstream-diff +1 -1
- data/vendor/depot_tools/git_auto_svn.py +24 -6
- data/vendor/depot_tools/git_cache.py +74 -27
- data/vendor/depot_tools/git_cl.py +2118 -747
- data/vendor/depot_tools/git_common.py +100 -6
- data/vendor/depot_tools/git_dates.py +62 -0
- data/vendor/depot_tools/git_drover.py +424 -0
- data/vendor/depot_tools/git_find_releases.py +65 -0
- data/vendor/depot_tools/git_footers.py +42 -0
- data/vendor/depot_tools/git_hyper_blame.py +391 -0
- data/vendor/depot_tools/git_map_branches.py +8 -6
- data/vendor/depot_tools/git_new_branch.py +6 -1
- data/vendor/depot_tools/git_rebase_update.py +56 -16
- data/vendor/depot_tools/git_reparent_branch.py +13 -0
- data/vendor/depot_tools/git_try.py +0 -2
- data/vendor/depot_tools/gsutil.py +51 -20
- data/vendor/depot_tools/infra/config/OWNERS +3 -1
- data/vendor/depot_tools/infra/config/cq.cfg +7 -3
- data/vendor/depot_tools/infra/config/recipes.cfg +9 -0
- data/vendor/depot_tools/luci_hacks/README.md +35 -0
- data/vendor/depot_tools/{bootstrap/virtualenv/tests → luci_hacks}/__init__.py +0 -0
- data/vendor/depot_tools/luci_hacks/luci_recipe_run.isolate +12 -0
- data/vendor/depot_tools/luci_hacks/luci_recipe_run.py +81 -0
- data/vendor/depot_tools/luci_hacks/trigger_luci_job.py +128 -0
- data/vendor/depot_tools/man/html/depot_tools.html +9 -1
- data/vendor/depot_tools/man/html/depot_tools_tutorial.html +4 -4
- data/vendor/depot_tools/man/html/git-drover.html +191 -35
- data/vendor/depot_tools/man/html/git-hyper-blame.html +878 -0
- data/vendor/depot_tools/man/html/git-rebase-update.html +9 -4
- data/vendor/depot_tools/man/man1/git-drover.1 +189 -36
- data/vendor/depot_tools/man/man1/git-hyper-blame.1 +128 -0
- data/vendor/depot_tools/man/man1/git-rebase-update.1 +8 -6
- data/vendor/depot_tools/man/man7/depot_tools.7 +9 -4
- data/vendor/depot_tools/man/src/_git-hyper-blame_desc.helper.txt +1 -0
- data/vendor/depot_tools/man/src/common_demo_functions.sh +5 -0
- data/vendor/depot_tools/man/src/depot_tools_tutorial.txt +1 -1
- data/vendor/depot_tools/man/src/git-drover.demo.1.sh +11 -16
- data/vendor/depot_tools/man/src/git-drover.demo.3.sh +27 -0
- data/vendor/depot_tools/man/src/git-drover.demo.4.sh +39 -0
- data/vendor/depot_tools/man/src/git-drover.txt +49 -3
- data/vendor/depot_tools/man/src/git-hyper-blame.demo.1.sh +3 -0
- data/vendor/depot_tools/man/src/git-hyper-blame.demo.2.sh +4 -0
- data/vendor/depot_tools/man/src/git-hyper-blame.demo.common.sh +57 -0
- data/vendor/depot_tools/man/src/git-hyper-blame.txt +85 -0
- data/vendor/depot_tools/man/src/git-rebase-update.txt +5 -1
- data/vendor/depot_tools/my_activity.py +6 -21
- data/vendor/depot_tools/ninja +2 -2
- data/vendor/depot_tools/ninja-linux32 +0 -0
- data/vendor/depot_tools/ninja-linux64 +0 -0
- data/vendor/depot_tools/ninja-mac +0 -0
- data/vendor/depot_tools/ninja.exe +0 -0
- data/vendor/depot_tools/presubmit_canned_checks.py +83 -69
- data/vendor/depot_tools/presubmit_support.py +126 -42
- data/vendor/depot_tools/pylint.py +5 -1
- data/vendor/depot_tools/python_runner.sh +55 -0
- data/vendor/depot_tools/recipe_modules/bot_update/__init__.py +32 -0
- data/vendor/depot_tools/recipe_modules/bot_update/api.py +283 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic.json +56 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic_output_manifest.json +63 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic_with_branch_heads.json +57 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/clobber.json +44 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/forced.json +57 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/gerrit_no_reset.json +44 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/no_shallow.json +44 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/off.json +43 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/reset_root_solution_revision.json +43 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/svn_mode.json +59 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange.json +58 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange_oauth2.json +60 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob.json +58 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail.json +60 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail_patch.json +81 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail_patch_download.json +81 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_gerrit_angle.json +49 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_v8.json +61 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_v8_head_by_default.json +51 -0
- data/vendor/depot_tools/recipe_modules/bot_update/example.py +172 -0
- data/vendor/depot_tools/{bootstrap/virtualenv/virtualenv_support → recipe_modules/bot_update/resources}/__init__.py +0 -0
- data/vendor/depot_tools/recipe_modules/bot_update/resources/bot_update.py +1764 -0
- data/vendor/depot_tools/recipe_modules/bot_update/test_api.py +86 -0
- data/vendor/depot_tools/recipe_modules/depot_tools/__init__.py +3 -0
- data/vendor/depot_tools/recipe_modules/depot_tools/api.py +27 -0
- data/vendor/depot_tools/recipe_modules/gclient/__init__.py +10 -0
- data/vendor/depot_tools/recipe_modules/gclient/api.py +378 -0
- data/vendor/depot_tools/recipe_modules/gclient/config.py +671 -0
- data/vendor/depot_tools/recipe_modules/gclient/example.expected/basic.json +172 -0
- data/vendor/depot_tools/recipe_modules/gclient/example.expected/revision.json +174 -0
- data/vendor/depot_tools/recipe_modules/gclient/example.expected/tryserver.json +185 -0
- data/vendor/depot_tools/recipe_modules/gclient/example.py +100 -0
- data/vendor/depot_tools/recipe_modules/gclient/test_api.py +37 -0
- data/vendor/depot_tools/recipe_modules/git/__init__.py +9 -0
- data/vendor/depot_tools/recipe_modules/git/api.py +377 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic.json +177 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic_branch.json +177 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic_file_name.json +179 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic_hash.json +176 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic_ref.json +177 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/basic_submodule_update_force.json +178 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/can_fail_build.json +153 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/cannot_fail_build.json +181 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/cat-file_test.json +199 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_delta.json +250 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_failed.json +181 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_with_bad_output.json +182 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_with_bad_output_fails_build.json +102 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/curl_trace_file.json +181 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/platform_win.json +186 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/rebase_failed.json +179 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/remote_not_origin.json +179 -0
- data/vendor/depot_tools/recipe_modules/git/example.expected/set_got_revision.json +178 -0
- data/vendor/depot_tools/recipe_modules/git/example.py +147 -0
- data/vendor/depot_tools/recipe_modules/git/resources/git_setup.py +61 -0
- data/vendor/depot_tools/recipe_modules/git/test_api.py +18 -0
- data/vendor/depot_tools/recipe_modules/git_cl/__init__.py +4 -0
- data/vendor/depot_tools/recipe_modules/git_cl/api.py +25 -0
- data/vendor/depot_tools/recipe_modules/git_cl/config.py +22 -0
- data/vendor/depot_tools/recipe_modules/git_cl/example.expected/basic.json +66 -0
- data/vendor/depot_tools/recipe_modules/git_cl/example.py +41 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/__init__.py +4 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/api.py +12 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/basic.json +14 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_linux.json +14 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_mac.json +14 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_win.json +14 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_linux.json +14 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_mac.json +14 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_win.json +14 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/example.py +28 -0
- data/vendor/depot_tools/recipe_modules/infra_paths/path_config.py +45 -0
- data/vendor/depot_tools/recipe_modules/presubmit/__init__.py +4 -0
- data/vendor/depot_tools/recipe_modules/presubmit/api.py +20 -0
- data/vendor/depot_tools/recipe_modules/presubmit/example.expected/basic.json +18 -0
- data/vendor/depot_tools/recipe_modules/presubmit/example.py +15 -0
- data/vendor/depot_tools/recipe_modules/rietveld/__init__.py +5 -0
- data/vendor/depot_tools/recipe_modules/rietveld/api.py +94 -0
- data/vendor/depot_tools/recipe_modules/rietveld/example.expected/basic.json +30 -0
- data/vendor/depot_tools/recipe_modules/rietveld/example.py +24 -0
- data/vendor/depot_tools/recipe_modules/tryserver/__init__.py +15 -0
- data/vendor/depot_tools/recipe_modules/tryserver/api.py +280 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_git_patch.json +104 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_rietveld_patch.json +58 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_rietveld_patch_new.json +58 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_svn_patch.json +68 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_wrong_patch.json +43 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_wrong_patch_new.json +43 -0
- data/vendor/depot_tools/recipe_modules/tryserver/example.py +53 -0
- data/vendor/depot_tools/recipe_modules/tryserver/test_api.py +7 -0
- data/vendor/depot_tools/recipes.py +136 -0
- data/vendor/depot_tools/repo +1 -1
- data/vendor/depot_tools/rietveld.py +46 -15
- data/vendor/depot_tools/roll_dep.py +97 -36
- data/vendor/depot_tools/scm.py +3 -3
- data/vendor/depot_tools/setup_color.py +94 -0
- data/vendor/depot_tools/subprocess2.py +10 -1
- data/vendor/depot_tools/third_party/cq_client/OWNERS +0 -1
- data/vendor/depot_tools/third_party/cq_client/README.md +47 -9
- data/vendor/depot_tools/third_party/cq_client/cq.pb.go +617 -0
- data/vendor/depot_tools/third_party/cq_client/cq.proto +75 -17
- data/vendor/depot_tools/third_party/cq_client/cq_pb2.py +168 -41
- data/vendor/depot_tools/third_party/cq_client/testdata/cq_gerrit.cfg +55 -0
- data/vendor/depot_tools/third_party/cq_client/{test/cq_example.cfg → testdata/cq_rietveld.cfg} +14 -6
- data/vendor/depot_tools/third_party/fancy_urllib/README +5 -4
- data/vendor/depot_tools/third_party/fancy_urllib/__init__.py +114 -52
- data/vendor/depot_tools/third_party/protobuf26/README.chromium +9 -6
- data/vendor/depot_tools/third_party/upload.py +17 -31
- data/vendor/depot_tools/trychange.py +0 -2
- data/vendor/depot_tools/update_depot_tools +29 -11
- data/vendor/depot_tools/update_depot_tools.bat +4 -9
- data/vendor/depot_tools/upload_to_google_storage.py +42 -5
- data/vendor/depot_tools/win_toolchain/OWNERS +1 -0
- data/vendor/depot_tools/win_toolchain/get_toolchain_if_necessary.py +227 -52
- data/vendor/depot_tools/win_toolchain/package_from_installed.py +203 -88
- metadata +161 -81
- data/patches/arm/do-not-imply-vfp3-and-armv7.patch +0 -16
- data/patches/arm/do-not-use-vfp2.patch +0 -13
- data/patches/clang51/no-unused-variable.patch +0 -12
- data/vendor/depot_tools/bootstrap/.gitignore +0 -2
- data/vendor/depot_tools/bootstrap/bootstrap.py +0 -234
- data/vendor/depot_tools/bootstrap/deps.pyl +0 -15
- data/vendor/depot_tools/bootstrap/util.py +0 -87
- data/vendor/depot_tools/bootstrap/virtualenv/.gitignore +0 -10
- data/vendor/depot_tools/bootstrap/virtualenv/.travis.yml +0 -28
- data/vendor/depot_tools/bootstrap/virtualenv/AUTHORS.txt +0 -91
- data/vendor/depot_tools/bootstrap/virtualenv/CONTRIBUTING.rst +0 -21
- data/vendor/depot_tools/bootstrap/virtualenv/LICENSE.txt +0 -22
- data/vendor/depot_tools/bootstrap/virtualenv/MANIFEST.in +0 -11
- data/vendor/depot_tools/bootstrap/virtualenv/README.rst +0 -10
- data/vendor/depot_tools/bootstrap/virtualenv/bin/rebuild-script.py +0 -71
- data/vendor/depot_tools/bootstrap/virtualenv/docs/changes.rst +0 -747
- data/vendor/depot_tools/bootstrap/virtualenv/docs/conf.py +0 -149
- data/vendor/depot_tools/bootstrap/virtualenv/docs/development.rst +0 -61
- data/vendor/depot_tools/bootstrap/virtualenv/docs/index.rst +0 -137
- data/vendor/depot_tools/bootstrap/virtualenv/docs/installation.rst +0 -58
- data/vendor/depot_tools/bootstrap/virtualenv/docs/make.bat +0 -170
- data/vendor/depot_tools/bootstrap/virtualenv/docs/reference.rst +0 -256
- data/vendor/depot_tools/bootstrap/virtualenv/docs/userguide.rst +0 -249
- data/vendor/depot_tools/bootstrap/virtualenv/scripts/virtualenv +0 -3
- data/vendor/depot_tools/bootstrap/virtualenv/setup.py +0 -111
- data/vendor/depot_tools/bootstrap/virtualenv/tests/test_activate.sh +0 -94
- data/vendor/depot_tools/bootstrap/virtualenv/tests/test_activate_expected.output +0 -2
- data/vendor/depot_tools/bootstrap/virtualenv/tests/test_virtualenv.py +0 -139
- data/vendor/depot_tools/bootstrap/virtualenv/tests/tox.ini +0 -12
- data/vendor/depot_tools/bootstrap/virtualenv/tox.ini +0 -17
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv.py +0 -2367
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate.bat +0 -26
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate.csh +0 -42
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate.fish +0 -74
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate.ps1 +0 -150
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate.sh +0 -80
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate_this.py +0 -34
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/deactivate.bat +0 -20
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/distutils-init.py +0 -101
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/distutils.cfg +0 -6
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/site.py +0 -758
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_support/pip-6.0-py2.py3-none-any.whl +0 -0
- data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_support/setuptools-8.2.1-py2.py3-none-any.whl +0 -0
- data/vendor/depot_tools/bootstrap/win/README.google +0 -16
- data/vendor/depot_tools/cbuildbot +0 -96
- data/vendor/depot_tools/chrome_set_ver +0 -96
- data/vendor/depot_tools/cros +0 -96
- data/vendor/depot_tools/cros_sdk +0 -96
- data/vendor/depot_tools/git-cl-upload-hook +0 -52
- data/vendor/depot_tools/git-crup +0 -45
- data/vendor/depot_tools/python_git_runner.sh +0 -36
- data/vendor/depot_tools/recipes/blink.py +0 -59
- data/vendor/depot_tools/third_party/cq_client/test/validate_config_test.py +0 -52
- data/vendor/depot_tools/third_party/cq_client/validate_config.py +0 -108
- data/vendor/depot_tools/win_toolchain/toolchain2013.py +0 -494
@@ -11,7 +11,21 @@ then
|
|
11
11
|
exit
|
12
12
|
fi
|
13
13
|
|
14
|
-
# Test if this script is running under a
|
14
|
+
# Test if this script is running under a MSYS install. This is likely an error
|
15
|
+
# if it is, so we warn the user accordingly.
|
16
|
+
OUTPUT="$(uname | grep 'MSYS')"
|
17
|
+
MSYS=$?
|
18
|
+
if [ $MSYS = 0 ]; then
|
19
|
+
echo 'WARNING: It looks like you are running these tools from an MSYS shell'
|
20
|
+
echo '(as opposed to a MinGW shell). This shell is not supported and may'
|
21
|
+
echo 'fail in mysterious ways.'
|
22
|
+
echo
|
23
|
+
echo 'To run the supported MinGW shell, use `git bash`, or use `bin/bash.exe`'
|
24
|
+
echo 'in your MinGW installation, as opposed to `usr/bin/bash.exe`.'
|
25
|
+
echo
|
26
|
+
fi
|
27
|
+
|
28
|
+
# Test if this script is running under a MinGW install. If it is, we will
|
15
29
|
# hardcode the paths to SVN and Git where possible.
|
16
30
|
OUTPUT="$(uname | grep 'MINGW')"
|
17
31
|
MINGW=$?
|
@@ -25,11 +39,19 @@ else
|
|
25
39
|
fi
|
26
40
|
fi
|
27
41
|
|
28
|
-
#
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
42
|
+
# We want to update the bundled tools even under MinGW.
|
43
|
+
if [ $MINGW = 0 ]; then
|
44
|
+
$COMSPEC /c `cygpath -w "$base_dir/bootstrap/win/win_tools.bat"`
|
45
|
+
case $? in
|
46
|
+
123)
|
47
|
+
# msys environment was upgraded, need to quit.
|
48
|
+
exit 123
|
49
|
+
;;
|
50
|
+
0)
|
51
|
+
;;
|
52
|
+
*)
|
53
|
+
exit $?
|
54
|
+
esac
|
33
55
|
fi
|
34
56
|
|
35
57
|
CANONICAL_GIT_URL="https://chromium.googlesource.com/chromium/tools/depot_tools.git"
|
@@ -152,8 +174,4 @@ then
|
|
152
174
|
fi
|
153
175
|
fi
|
154
176
|
|
155
|
-
find "$base_dir" -iname "*.pyc" -exec rm {} \;
|
156
|
-
|
157
|
-
# Initialize/update virtualenv.
|
158
|
-
cd $base_dir
|
159
|
-
python -u ./bootstrap/bootstrap.py --deps_file bootstrap/deps.pyl --quiet ENV
|
177
|
+
find "$base_dir" -iname "*.pyc" -exec rm -f {} \;
|
@@ -10,13 +10,13 @@ setlocal
|
|
10
10
|
:: Windows freaks out if a file is overwritten while it's being executed. Copy
|
11
11
|
:: this script off to a temporary location and reinvoke from there before
|
12
12
|
:: running any svn or git commands.
|
13
|
-
IF %~nx0==update_depot_tools.bat (
|
14
|
-
COPY /Y %~dp0update_depot_tools.bat %TEMP%\update_depot_tools_tmp.bat >nul
|
13
|
+
IF "%~nx0"=="update_depot_tools.bat" (
|
14
|
+
COPY /Y "%~dp0update_depot_tools.bat" "%TEMP%\update_depot_tools_tmp.bat" >nul
|
15
15
|
if errorlevel 1 goto :EOF
|
16
|
-
%TEMP%\update_depot_tools_tmp.bat %~dp0 %*
|
16
|
+
"%TEMP%\update_depot_tools_tmp.bat" "%~dp0" %*
|
17
17
|
)
|
18
18
|
|
19
|
-
set DEPOT_TOOLS_DIR
|
19
|
+
set DEPOT_TOOLS_DIR=%~1
|
20
20
|
SHIFT
|
21
21
|
|
22
22
|
set GIT_URL=https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
@@ -27,11 +27,6 @@ if errorlevel 1 goto :EOF
|
|
27
27
|
:: Now clear errorlevel so it can be set by other programs later.
|
28
28
|
set errorlevel=
|
29
29
|
|
30
|
-
:: Initialize/update virtualenv.
|
31
|
-
cd /d "%DEPOT_TOOLS_DIR%."
|
32
|
-
python -u bootstrap\bootstrap.py --deps_file bootstrap\deps.pyl --quiet ENV
|
33
|
-
if errorlevel 1 goto :EOF
|
34
|
-
|
35
30
|
:: Shall skip automatic update?
|
36
31
|
IF "%DEPOT_TOOLS_UPDATE%" == "0" GOTO :EOF
|
37
32
|
|
@@ -12,6 +12,7 @@ import Queue
|
|
12
12
|
import re
|
13
13
|
import stat
|
14
14
|
import sys
|
15
|
+
import tarfile
|
15
16
|
import threading
|
16
17
|
import time
|
17
18
|
|
@@ -75,7 +76,7 @@ def _upload_worker(
|
|
75
76
|
file_url = '%s/%s' % (base_url, sha1_sum)
|
76
77
|
if gsutil.check_call('ls', file_url)[0] == 0 and not force:
|
77
78
|
# File exists, check MD5 hash.
|
78
|
-
_, out, _ = gsutil.
|
79
|
+
_, out, _ = gsutil.check_call_with_retries('ls', '-L', file_url)
|
79
80
|
etag_match = re.search('ETag:\s+([a-z0-9]{32})', out)
|
80
81
|
if etag_match:
|
81
82
|
remote_md5 = etag_match.group(1)
|
@@ -96,7 +97,7 @@ def _upload_worker(
|
|
96
97
|
if gzip:
|
97
98
|
gsutil_args.extend(['-z', gzip])
|
98
99
|
gsutil_args.extend([filename, file_url])
|
99
|
-
code, _, err = gsutil.
|
100
|
+
code, _, err = gsutil.check_call_with_retries(*gsutil_args)
|
100
101
|
if code != 0:
|
101
102
|
ret_codes.put(
|
102
103
|
(code,
|
@@ -108,9 +109,9 @@ def _upload_worker(
|
|
108
109
|
# the download script will check for to preserve the executable bit.
|
109
110
|
if not sys.platform.startswith('win'):
|
110
111
|
if os.stat(filename).st_mode & stat.S_IEXEC:
|
111
|
-
code, _, err = gsutil.
|
112
|
-
|
113
|
-
if code:
|
112
|
+
code, _, err = gsutil.check_call_with_retries(
|
113
|
+
'setmeta', '-h', 'x-goog-meta-executable:1', file_url)
|
114
|
+
if not code:
|
114
115
|
ret_codes.put(
|
115
116
|
(code,
|
116
117
|
'Encountered error on setting metadata on %s\n%s' %
|
@@ -207,11 +208,38 @@ def upload_to_google_storage(
|
|
207
208
|
return max_ret_code
|
208
209
|
|
209
210
|
|
211
|
+
def create_archives(dirs):
|
212
|
+
archive_names = []
|
213
|
+
for name in dirs:
|
214
|
+
tarname = '%s.tar.gz' % name
|
215
|
+
with tarfile.open(tarname, 'w:gz') as tar:
|
216
|
+
tar.add(name)
|
217
|
+
archive_names.append(tarname)
|
218
|
+
return archive_names
|
219
|
+
|
220
|
+
|
221
|
+
def validate_archive_dirs(dirs):
|
222
|
+
# We don't allow .. in paths in our archives.
|
223
|
+
if any(map(lambda x: '..' in x, dirs)):
|
224
|
+
return False
|
225
|
+
# We only allow dirs.
|
226
|
+
if any(map(lambda x: not os.path.isdir(x), dirs)):
|
227
|
+
return False
|
228
|
+
# We don't allow sym links in our archives.
|
229
|
+
if any(map(os.path.islink, dirs)):
|
230
|
+
return False
|
231
|
+
# We required that the subdirectories we are archiving are all just below
|
232
|
+
# cwd.
|
233
|
+
return not any(map(lambda x: x not in next(os.walk('.'))[1], dirs))
|
234
|
+
|
235
|
+
|
210
236
|
def main():
|
211
237
|
parser = optparse.OptionParser(USAGE_STRING)
|
212
238
|
parser.add_option('-b', '--bucket',
|
213
239
|
help='Google Storage bucket to upload to.')
|
214
240
|
parser.add_option('-e', '--boto', help='Specify a custom boto file.')
|
241
|
+
parser.add_option('-a', '--archive', action='store_true',
|
242
|
+
help='Archive directory as a tar.gz file')
|
215
243
|
parser.add_option('-f', '--force', action='store_true',
|
216
244
|
help='Force upload even if remote file exists.')
|
217
245
|
parser.add_option('-g', '--gsutil_path', default=GSUTIL_DEFAULT_PATH,
|
@@ -235,6 +263,15 @@ def main():
|
|
235
263
|
# Enumerate our inputs.
|
236
264
|
input_filenames = get_targets(args, parser, options.use_null_terminator)
|
237
265
|
|
266
|
+
if options.archive:
|
267
|
+
if not validate_archive_dirs(input_filenames):
|
268
|
+
parser.error('Only directories just below cwd are valid entries when '
|
269
|
+
'using the --archive argument. Entries can not contain .. '
|
270
|
+
' and entries can not be symlinks. Entries was %s' %
|
271
|
+
input_filenames)
|
272
|
+
return 1
|
273
|
+
input_filenames = create_archives(input_filenames)
|
274
|
+
|
238
275
|
# Make sure we can find a working instance of gsutil.
|
239
276
|
if os.path.exists(GSUTIL_DEFAULT_PATH):
|
240
277
|
gsutil = Gsutil(GSUTIL_DEFAULT_PATH, boto_path=options.boto)
|
@@ -30,6 +30,7 @@ import hashlib
|
|
30
30
|
import json
|
31
31
|
import optparse
|
32
32
|
import os
|
33
|
+
import platform
|
33
34
|
import shutil
|
34
35
|
import subprocess
|
35
36
|
import sys
|
@@ -37,6 +38,23 @@ import tempfile
|
|
37
38
|
import time
|
38
39
|
import zipfile
|
39
40
|
|
41
|
+
# winreg isn't natively available under CygWin
|
42
|
+
if sys.platform == "win32":
|
43
|
+
try:
|
44
|
+
import winreg
|
45
|
+
except ImportError:
|
46
|
+
import _winreg as winreg
|
47
|
+
elif sys.platform == "cygwin":
|
48
|
+
try:
|
49
|
+
import cygwinreg as winreg
|
50
|
+
except ImportError:
|
51
|
+
print ''
|
52
|
+
print 'CygWin does not natively support winreg but a replacement exists.'
|
53
|
+
print 'https://pypi.python.org/pypi/cygwinreg/'
|
54
|
+
print ''
|
55
|
+
print 'Try: easy_install cygwinreg'
|
56
|
+
print ''
|
57
|
+
raise
|
40
58
|
|
41
59
|
BASEDIR = os.path.dirname(os.path.abspath(__file__))
|
42
60
|
DEPOT_TOOLS_PATH = os.path.join(BASEDIR, '..')
|
@@ -56,23 +74,32 @@ def GetFileList(root):
|
|
56
74
|
file_list = []
|
57
75
|
for base, _, files in os.walk(root):
|
58
76
|
paths = [os.path.join(base, f) for f in files]
|
59
|
-
|
60
|
-
|
77
|
+
# Ignore WER ReportQueue entries that vctip/cl leave in the bin dir if/when
|
78
|
+
# they crash.
|
79
|
+
file_list.extend(x.lower() for x in paths if 'WER\\ReportQueue' not in x)
|
80
|
+
return sorted(file_list, key=lambda s: s.replace('/', '\\'))
|
61
81
|
|
62
82
|
|
63
|
-
def MakeTimestampsFileName(root):
|
64
|
-
return os.path.join(root,
|
83
|
+
def MakeTimestampsFileName(root, sha1):
|
84
|
+
return os.path.join(root, os.pardir, '%s.timestamps' % sha1)
|
65
85
|
|
66
86
|
|
67
|
-
def CalculateHash(root):
|
87
|
+
def CalculateHash(root, expected_hash):
|
68
88
|
"""Calculates the sha1 of the paths to all files in the given |root| and the
|
69
|
-
contents of those files, and returns as a hex string.
|
70
|
-
file_list = GetFileList(root)
|
89
|
+
contents of those files, and returns as a hex string.
|
71
90
|
|
72
|
-
|
73
|
-
|
91
|
+
|expected_hash| is the expected hash value for this toolchain if it has
|
92
|
+
already been installed.
|
93
|
+
"""
|
94
|
+
if expected_hash:
|
95
|
+
full_root_path = os.path.join(root, expected_hash)
|
96
|
+
else:
|
97
|
+
full_root_path = root
|
98
|
+
file_list = GetFileList(full_root_path)
|
99
|
+
# Check whether we previously saved timestamps in $root/../{sha1}.timestamps.
|
100
|
+
# If we didn't, or they don't match, then do the full calculation, otherwise
|
74
101
|
# return the saved value.
|
75
|
-
timestamps_file = MakeTimestampsFileName(root)
|
102
|
+
timestamps_file = MakeTimestampsFileName(root, expected_hash)
|
76
103
|
timestamps_data = {'files': [], 'sha1': ''}
|
77
104
|
if os.path.exists(timestamps_file):
|
78
105
|
with open(timestamps_file, 'rb') as f:
|
@@ -83,31 +110,53 @@ def CalculateHash(root):
|
|
83
110
|
pass
|
84
111
|
|
85
112
|
matches = len(file_list) == len(timestamps_data['files'])
|
113
|
+
# Don't check the timestamp of the version file as we touch this file to
|
114
|
+
# indicates which versions of the toolchain are still being used.
|
115
|
+
vc_dir = os.path.join(full_root_path, 'VC').lower()
|
86
116
|
if matches:
|
87
117
|
for disk, cached in zip(file_list, timestamps_data['files']):
|
88
|
-
if disk != cached[0] or
|
118
|
+
if disk != cached[0] or (
|
119
|
+
disk != vc_dir and os.path.getmtime(disk) != cached[1]):
|
89
120
|
matches = False
|
90
121
|
break
|
91
122
|
if matches:
|
92
123
|
return timestamps_data['sha1']
|
93
124
|
|
125
|
+
# Make long hangs when updating the toolchain less mysterious.
|
126
|
+
print 'Calculating hash of toolchain in %s. Please wait...' % full_root_path
|
127
|
+
sys.stdout.flush()
|
94
128
|
digest = hashlib.sha1()
|
95
129
|
for path in file_list:
|
96
|
-
|
130
|
+
path_without_hash = str(path).replace('/', '\\')
|
131
|
+
if expected_hash:
|
132
|
+
path_without_hash = path_without_hash.replace(
|
133
|
+
os.path.join(root, expected_hash).replace('/', '\\'), root)
|
134
|
+
digest.update(path_without_hash)
|
97
135
|
with open(path, 'rb') as f:
|
98
136
|
digest.update(f.read())
|
99
137
|
return digest.hexdigest()
|
100
138
|
|
101
139
|
|
140
|
+
def CalculateToolchainHashes(root):
|
141
|
+
"""Calculate the hash of the different toolchains installed in the |root|
|
142
|
+
directory."""
|
143
|
+
hashes = []
|
144
|
+
dir_list = [
|
145
|
+
d for d in os.listdir(root) if os.path.isdir(os.path.join(root, d))]
|
146
|
+
for d in dir_list:
|
147
|
+
hashes.append(CalculateHash(root, d))
|
148
|
+
return hashes
|
149
|
+
|
150
|
+
|
102
151
|
def SaveTimestampsAndHash(root, sha1):
|
103
152
|
"""Saves timestamps and the final hash to be able to early-out more quickly
|
104
153
|
next time."""
|
105
|
-
file_list = GetFileList(root)
|
154
|
+
file_list = GetFileList(os.path.join(root, sha1))
|
106
155
|
timestamps_data = {
|
107
|
-
'files': [[f, os.
|
156
|
+
'files': [[f, os.path.getmtime(f)] for f in file_list],
|
108
157
|
'sha1': sha1,
|
109
158
|
}
|
110
|
-
with open(MakeTimestampsFileName(root), 'wb') as f:
|
159
|
+
with open(MakeTimestampsFileName(root, sha1), 'wb') as f:
|
111
160
|
json.dump(timestamps_data, f)
|
112
161
|
|
113
162
|
|
@@ -203,7 +252,12 @@ def DoTreeMirror(target_dir, tree_sha1):
|
|
203
252
|
"""In order to save temporary space on bots that do not have enough space to
|
204
253
|
download ISOs, unpack them, and copy to the target location, the whole tree
|
205
254
|
is uploaded as a zip to internal storage, and then mirrored here."""
|
206
|
-
|
255
|
+
use_local_zip = bool(int(os.environ.get('USE_LOCAL_ZIP', 0)))
|
256
|
+
if use_local_zip:
|
257
|
+
temp_dir = None
|
258
|
+
local_zip = tree_sha1 + '.zip'
|
259
|
+
else:
|
260
|
+
temp_dir, local_zip = DownloadUsingGsutil(tree_sha1 + '.zip')
|
207
261
|
sys.stdout.write('Extracting %s...\n' % local_zip)
|
208
262
|
sys.stdout.flush()
|
209
263
|
with zipfile.ZipFile(local_zip, 'r', zipfile.ZIP_DEFLATED, True) as zf:
|
@@ -212,15 +266,129 @@ def DoTreeMirror(target_dir, tree_sha1):
|
|
212
266
|
RmDir(temp_dir)
|
213
267
|
|
214
268
|
|
215
|
-
def
|
216
|
-
|
217
|
-
|
269
|
+
def RemoveToolchain(root, sha1, delay_before_removing):
|
270
|
+
"""Remove the |sha1| version of the toolchain from |root|."""
|
271
|
+
toolchain_target_dir = os.path.join(root, sha1)
|
272
|
+
if delay_before_removing:
|
273
|
+
DelayBeforeRemoving(toolchain_target_dir)
|
274
|
+
if sys.platform == 'win32':
|
275
|
+
# These stay resident and will make the rmdir below fail.
|
276
|
+
kill_list = [
|
277
|
+
'mspdbsrv.exe',
|
278
|
+
'vctip.exe', # Compiler and tools experience improvement data uploader.
|
279
|
+
]
|
280
|
+
for process_name in kill_list:
|
281
|
+
with open(os.devnull, 'wb') as nul:
|
282
|
+
subprocess.call(['taskkill', '/f', '/im', process_name],
|
283
|
+
stdin=nul, stdout=nul, stderr=nul)
|
284
|
+
if os.path.isdir(toolchain_target_dir):
|
285
|
+
RmDir(toolchain_target_dir)
|
286
|
+
|
287
|
+
timestamp_file = MakeTimestampsFileName(root, sha1)
|
288
|
+
if os.path.exists(timestamp_file):
|
289
|
+
os.remove(timestamp_file)
|
290
|
+
|
291
|
+
|
292
|
+
def RemoveUnusedToolchains(root):
|
293
|
+
"""Remove the versions of the toolchain that haven't been used recently."""
|
294
|
+
valid_toolchains = []
|
295
|
+
dirs_to_remove = []
|
296
|
+
|
297
|
+
for d in os.listdir(root):
|
298
|
+
full_path = os.path.join(root, d)
|
299
|
+
if os.path.isdir(full_path):
|
300
|
+
if not os.path.exists(MakeTimestampsFileName(root, d)):
|
301
|
+
dirs_to_remove.append(d)
|
302
|
+
else:
|
303
|
+
vc_dir = os.path.join(full_path, 'VC')
|
304
|
+
valid_toolchains.append((os.path.getmtime(vc_dir), d))
|
305
|
+
elif os.path.isfile(full_path):
|
306
|
+
os.remove(full_path)
|
307
|
+
|
308
|
+
for d in dirs_to_remove:
|
309
|
+
print ('Removing %s as it doesn\'t correspond to any known toolchain.' %
|
310
|
+
os.path.join(root, d))
|
311
|
+
# Use the RemoveToolchain function to remove these directories as they might
|
312
|
+
# contain an older version of the toolchain.
|
313
|
+
RemoveToolchain(root, d, False)
|
314
|
+
|
315
|
+
# Remove the versions of the toolchains that haven't been used in the past 30
|
316
|
+
# days.
|
317
|
+
toolchain_expiration_time = 60 * 60 * 24 * 30
|
318
|
+
for toolchain in valid_toolchains:
|
319
|
+
toolchain_age_in_sec = time.time() - toolchain[0]
|
320
|
+
if toolchain_age_in_sec > toolchain_expiration_time:
|
321
|
+
print ('Removing version %s of the Win toolchain has it hasn\'t been used'
|
322
|
+
' in the past %d days.' % (toolchain[1],
|
323
|
+
toolchain_age_in_sec / 60 / 60 / 24))
|
324
|
+
RemoveToolchain(root, toolchain[1], True)
|
325
|
+
|
326
|
+
|
327
|
+
def GetInstallerName():
|
328
|
+
"""Return the name of the Windows 10 Universal C Runtime installer for the
|
329
|
+
current platform, or None if installer is not needed or not applicable.
|
330
|
+
The registry has to be used instead of sys.getwindowsversion() because
|
331
|
+
Python 2.7 is only manifested as being compatible up to Windows 8, so the
|
332
|
+
version APIs helpfully return a maximum of 6.2 (Windows 8).
|
333
|
+
"""
|
334
|
+
key_name = r'Software\Microsoft\Windows NT\CurrentVersion'
|
335
|
+
key = winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, key_name)
|
336
|
+
value, keytype = winreg.QueryValueEx(key, "CurrentVersion")
|
337
|
+
key.Close()
|
338
|
+
if keytype != winreg.REG_SZ:
|
339
|
+
raise Exception("Unexpected type in registry")
|
340
|
+
if value == '6.1':
|
341
|
+
# Windows 7 and Windows Server 2008 R2
|
342
|
+
return 'Windows6.1-KB2999226-x64.msu'
|
343
|
+
elif value == '6.2':
|
344
|
+
# Windows 8 and Windows Server 2012
|
345
|
+
return 'Windows8-RT-KB2999226-x64.msu'
|
346
|
+
elif value == '6.3':
|
347
|
+
# Windows 8.1, Windows Server 2012 R2, and Windows 10.
|
348
|
+
# The Windows 8.1 installer doesn't work on Windows 10, but it will never
|
349
|
+
# be used because the UCRT is always installed on Windows 10.
|
350
|
+
return 'Windows8.1-KB2999226-x64.msu'
|
351
|
+
else:
|
352
|
+
# Some future OS.
|
353
|
+
return None
|
354
|
+
|
218
355
|
|
356
|
+
def InstallUniversalCRTIfNeeded(abs_target_dir):
|
357
|
+
return
|
358
|
+
|
359
|
+
|
360
|
+
def EnableCrashDumpCollection():
|
361
|
+
"""Tell Windows Error Reporting to record crash dumps so that we can diagnose
|
362
|
+
linker crashes and other toolchain failures. Documented at:
|
363
|
+
https://msdn.microsoft.com/en-us/library/windows/desktop/bb787181.aspx
|
364
|
+
"""
|
365
|
+
if sys.platform == 'win32' and os.environ.get('CHROME_HEADLESS') == '1':
|
366
|
+
key_name = r'SOFTWARE\Microsoft\Windows\Windows Error Reporting'
|
367
|
+
try:
|
368
|
+
key = winreg.CreateKey(winreg.HKEY_LOCAL_MACHINE, key_name)
|
369
|
+
# Merely creating LocalDumps is sufficient to enable the defaults.
|
370
|
+
winreg.CreateKey(key, "LocalDumps")
|
371
|
+
# Disable the WER UI, as documented here:
|
372
|
+
# https://msdn.microsoft.com/en-us/library/windows/desktop/bb513638.aspx
|
373
|
+
winreg.SetValueEx(key, "DontShowUI", 0, winreg.REG_DWORD, 1)
|
374
|
+
# Trap OSError instead of WindowsError so pylint will succeed on Linux.
|
375
|
+
# Catching errors is important because some build machines are not elevated
|
376
|
+
# and writing to HKLM requires elevation.
|
377
|
+
except OSError:
|
378
|
+
pass
|
379
|
+
|
380
|
+
|
381
|
+
def main():
|
219
382
|
parser = optparse.OptionParser(description=sys.modules[__name__].__doc__)
|
220
383
|
parser.add_option('--output-json', metavar='FILE',
|
221
384
|
help='write information about toolchain to FILE')
|
385
|
+
parser.add_option('--force', action='store_true',
|
386
|
+
help='force script to run on non-Windows hosts')
|
222
387
|
options, args = parser.parse_args()
|
223
388
|
|
389
|
+
if not (sys.platform.startswith(('cygwin', 'win32')) or options.force):
|
390
|
+
return 0
|
391
|
+
|
224
392
|
if sys.platform == 'cygwin':
|
225
393
|
# This script requires Windows Python, so invoke with depot_tools' Python.
|
226
394
|
def winpath(path):
|
@@ -233,10 +401,9 @@ def main():
|
|
233
401
|
sys.exit(subprocess.call(cmd))
|
234
402
|
assert sys.platform != 'cygwin'
|
235
403
|
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
sys.exit('Desired hashes are required.')
|
404
|
+
if len(args) == 0:
|
405
|
+
sys.exit('Desired hash is required.')
|
406
|
+
desired_hash = args[0]
|
240
407
|
|
241
408
|
# Move to depot_tools\win_toolchain where we'll store our files, and where
|
242
409
|
# the downloader script is.
|
@@ -246,7 +413,11 @@ def main():
|
|
246
413
|
target_dir = os.path.normpath(os.path.join(toolchain_dir, 'vs_files'))
|
247
414
|
else:
|
248
415
|
target_dir = os.path.normpath(os.path.join(toolchain_dir, 'vs2013_files'))
|
249
|
-
|
416
|
+
if not os.path.isdir(target_dir):
|
417
|
+
os.mkdir(target_dir)
|
418
|
+
toolchain_target_dir = os.path.join(target_dir, desired_hash)
|
419
|
+
|
420
|
+
abs_toolchain_target_dir = os.path.abspath(toolchain_target_dir)
|
250
421
|
|
251
422
|
got_new_toolchain = False
|
252
423
|
|
@@ -254,8 +425,8 @@ def main():
|
|
254
425
|
# Typically this script is only run when the .sha1 one file is updated, but
|
255
426
|
# directly calling "gclient runhooks" will also run it, so we cache
|
256
427
|
# based on timestamps to make that case fast.
|
257
|
-
|
258
|
-
if
|
428
|
+
current_hashes = CalculateToolchainHashes(target_dir)
|
429
|
+
if desired_hash not in current_hashes:
|
259
430
|
should_use_gs = False
|
260
431
|
if (HaveSrcInternalAccess() or
|
261
432
|
LooksLikeGoogler() or
|
@@ -264,66 +435,70 @@ def main():
|
|
264
435
|
if not CanAccessToolchainBucket():
|
265
436
|
RequestGsAuthentication()
|
266
437
|
if not should_use_gs:
|
267
|
-
print('
|
268
|
-
'
|
269
|
-
'build-instructions-windows')
|
438
|
+
print('\n\n\nPlease follow the instructions at '
|
439
|
+
'https://www.chromium.org/developers/how-tos/'
|
440
|
+
'build-instructions-windows\n\n')
|
270
441
|
return 1
|
271
442
|
print('Windows toolchain out of date or doesn\'t exist, updating (Pro)...')
|
272
|
-
print('
|
273
|
-
print('
|
443
|
+
print(' current_hashes: %s' % ', '.join(current_hashes))
|
444
|
+
print(' desired_hash: %s' % desired_hash)
|
274
445
|
sys.stdout.flush()
|
275
|
-
DelayBeforeRemoving(target_dir)
|
276
|
-
if sys.platform == 'win32':
|
277
|
-
# This stays resident and will make the rmdir below fail.
|
278
|
-
with open(os.devnull, 'wb') as nul:
|
279
|
-
subprocess.call(['taskkill', '/f', '/im', 'mspdbsrv.exe'],
|
280
|
-
stdin=nul, stdout=nul, stderr=nul)
|
281
|
-
if os.path.isdir(target_dir):
|
282
|
-
RmDir(target_dir)
|
283
446
|
|
284
|
-
DoTreeMirror(
|
447
|
+
DoTreeMirror(toolchain_target_dir, desired_hash)
|
285
448
|
|
286
449
|
got_new_toolchain = True
|
287
450
|
|
288
|
-
win_sdk = os.path.join(
|
451
|
+
win_sdk = os.path.join(abs_toolchain_target_dir, 'win_sdk')
|
289
452
|
try:
|
290
|
-
|
453
|
+
version_file = os.path.join(toolchain_target_dir, 'VS_VERSION')
|
454
|
+
vc_dir = os.path.join(toolchain_target_dir, 'VC')
|
455
|
+
with open(version_file, 'rb') as f:
|
291
456
|
vs_version = f.read().strip()
|
457
|
+
# Touch the VC directory so we can use its timestamp to know when this
|
458
|
+
# version of the toolchain has been used for the last time.
|
459
|
+
os.utime(vc_dir, None)
|
292
460
|
except IOError:
|
293
461
|
# Older toolchains didn't have the VS_VERSION file, and used 'win8sdk'
|
294
462
|
# instead of just 'win_sdk'.
|
295
463
|
vs_version = '2013'
|
296
|
-
win_sdk = os.path.join(
|
464
|
+
win_sdk = os.path.join(abs_toolchain_target_dir, 'win8sdk')
|
297
465
|
|
298
466
|
data = {
|
299
|
-
'path':
|
467
|
+
'path': abs_toolchain_target_dir,
|
300
468
|
'version': vs_version,
|
301
469
|
'win_sdk': win_sdk,
|
302
470
|
# Added for backwards compatibility with old toolchain packages.
|
303
471
|
'win8sdk': win_sdk,
|
304
|
-
'wdk': os.path.join(
|
472
|
+
'wdk': os.path.join(abs_toolchain_target_dir, 'wdk'),
|
305
473
|
'runtime_dirs': [
|
306
|
-
os.path.join(
|
307
|
-
os.path.join(
|
474
|
+
os.path.join(abs_toolchain_target_dir, 'sys64'),
|
475
|
+
os.path.join(abs_toolchain_target_dir, 'sys32'),
|
308
476
|
],
|
309
477
|
}
|
310
478
|
with open(os.path.join(target_dir, '..', 'data.json'), 'w') as f:
|
311
479
|
json.dump(data, f)
|
312
480
|
|
313
481
|
if got_new_toolchain:
|
314
|
-
|
315
|
-
if
|
482
|
+
current_hashes = CalculateToolchainHashes(target_dir)
|
483
|
+
if desired_hash not in current_hashes:
|
316
484
|
print >> sys.stderr, (
|
317
485
|
'Got wrong hash after pulling a new toolchain. '
|
318
|
-
'Wanted
|
319
|
-
', '.join(
|
486
|
+
'Wanted \'%s\', got one of \'%s\'.' % (
|
487
|
+
desired_hash, ', '.join(current_hashes)))
|
320
488
|
return 1
|
321
|
-
SaveTimestampsAndHash(target_dir,
|
489
|
+
SaveTimestampsAndHash(target_dir, desired_hash)
|
322
490
|
|
323
491
|
if options.output_json:
|
324
492
|
shutil.copyfile(os.path.join(target_dir, '..', 'data.json'),
|
325
493
|
options.output_json)
|
326
494
|
|
495
|
+
EnableCrashDumpCollection()
|
496
|
+
|
497
|
+
if os.environ.get('GYP_MSVS_VERSION') == '2015':
|
498
|
+
InstallUniversalCRTIfNeeded(abs_toolchain_target_dir)
|
499
|
+
|
500
|
+
RemoveUnusedToolchains(target_dir)
|
501
|
+
|
327
502
|
return 0
|
328
503
|
|
329
504
|
|