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.
Files changed (332) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +45 -19
  3. data/CHANGELOG.md +14 -0
  4. data/README.md +30 -15
  5. data/Rakefile +7 -6
  6. data/ext/libv8/arch.rb +5 -4
  7. data/ext/libv8/builder.rb +25 -19
  8. data/ext/libv8/compiler.rb +6 -33
  9. data/ext/libv8/location.rb +7 -8
  10. data/lib/libv8/version.rb +1 -1
  11. data/libv8.gemspec +1 -1
  12. data/patches/build-standalone-static-library.patch +14 -0
  13. data/patches/disable-building-tests.patch +48 -10
  14. data/patches/fPIC-for-static.patch +3 -3
  15. data/release/x86-linux/Vagrantfile +8 -4
  16. data/release/x86_64-freebsd10/Vagrantfile +86 -0
  17. data/release/x86_64-linux/Vagrantfile +8 -4
  18. data/spec/compiler_spec.rb +5 -29
  19. data/spec/support/compiler_helpers.rb +2 -4
  20. data/vendor/depot_tools/.gitignore +15 -3
  21. data/vendor/depot_tools/OWNERS +2 -2
  22. data/vendor/depot_tools/PRESUBMIT.py +4 -2
  23. data/vendor/depot_tools/WATCHLISTS +6 -0
  24. data/vendor/depot_tools/apply_issue.py +70 -38
  25. data/vendor/depot_tools/bootstrap/win/README.md +66 -0
  26. data/vendor/depot_tools/bootstrap/win/git-bash.template.sh +12 -0
  27. data/vendor/depot_tools/bootstrap/win/git.template.bat +5 -0
  28. data/vendor/depot_tools/bootstrap/win/profile.d.python.sh +20 -0
  29. data/vendor/depot_tools/bootstrap/win/win_tools.bat +96 -45
  30. data/vendor/depot_tools/breakpad.py +6 -141
  31. data/vendor/depot_tools/buildbucket.py +45 -31
  32. data/vendor/depot_tools/cbuildbot +1 -0
  33. data/vendor/depot_tools/checkout.py +2 -1
  34. data/vendor/depot_tools/chrome_set_ver +1 -0
  35. data/vendor/depot_tools/cit +8 -0
  36. data/vendor/depot_tools/cit.bat +11 -0
  37. data/vendor/depot_tools/cit.py +120 -0
  38. data/vendor/depot_tools/codereview.settings +0 -2
  39. data/vendor/depot_tools/commit_queue +1 -5
  40. data/vendor/depot_tools/commit_queue.bat +1 -4
  41. data/vendor/depot_tools/commit_queue.py +78 -29
  42. data/vendor/depot_tools/cpplint.py +22 -14
  43. data/vendor/depot_tools/cros +1 -0
  44. data/vendor/depot_tools/cros_sdk +1 -0
  45. data/vendor/depot_tools/depot-tools-auth.py +3 -3
  46. data/vendor/depot_tools/download_from_google_storage.py +101 -21
  47. data/vendor/depot_tools/drover.py +2 -3
  48. data/vendor/depot_tools/fetch.py +31 -27
  49. data/vendor/depot_tools/{recipes → fetch_configs}/android.py +4 -4
  50. data/vendor/depot_tools/fetch_configs/breakpad.py +45 -0
  51. data/vendor/depot_tools/{recipes → fetch_configs}/chromium.py +3 -3
  52. data/vendor/depot_tools/{recipes/recipe_util.py → fetch_configs/config_util.py} +3 -3
  53. data/vendor/depot_tools/fetch_configs/crashpad.py +41 -0
  54. data/vendor/depot_tools/{recipes → fetch_configs}/dart.py +3 -3
  55. data/vendor/depot_tools/{recipes/pdfium.py → fetch_configs/dartino.py} +14 -13
  56. data/vendor/depot_tools/{recipes → fetch_configs}/dartium.py +3 -3
  57. data/vendor/depot_tools/{recipes → fetch_configs}/depot_tools.py +3 -3
  58. data/vendor/depot_tools/fetch_configs/gyp.py +42 -0
  59. data/vendor/depot_tools/{recipes → fetch_configs}/infra.py +3 -3
  60. data/vendor/depot_tools/{recipes → fetch_configs}/infra_internal.py +3 -3
  61. data/vendor/depot_tools/{recipes → fetch_configs}/ios.py +4 -4
  62. data/vendor/depot_tools/{recipes → fetch_configs}/mojo.py +3 -3
  63. data/vendor/depot_tools/{recipes → fetch_configs}/nacl.py +3 -3
  64. data/vendor/depot_tools/{recipes → fetch_configs}/naclports.py +3 -3
  65. data/vendor/depot_tools/fetch_configs/pdfium.py +40 -0
  66. data/vendor/depot_tools/{recipes → fetch_configs}/skia.py +3 -3
  67. data/vendor/depot_tools/{recipes → fetch_configs}/skia_buildbot.py +3 -3
  68. data/vendor/depot_tools/fetch_configs/syzygy.py +41 -0
  69. data/vendor/depot_tools/{recipes → fetch_configs}/v8.py +3 -3
  70. data/vendor/depot_tools/{recipes → fetch_configs}/webrtc.py +3 -3
  71. data/vendor/depot_tools/{recipes → fetch_configs}/webrtc_android.py +4 -4
  72. data/vendor/depot_tools/{recipes → fetch_configs}/webrtc_ios.py +4 -4
  73. data/vendor/depot_tools/fix_encoding.py +6 -6
  74. data/vendor/depot_tools/gcl.py +11 -21
  75. data/vendor/depot_tools/gclient +10 -0
  76. data/vendor/depot_tools/gclient-new-workdir.py +7 -38
  77. data/vendor/depot_tools/gclient.bat +2 -2
  78. data/vendor/depot_tools/gclient.py +85 -65
  79. data/vendor/depot_tools/gclient_scm.py +83 -10
  80. data/vendor/depot_tools/gclient_utils.py +5 -1
  81. data/vendor/depot_tools/gerrit_util.py +243 -26
  82. data/vendor/depot_tools/git-auto-svn +1 -1
  83. data/vendor/depot_tools/git-cache +1 -1
  84. data/vendor/depot_tools/git-cherry-pick-upload +1 -1
  85. data/vendor/depot_tools/git-cl +1 -1
  86. data/vendor/depot_tools/git-drover +6 -0
  87. data/vendor/depot_tools/git-find-releases +6 -0
  88. data/vendor/depot_tools/git-footers +1 -1
  89. data/vendor/depot_tools/git-freeze +1 -1
  90. data/vendor/depot_tools/git-gs +1 -1
  91. data/vendor/depot_tools/git-hyper-blame +6 -0
  92. data/vendor/depot_tools/git-map +1 -1
  93. data/vendor/depot_tools/git-map-branches +1 -1
  94. data/vendor/depot_tools/git-mark-merge-base +1 -1
  95. data/vendor/depot_tools/git-nav-downstream +1 -1
  96. data/vendor/depot_tools/git-new-branch +1 -1
  97. data/vendor/depot_tools/git-number +1 -1
  98. data/vendor/depot_tools/git-rebase-update +1 -1
  99. data/vendor/depot_tools/git-rename-branch +1 -1
  100. data/vendor/depot_tools/git-reparent-branch +1 -1
  101. data/vendor/depot_tools/git-retry +1 -1
  102. data/vendor/depot_tools/git-squash-branch +1 -1
  103. data/vendor/depot_tools/git-thaw +1 -1
  104. data/vendor/depot_tools/git-try +1 -1
  105. data/vendor/depot_tools/git-upstream-diff +1 -1
  106. data/vendor/depot_tools/git_auto_svn.py +24 -6
  107. data/vendor/depot_tools/git_cache.py +74 -27
  108. data/vendor/depot_tools/git_cl.py +2118 -747
  109. data/vendor/depot_tools/git_common.py +100 -6
  110. data/vendor/depot_tools/git_dates.py +62 -0
  111. data/vendor/depot_tools/git_drover.py +424 -0
  112. data/vendor/depot_tools/git_find_releases.py +65 -0
  113. data/vendor/depot_tools/git_footers.py +42 -0
  114. data/vendor/depot_tools/git_hyper_blame.py +391 -0
  115. data/vendor/depot_tools/git_map_branches.py +8 -6
  116. data/vendor/depot_tools/git_new_branch.py +6 -1
  117. data/vendor/depot_tools/git_rebase_update.py +56 -16
  118. data/vendor/depot_tools/git_reparent_branch.py +13 -0
  119. data/vendor/depot_tools/git_try.py +0 -2
  120. data/vendor/depot_tools/gsutil.py +51 -20
  121. data/vendor/depot_tools/infra/config/OWNERS +3 -1
  122. data/vendor/depot_tools/infra/config/cq.cfg +7 -3
  123. data/vendor/depot_tools/infra/config/recipes.cfg +9 -0
  124. data/vendor/depot_tools/luci_hacks/README.md +35 -0
  125. data/vendor/depot_tools/{bootstrap/virtualenv/tests → luci_hacks}/__init__.py +0 -0
  126. data/vendor/depot_tools/luci_hacks/luci_recipe_run.isolate +12 -0
  127. data/vendor/depot_tools/luci_hacks/luci_recipe_run.py +81 -0
  128. data/vendor/depot_tools/luci_hacks/trigger_luci_job.py +128 -0
  129. data/vendor/depot_tools/man/html/depot_tools.html +9 -1
  130. data/vendor/depot_tools/man/html/depot_tools_tutorial.html +4 -4
  131. data/vendor/depot_tools/man/html/git-drover.html +191 -35
  132. data/vendor/depot_tools/man/html/git-hyper-blame.html +878 -0
  133. data/vendor/depot_tools/man/html/git-rebase-update.html +9 -4
  134. data/vendor/depot_tools/man/man1/git-drover.1 +189 -36
  135. data/vendor/depot_tools/man/man1/git-hyper-blame.1 +128 -0
  136. data/vendor/depot_tools/man/man1/git-rebase-update.1 +8 -6
  137. data/vendor/depot_tools/man/man7/depot_tools.7 +9 -4
  138. data/vendor/depot_tools/man/src/_git-hyper-blame_desc.helper.txt +1 -0
  139. data/vendor/depot_tools/man/src/common_demo_functions.sh +5 -0
  140. data/vendor/depot_tools/man/src/depot_tools_tutorial.txt +1 -1
  141. data/vendor/depot_tools/man/src/git-drover.demo.1.sh +11 -16
  142. data/vendor/depot_tools/man/src/git-drover.demo.3.sh +27 -0
  143. data/vendor/depot_tools/man/src/git-drover.demo.4.sh +39 -0
  144. data/vendor/depot_tools/man/src/git-drover.txt +49 -3
  145. data/vendor/depot_tools/man/src/git-hyper-blame.demo.1.sh +3 -0
  146. data/vendor/depot_tools/man/src/git-hyper-blame.demo.2.sh +4 -0
  147. data/vendor/depot_tools/man/src/git-hyper-blame.demo.common.sh +57 -0
  148. data/vendor/depot_tools/man/src/git-hyper-blame.txt +85 -0
  149. data/vendor/depot_tools/man/src/git-rebase-update.txt +5 -1
  150. data/vendor/depot_tools/my_activity.py +6 -21
  151. data/vendor/depot_tools/ninja +2 -2
  152. data/vendor/depot_tools/ninja-linux32 +0 -0
  153. data/vendor/depot_tools/ninja-linux64 +0 -0
  154. data/vendor/depot_tools/ninja-mac +0 -0
  155. data/vendor/depot_tools/ninja.exe +0 -0
  156. data/vendor/depot_tools/presubmit_canned_checks.py +83 -69
  157. data/vendor/depot_tools/presubmit_support.py +126 -42
  158. data/vendor/depot_tools/pylint.py +5 -1
  159. data/vendor/depot_tools/python_runner.sh +55 -0
  160. data/vendor/depot_tools/recipe_modules/bot_update/__init__.py +32 -0
  161. data/vendor/depot_tools/recipe_modules/bot_update/api.py +283 -0
  162. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic.json +56 -0
  163. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic_output_manifest.json +63 -0
  164. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/basic_with_branch_heads.json +57 -0
  165. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/clobber.json +44 -0
  166. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/forced.json +57 -0
  167. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/gerrit_no_reset.json +44 -0
  168. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/no_shallow.json +44 -0
  169. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/off.json +43 -0
  170. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/reset_root_solution_revision.json +43 -0
  171. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/svn_mode.json +59 -0
  172. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange.json +58 -0
  173. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/trychange_oauth2.json +60 -0
  174. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob.json +58 -0
  175. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail.json +60 -0
  176. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail_patch.json +81 -0
  177. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_fail_patch_download.json +81 -0
  178. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_gerrit_angle.json +49 -0
  179. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_v8.json +61 -0
  180. data/vendor/depot_tools/recipe_modules/bot_update/example.expected/tryjob_v8_head_by_default.json +51 -0
  181. data/vendor/depot_tools/recipe_modules/bot_update/example.py +172 -0
  182. data/vendor/depot_tools/{bootstrap/virtualenv/virtualenv_support → recipe_modules/bot_update/resources}/__init__.py +0 -0
  183. data/vendor/depot_tools/recipe_modules/bot_update/resources/bot_update.py +1764 -0
  184. data/vendor/depot_tools/recipe_modules/bot_update/test_api.py +86 -0
  185. data/vendor/depot_tools/recipe_modules/depot_tools/__init__.py +3 -0
  186. data/vendor/depot_tools/recipe_modules/depot_tools/api.py +27 -0
  187. data/vendor/depot_tools/recipe_modules/gclient/__init__.py +10 -0
  188. data/vendor/depot_tools/recipe_modules/gclient/api.py +378 -0
  189. data/vendor/depot_tools/recipe_modules/gclient/config.py +671 -0
  190. data/vendor/depot_tools/recipe_modules/gclient/example.expected/basic.json +172 -0
  191. data/vendor/depot_tools/recipe_modules/gclient/example.expected/revision.json +174 -0
  192. data/vendor/depot_tools/recipe_modules/gclient/example.expected/tryserver.json +185 -0
  193. data/vendor/depot_tools/recipe_modules/gclient/example.py +100 -0
  194. data/vendor/depot_tools/recipe_modules/gclient/test_api.py +37 -0
  195. data/vendor/depot_tools/recipe_modules/git/__init__.py +9 -0
  196. data/vendor/depot_tools/recipe_modules/git/api.py +377 -0
  197. data/vendor/depot_tools/recipe_modules/git/example.expected/basic.json +177 -0
  198. data/vendor/depot_tools/recipe_modules/git/example.expected/basic_branch.json +177 -0
  199. data/vendor/depot_tools/recipe_modules/git/example.expected/basic_file_name.json +179 -0
  200. data/vendor/depot_tools/recipe_modules/git/example.expected/basic_hash.json +176 -0
  201. data/vendor/depot_tools/recipe_modules/git/example.expected/basic_ref.json +177 -0
  202. data/vendor/depot_tools/recipe_modules/git/example.expected/basic_submodule_update_force.json +178 -0
  203. data/vendor/depot_tools/recipe_modules/git/example.expected/can_fail_build.json +153 -0
  204. data/vendor/depot_tools/recipe_modules/git/example.expected/cannot_fail_build.json +181 -0
  205. data/vendor/depot_tools/recipe_modules/git/example.expected/cat-file_test.json +199 -0
  206. data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_delta.json +250 -0
  207. data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_failed.json +181 -0
  208. data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_with_bad_output.json +182 -0
  209. data/vendor/depot_tools/recipe_modules/git/example.expected/count-objects_with_bad_output_fails_build.json +102 -0
  210. data/vendor/depot_tools/recipe_modules/git/example.expected/curl_trace_file.json +181 -0
  211. data/vendor/depot_tools/recipe_modules/git/example.expected/platform_win.json +186 -0
  212. data/vendor/depot_tools/recipe_modules/git/example.expected/rebase_failed.json +179 -0
  213. data/vendor/depot_tools/recipe_modules/git/example.expected/remote_not_origin.json +179 -0
  214. data/vendor/depot_tools/recipe_modules/git/example.expected/set_got_revision.json +178 -0
  215. data/vendor/depot_tools/recipe_modules/git/example.py +147 -0
  216. data/vendor/depot_tools/recipe_modules/git/resources/git_setup.py +61 -0
  217. data/vendor/depot_tools/recipe_modules/git/test_api.py +18 -0
  218. data/vendor/depot_tools/recipe_modules/git_cl/__init__.py +4 -0
  219. data/vendor/depot_tools/recipe_modules/git_cl/api.py +25 -0
  220. data/vendor/depot_tools/recipe_modules/git_cl/config.py +22 -0
  221. data/vendor/depot_tools/recipe_modules/git_cl/example.expected/basic.json +66 -0
  222. data/vendor/depot_tools/recipe_modules/git_cl/example.py +41 -0
  223. data/vendor/depot_tools/recipe_modules/infra_paths/__init__.py +4 -0
  224. data/vendor/depot_tools/recipe_modules/infra_paths/api.py +12 -0
  225. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/basic.json +14 -0
  226. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_linux.json +14 -0
  227. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_mac.json +14 -0
  228. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_buildbot_win.json +14 -0
  229. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_linux.json +14 -0
  230. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_mac.json +14 -0
  231. data/vendor/depot_tools/recipe_modules/infra_paths/example.expected/paths_kitchen_win.json +14 -0
  232. data/vendor/depot_tools/recipe_modules/infra_paths/example.py +28 -0
  233. data/vendor/depot_tools/recipe_modules/infra_paths/path_config.py +45 -0
  234. data/vendor/depot_tools/recipe_modules/presubmit/__init__.py +4 -0
  235. data/vendor/depot_tools/recipe_modules/presubmit/api.py +20 -0
  236. data/vendor/depot_tools/recipe_modules/presubmit/example.expected/basic.json +18 -0
  237. data/vendor/depot_tools/recipe_modules/presubmit/example.py +15 -0
  238. data/vendor/depot_tools/recipe_modules/rietveld/__init__.py +5 -0
  239. data/vendor/depot_tools/recipe_modules/rietveld/api.py +94 -0
  240. data/vendor/depot_tools/recipe_modules/rietveld/example.expected/basic.json +30 -0
  241. data/vendor/depot_tools/recipe_modules/rietveld/example.py +24 -0
  242. data/vendor/depot_tools/recipe_modules/tryserver/__init__.py +15 -0
  243. data/vendor/depot_tools/recipe_modules/tryserver/api.py +280 -0
  244. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_git_patch.json +104 -0
  245. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_rietveld_patch.json +58 -0
  246. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_rietveld_patch_new.json +58 -0
  247. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_svn_patch.json +68 -0
  248. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_wrong_patch.json +43 -0
  249. data/vendor/depot_tools/recipe_modules/tryserver/example.expected/with_wrong_patch_new.json +43 -0
  250. data/vendor/depot_tools/recipe_modules/tryserver/example.py +53 -0
  251. data/vendor/depot_tools/recipe_modules/tryserver/test_api.py +7 -0
  252. data/vendor/depot_tools/recipes.py +136 -0
  253. data/vendor/depot_tools/repo +1 -1
  254. data/vendor/depot_tools/rietveld.py +46 -15
  255. data/vendor/depot_tools/roll_dep.py +97 -36
  256. data/vendor/depot_tools/scm.py +3 -3
  257. data/vendor/depot_tools/setup_color.py +94 -0
  258. data/vendor/depot_tools/subprocess2.py +10 -1
  259. data/vendor/depot_tools/third_party/cq_client/OWNERS +0 -1
  260. data/vendor/depot_tools/third_party/cq_client/README.md +47 -9
  261. data/vendor/depot_tools/third_party/cq_client/cq.pb.go +617 -0
  262. data/vendor/depot_tools/third_party/cq_client/cq.proto +75 -17
  263. data/vendor/depot_tools/third_party/cq_client/cq_pb2.py +168 -41
  264. data/vendor/depot_tools/third_party/cq_client/testdata/cq_gerrit.cfg +55 -0
  265. data/vendor/depot_tools/third_party/cq_client/{test/cq_example.cfg → testdata/cq_rietveld.cfg} +14 -6
  266. data/vendor/depot_tools/third_party/fancy_urllib/README +5 -4
  267. data/vendor/depot_tools/third_party/fancy_urllib/__init__.py +114 -52
  268. data/vendor/depot_tools/third_party/protobuf26/README.chromium +9 -6
  269. data/vendor/depot_tools/third_party/upload.py +17 -31
  270. data/vendor/depot_tools/trychange.py +0 -2
  271. data/vendor/depot_tools/update_depot_tools +29 -11
  272. data/vendor/depot_tools/update_depot_tools.bat +4 -9
  273. data/vendor/depot_tools/upload_to_google_storage.py +42 -5
  274. data/vendor/depot_tools/win_toolchain/OWNERS +1 -0
  275. data/vendor/depot_tools/win_toolchain/get_toolchain_if_necessary.py +227 -52
  276. data/vendor/depot_tools/win_toolchain/package_from_installed.py +203 -88
  277. metadata +161 -81
  278. data/patches/arm/do-not-imply-vfp3-and-armv7.patch +0 -16
  279. data/patches/arm/do-not-use-vfp2.patch +0 -13
  280. data/patches/clang51/no-unused-variable.patch +0 -12
  281. data/vendor/depot_tools/bootstrap/.gitignore +0 -2
  282. data/vendor/depot_tools/bootstrap/bootstrap.py +0 -234
  283. data/vendor/depot_tools/bootstrap/deps.pyl +0 -15
  284. data/vendor/depot_tools/bootstrap/util.py +0 -87
  285. data/vendor/depot_tools/bootstrap/virtualenv/.gitignore +0 -10
  286. data/vendor/depot_tools/bootstrap/virtualenv/.travis.yml +0 -28
  287. data/vendor/depot_tools/bootstrap/virtualenv/AUTHORS.txt +0 -91
  288. data/vendor/depot_tools/bootstrap/virtualenv/CONTRIBUTING.rst +0 -21
  289. data/vendor/depot_tools/bootstrap/virtualenv/LICENSE.txt +0 -22
  290. data/vendor/depot_tools/bootstrap/virtualenv/MANIFEST.in +0 -11
  291. data/vendor/depot_tools/bootstrap/virtualenv/README.rst +0 -10
  292. data/vendor/depot_tools/bootstrap/virtualenv/bin/rebuild-script.py +0 -71
  293. data/vendor/depot_tools/bootstrap/virtualenv/docs/changes.rst +0 -747
  294. data/vendor/depot_tools/bootstrap/virtualenv/docs/conf.py +0 -149
  295. data/vendor/depot_tools/bootstrap/virtualenv/docs/development.rst +0 -61
  296. data/vendor/depot_tools/bootstrap/virtualenv/docs/index.rst +0 -137
  297. data/vendor/depot_tools/bootstrap/virtualenv/docs/installation.rst +0 -58
  298. data/vendor/depot_tools/bootstrap/virtualenv/docs/make.bat +0 -170
  299. data/vendor/depot_tools/bootstrap/virtualenv/docs/reference.rst +0 -256
  300. data/vendor/depot_tools/bootstrap/virtualenv/docs/userguide.rst +0 -249
  301. data/vendor/depot_tools/bootstrap/virtualenv/scripts/virtualenv +0 -3
  302. data/vendor/depot_tools/bootstrap/virtualenv/setup.py +0 -111
  303. data/vendor/depot_tools/bootstrap/virtualenv/tests/test_activate.sh +0 -94
  304. data/vendor/depot_tools/bootstrap/virtualenv/tests/test_activate_expected.output +0 -2
  305. data/vendor/depot_tools/bootstrap/virtualenv/tests/test_virtualenv.py +0 -139
  306. data/vendor/depot_tools/bootstrap/virtualenv/tests/tox.ini +0 -12
  307. data/vendor/depot_tools/bootstrap/virtualenv/tox.ini +0 -17
  308. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv.py +0 -2367
  309. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate.bat +0 -26
  310. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate.csh +0 -42
  311. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate.fish +0 -74
  312. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate.ps1 +0 -150
  313. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate.sh +0 -80
  314. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/activate_this.py +0 -34
  315. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/deactivate.bat +0 -20
  316. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/distutils-init.py +0 -101
  317. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/distutils.cfg +0 -6
  318. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_embedded/site.py +0 -758
  319. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_support/pip-6.0-py2.py3-none-any.whl +0 -0
  320. data/vendor/depot_tools/bootstrap/virtualenv/virtualenv_support/setuptools-8.2.1-py2.py3-none-any.whl +0 -0
  321. data/vendor/depot_tools/bootstrap/win/README.google +0 -16
  322. data/vendor/depot_tools/cbuildbot +0 -96
  323. data/vendor/depot_tools/chrome_set_ver +0 -96
  324. data/vendor/depot_tools/cros +0 -96
  325. data/vendor/depot_tools/cros_sdk +0 -96
  326. data/vendor/depot_tools/git-cl-upload-hook +0 -52
  327. data/vendor/depot_tools/git-crup +0 -45
  328. data/vendor/depot_tools/python_git_runner.sh +0 -36
  329. data/vendor/depot_tools/recipes/blink.py +0 -59
  330. data/vendor/depot_tools/third_party/cq_client/test/validate_config_test.py +0 -52
  331. data/vendor/depot_tools/third_party/cq_client/validate_config.py +0 -108
  332. data/vendor/depot_tools/win_toolchain/toolchain2013.py +0 -494
@@ -1,45 +0,0 @@
1
- #!/usr/bin/env bash
2
- # Copyright (c) 2012 The Chromium Authors. All rights reserved.
3
- # Use of this source code is governed by a BSD-style license that can be
4
- # found in the LICENSE file.
5
-
6
- TOPLEVEL=$(git rev-parse --show-toplevel)
7
- TOPPERLEVEL=$(dirname $TOPLEVEL)
8
-
9
- cat <<EOF
10
- Sorry `whoami`, but the git-submodule flow has been deprecated in order to
11
- simplify the plethora of SCM choices, and to pave the way towards a git-only
12
- chromium development flow.
13
-
14
- Please consult https://code.google.com/p/chromium/wiki/UsingGitSubmodules#Convert_from_submodules_to_gclient
15
- for instructions on how to convert your submodule checkout to gclient.
16
-
17
- The simplest chromium and/or blink instructions follow for convenience.
18
-
19
- 1. Make sure the parent directory of this checkout is empty, besides this repo:
20
- $ ls $TOPPERLEVEL
21
- EOF
22
- ls "$TOPPERLEVEL"
23
- if [[ "$(ls "$TOPPERLEVEL")" != 'src' ]]
24
- then
25
- echo Please move this repo to its own directory before continuing!!!
26
- fi
27
- echo
28
-
29
- cat <<EOF
30
- 2. Please add a .gclient file to $TOPPERLEVEL/.gclient of the form:
31
- # ======== .gclient begins =========
32
- solutions = [{
33
- 'name': '$(basename "$TOPLEVEL")',
34
- 'url': 'https://chromium.googlesource.com/chromium/src.git',
35
- 'managed': False,
36
- 'deps_file': '.DEPS.git',
37
- # Uncomment the following if you're doing blink development
38
- # 'custom_vars': {'webkit_revision': ''},
39
- }]
40
- # ======== .gclient ends =========
41
-
42
- 3. Run \`gclient sync\` to synchronize dependencies in your checkout instead of $(basename "$0")!
43
- EOF
44
-
45
- exit 1
@@ -1,36 +0,0 @@
1
- # Copyright 2014 The Chromium Authors. All rights reserved.
2
- # Use of this source code is governed by a BSD-style license that can be
3
- # found in the LICENSE file.
4
-
5
- ## This file is designed to be sourced from a bash script whose name takes the
6
- ## form 'git-sub-command'. This script will then instead invoke
7
- ## '[depot_tools]/git_sub_command.py' correctly under mingw as well
8
- ## as posix-ey systems, passing along all other command line flags.
9
-
10
- ## Example:
11
- ## echo ". python_git_runner.sh" > git-foo-command
12
- ## ./git-foo-command #=> runs `python git_foo_command.py`
13
-
14
- ## Constants
15
- PYTHONDONTWRITEBYTECODE=1
16
-
17
- ## "Input parameters".
18
- # If set before the script is sourced, then we'll use the pre-set values.
19
- #
20
- # SCRIPT defaults to the basename of $0, with dashes replaced with underscores
21
-
22
- if [[ $OSTYPE = msys ]]
23
- then
24
- DEPOT_TOOLS="${0%\\*}"
25
- BASENAME="${0##*\\}"
26
- else
27
- DEPOT_TOOLS="${0%/*}"
28
- BASENAME="${0##*/}"
29
- fi
30
- SCRIPT="${SCRIPT-${BASENAME//-/_}.py}"
31
-
32
- if [[ -e "$DEPOT_TOOLS/python.bat" && $OSTYPE = msys ]]; then
33
- cmd.exe //c "$DEPOT_TOOLS\\python.bat" "$DEPOT_TOOLS\\$SCRIPT" "$@"
34
- else
35
- exec "$DEPOT_TOOLS/$SCRIPT" "$@"
36
- fi
@@ -1,59 +0,0 @@
1
- # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2
- # Use of this source code is governed by a BSD-style license that can be
3
- # found in the LICENSE file.
4
-
5
- import json
6
- import sys
7
-
8
- import recipe_util # pylint: disable=F0401
9
-
10
-
11
- # This class doesn't need an __init__ method, so we disable the warning
12
- # pylint: disable=W0232
13
- class Blink(recipe_util.Recipe):
14
- """Basic Recipe alias for Blink -> Chromium."""
15
-
16
- @staticmethod
17
- def fetch_spec(props):
18
- chromium_url = 'https://chromium.googlesource.com/chromium/src.git'
19
- chromium_solution = {'name': 'src',
20
- 'url': chromium_url,
21
- 'deps_file': 'DEPS',
22
- 'managed': False,
23
- 'custom_deps': {
24
- 'src/third_party/WebKit': None,
25
- },
26
- }
27
- blink_url = 'https://chromium.googlesource.com/chromium/blink.git'
28
- blink_solution = {'name': 'src/third_party/WebKit',
29
- 'url': blink_url,
30
- 'deps_file': '.DEPS.git',
31
- 'managed': False,
32
- 'custom_deps': {},
33
- }
34
- spec = {
35
- 'solutions': [chromium_solution, blink_solution],
36
- 'auto': True,
37
- }
38
- if props.get('target_os'):
39
- spec['target_os'] = props['target_os'].split(',')
40
- if props.get('target_os_only'):
41
- spec['target_os_only'] = props['target_os_only']
42
- toolchain_hook = [sys.executable, 'src/build/confirm_toolchain.py']
43
- spec['fetch_hooks'] = [toolchain_hook]
44
- return {
45
- 'type': 'gclient_git_svn',
46
- 'gclient_git_svn_spec': spec,
47
- }
48
-
49
- @staticmethod
50
- def expected_root(_props):
51
- return 'src/third_party/WebKit'
52
-
53
-
54
- def main(argv=None):
55
- return Blink().handle_args(argv)
56
-
57
-
58
- if __name__ == '__main__':
59
- sys.exit(main(sys.argv))
@@ -1,52 +0,0 @@
1
- # Copyright 2015 The Chromium Authors. All rights reserved.
2
- # Use of this source code is governed by a BSD-style license that can be
3
- # found in the LICENSE file.
4
-
5
- """Unit tests for tools/validate_config.py."""
6
-
7
- import mock
8
- import os
9
- import unittest
10
-
11
- from cq_client import cq_pb2
12
- from cq_client import validate_config
13
-
14
-
15
- TEST_DIR = os.path.dirname(os.path.abspath(__file__))
16
-
17
-
18
- class TestValidateConfig(unittest.TestCase):
19
- def test_is_valid(self):
20
- with open(os.path.join(TEST_DIR, 'cq_example.cfg'), 'r') as test_config:
21
- self.assertTrue(validate_config.IsValid(test_config.read()))
22
-
23
- def test_has_field(self):
24
- config = cq_pb2.Config()
25
-
26
- self.assertFalse(validate_config._HasField(config, 'version'))
27
- config.version = 1
28
- self.assertTrue(validate_config._HasField(config, 'version'))
29
-
30
- self.assertFalse(validate_config._HasField(
31
- config, 'rietveld.project_bases'))
32
- config.rietveld.project_bases.append('foo://bar')
33
- self.assertTrue(validate_config._HasField(
34
- config, 'rietveld.project_bases'))
35
-
36
- self.assertFalse(validate_config._HasField(
37
- config, 'verifiers.try_job.buckets'))
38
- self.assertFalse(validate_config._HasField(
39
- config, 'verifiers.try_job.buckets.name'))
40
-
41
- bucket = config.verifiers.try_job.buckets.add()
42
- bucket.name = 'tryserver.chromium.linux'
43
-
44
-
45
- self.assertTrue(validate_config._HasField(
46
- config, 'verifiers.try_job.buckets'))
47
- self.assertTrue(validate_config._HasField(
48
- config, 'verifiers.try_job.buckets.name'))
49
-
50
- config.verifiers.try_job.buckets.add()
51
- self.assertFalse(validate_config._HasField(
52
- config, 'verifiers.try_job.buckets.name'))
@@ -1,108 +0,0 @@
1
- #!/usr/bin/env python
2
- # Copyright 2015 The Chromium Authors. All rights reserved.
3
- # Use of this source code is governed by a BSD-style license that can be
4
- # found in the LICENSE file.
5
-
6
- """CQ config validation library."""
7
-
8
- import argparse
9
- from google import protobuf
10
- import logging
11
- import re
12
- import sys
13
-
14
- from cq_client import cq_pb2
15
-
16
-
17
- REQUIRED_FIELDS = [
18
- 'version',
19
- 'rietveld',
20
- 'rietveld.url',
21
- 'verifiers',
22
- 'cq_name',
23
- ]
24
-
25
- LEGACY_FIELDS = [
26
- 'svn_repo_url',
27
- 'server_hooks_missing',
28
- 'verifiers_with_patch',
29
- ]
30
-
31
- EMAIL_REGEXP = '^[^@]+@[^@]+\.[^@]+$'
32
-
33
-
34
- def _HasField(message, field_path):
35
- """Checks that at least one field with given path exist in the proto message.
36
-
37
- This function correctly handles repeated fields and will make sure that each
38
- repeated field will have required sub-path, e.g. if 'abc' is a repeated field
39
- and field_path is 'abc.def', then the function will only return True when each
40
- entry for 'abc' will contain at least one value for 'def'.
41
-
42
- Args:
43
- message (google.protobuf.message.Message): Protocol Buffer message to check.
44
- field_path (string): Path to the target field separated with ".".
45
-
46
- Return:
47
- True if at least one such field is explicitly set in the message.
48
- """
49
- path_parts = field_path.split('.', 1)
50
- field_name = path_parts[0]
51
- sub_path = path_parts[1] if len(path_parts) == 2 else None
52
-
53
- field_labels = {fd.name: fd.label for fd in message.DESCRIPTOR.fields}
54
- repeated_field = (field_labels[field_name] ==
55
- protobuf.descriptor.FieldDescriptor.LABEL_REPEATED)
56
-
57
- if sub_path:
58
- field = getattr(message, field_name)
59
- if repeated_field:
60
- if not field:
61
- return False
62
- return all(_HasField(entry, sub_path) for entry in field)
63
- else:
64
- return _HasField(field, sub_path)
65
- else:
66
- if repeated_field:
67
- return len(getattr(message, field_name)) > 0
68
- else:
69
- return message.HasField(field_name)
70
-
71
-
72
- def IsValid(cq_config):
73
- """Validates a CQ config and prints errors/warnings to the screen.
74
-
75
- Args:
76
- cq_config (string): Unparsed text format of the CQ config proto.
77
-
78
- Returns:
79
- True if the config is valid.
80
- """
81
- try:
82
- config = cq_pb2.Config()
83
- protobuf.text_format.Merge(cq_config, config)
84
- except protobuf.text_format.ParseError as e:
85
- logging.error('Failed to parse config as protobuf:\n%s', e)
86
- return False
87
-
88
- for fname in REQUIRED_FIELDS:
89
- if not _HasField(config, fname):
90
- logging.error('%s is a required field', fname)
91
- return False
92
-
93
- for fname in LEGACY_FIELDS:
94
- if _HasField(config, fname):
95
- logging.warn('%s is a legacy field', fname)
96
-
97
-
98
- for base in config.rietveld.project_bases:
99
- try:
100
- re.compile(base)
101
- except re.error:
102
- logging.error('failed to parse "%s" in project_bases as a regexp', base)
103
- return False
104
-
105
- # TODO(sergiyb): For each field, check valid values depending on its
106
- # semantics, e.g. email addresses, regular expressions etc.
107
-
108
- return True
@@ -1,494 +0,0 @@
1
- #!/usr/bin/env python
2
- # Copyright 2013 The Chromium Authors. All rights reserved.
3
- # Use of this source code is governed by a BSD-style license that can be
4
- # found in the LICENSE file.
5
-
6
- """Extracts a Windows VS2013 toolchain from various downloadable pieces."""
7
-
8
-
9
- import ctypes
10
- import json
11
- import optparse
12
- import os
13
- import shutil
14
- import subprocess
15
- import sys
16
- import tempfile
17
- import urllib2
18
-
19
-
20
- BASEDIR = os.path.dirname(os.path.abspath(__file__))
21
- WDK_ISO_URL = (
22
- 'http://download.microsoft.com/download/'
23
- '4/A/2/4A25C7D5-EFBE-4182-B6A9-AE6850409A78/GRMWDK_EN_7600_1.ISO')
24
- g_temp_dirs = []
25
-
26
-
27
- sys.path.append(os.path.join(BASEDIR, '..'))
28
- import download_from_google_storage
29
-
30
-
31
- def GetLongPathName(path):
32
- """Converts any 8dot3 names in the path to the full name."""
33
- buf = ctypes.create_unicode_buffer(260)
34
- size = ctypes.windll.kernel32.GetLongPathNameW(unicode(path), buf, 260)
35
- if (size > 260):
36
- sys.exit('Long form of path longer than 260 chars: %s' % path)
37
- return buf.value
38
-
39
-
40
- def RunOrDie(command):
41
- subprocess.check_call(command, shell=True)
42
-
43
-
44
- class ScopedSubstTempDir(object):
45
- """Creates a |TempDir()| and subst's a drive to the path.
46
-
47
- This is done to avoid exceedingly long names in some .msi packages which
48
- fail to extract because they exceed _MAX_PATH. Only the "subst" part of this
49
- is scoped, not the temp dir, which is left for use and cleanup by the
50
- caller.
51
- """
52
- DefineDosDevice = ctypes.windll.kernel32.DefineDosDeviceW
53
- DefineDosDevice.argtypes = [ctypes.c_int, ctypes.c_wchar_p, ctypes.c_wchar_p]
54
- DDD_NO_BROADCAST_SYSTEM = 0x08
55
- DDD_REMOVE_DEFINITION = 0x02
56
-
57
- def __init__(self):
58
- self.real_path = TempDir()
59
- self.subst_drive = None
60
-
61
- def __enter__(self):
62
- """Tries to find a subst that we can use for the temporary directory, and
63
- aborts on failure."""
64
- for drive in range(ord('Z'), ord('A') - 1, -1):
65
- candidate = '%c:' % drive
66
- if self.DefineDosDevice(
67
- self.DDD_NO_BROADCAST_SYSTEM, candidate, self.real_path) != 0:
68
- self.subst_drive = candidate
69
- return self
70
- raise RuntimeError('Unable to find a subst path')
71
-
72
- def __exit__(self, typ, value, traceback):
73
- if self.subst_drive:
74
- if self.DefineDosDevice(int(self.DDD_REMOVE_DEFINITION),
75
- self.subst_drive,
76
- self.real_path) == 0:
77
- raise RuntimeError('Unable to remove subst')
78
-
79
- def ShortenedPath(self):
80
- return self.subst_drive + '\\'
81
-
82
- def RealPath(self):
83
- return self.real_path
84
-
85
-
86
- def TempDir():
87
- """Generates a temporary directory (for downloading or extracting to) and keep
88
- track of the directory that's created for cleaning up later.
89
- """
90
- temp = tempfile.mkdtemp()
91
- g_temp_dirs.append(temp)
92
- return temp
93
-
94
-
95
- def DeleteAllTempDirs():
96
- """Removes all temporary directories created by |TempDir()|."""
97
- global g_temp_dirs
98
- if g_temp_dirs:
99
- sys.stdout.write('Cleaning up temporaries...\n')
100
- for temp in g_temp_dirs:
101
- # shutil.rmtree errors out on read only attributes.
102
- RunOrDie('rmdir /s/q "%s"' % temp)
103
- g_temp_dirs = []
104
-
105
-
106
- def GetMainIsoUrl(pro):
107
- """Gets the main .iso URL.
108
-
109
- If |pro| is False, downloads the Express edition.
110
- """
111
- prefix = 'http://download.microsoft.com/download/'
112
- if pro:
113
- return (prefix +
114
- 'A/F/1/AF128362-A6A8-4DB3-A39A-C348086472CC/VS2013_RTM_PRO_ENU.iso')
115
- else:
116
- return (prefix +
117
- '7/2/E/72E0F986-D247-4289-B9DC-C4FB07374894/VS2013_RTM_DskExp_ENU.iso')
118
-
119
-
120
- def Download(url, local_path):
121
- """Downloads a large-ish binary file and print some status information while
122
- doing so.
123
- """
124
- sys.stdout.write('Downloading %s...\n' % url)
125
- req = urllib2.urlopen(url)
126
- content_length = int(req.headers.get('Content-Length', 0))
127
- bytes_read = 0L
128
- terminator = '\r' if sys.stdout.isatty() else '\n'
129
- with open(local_path, 'wb') as file_handle:
130
- while True:
131
- chunk = req.read(1024 * 1024)
132
- if not chunk:
133
- break
134
- bytes_read += len(chunk)
135
- file_handle.write(chunk)
136
- sys.stdout.write('... %d/%d%s' % (bytes_read, content_length, terminator))
137
- sys.stdout.flush()
138
- sys.stdout.write('\n')
139
- if content_length and content_length != bytes_read:
140
- sys.exit('Got incorrect number of bytes downloading %s' % url)
141
-
142
-
143
- def ExtractIso(iso_path):
144
- """Uses 7zip to extract the contents of the given .iso (or self-extracting
145
- .exe).
146
- """
147
- target_path = TempDir()
148
- sys.stdout.write('Extracting %s...\n' % iso_path)
149
- sys.stdout.flush()
150
- # TODO(scottmg): Do this (and exe) manually with python code.
151
- # Note that at the beginning of main() we set the working directory to 7z's
152
- # location so that 7z can find its codec dll.
153
- RunOrDie('7z x "%s" -y "-o%s"' % (iso_path, target_path))
154
- return target_path
155
-
156
-
157
- def ExtractMsi(msi_path):
158
- """Uses msiexec to extract the contents of the given .msi file."""
159
- sys.stdout.write('Extracting %s...\n' % msi_path)
160
- with ScopedSubstTempDir() as temp_dir:
161
- RunOrDie('msiexec /a "%s" /qn TARGETDIR="%s"' % (
162
- msi_path, temp_dir.ShortenedPath()))
163
- return temp_dir.RealPath()
164
-
165
-
166
- def DownloadMainIso(url):
167
- temp_dir = TempDir()
168
- target_path = os.path.join(temp_dir, os.path.basename(url))
169
- Download(url, target_path)
170
- return target_path
171
-
172
-
173
- def DownloadSDK8():
174
- """Downloads the Win8 SDK.
175
-
176
- This one is slightly different than the simpler direct downloads. There is
177
- no .ISO distribution for the Windows 8 SDK. Rather, a tool is provided that
178
- is a download manager. This is used to download the various .msi files to a
179
- target location. Unfortunately, this tool requires elevation for no obvious
180
- reason even when only downloading, so this function will trigger a UAC
181
- elevation if the script is not run from an elevated prompt. This is mostly
182
- grabbed for windbg and cdb (See http://crbug.com/321187) as most of the SDK
183
- is in VS2013, however we need a couple D3D related things from the SDK.
184
- """
185
- # Use the long path name here because because 8dot3 names don't seem to work.
186
- sdk_temp_dir = GetLongPathName(TempDir())
187
- target_path = os.path.join(sdk_temp_dir, 'sdksetup.exe')
188
- standalone_path = os.path.join(sdk_temp_dir, 'Standalone')
189
- Download(
190
- ('http://download.microsoft.com/download/'
191
- 'F/1/3/F1300C9C-A120-4341-90DF-8A52509B23AC/standalonesdk/sdksetup.exe'),
192
- target_path)
193
- sys.stdout.write(
194
- 'Running sdksetup.exe to download Win8 SDK (may request elevation)...\n')
195
- count = 0
196
- while count < 5:
197
- rc = subprocess.call([target_path,
198
- '/quiet',
199
- '/features', 'OptionId.WindowsDesktopDebuggers',
200
- 'OptionId.WindowsDesktopSoftwareDevelopmentKit',
201
- '/layout', standalone_path])
202
- if rc == 0:
203
- return standalone_path
204
- count += 1
205
- sys.stdout.write('Windows 8 SDK failed to download, retrying.\n')
206
- sys.exit('After multiple retries, couldn\'t download Win8 SDK')
207
-
208
-
209
- def DownloadWDKIso():
210
- wdk_temp_dir = TempDir()
211
- target_path = os.path.join(wdk_temp_dir, 'GRMWDK_EN_7600_1.ISO')
212
- Download(WDK_ISO_URL, target_path)
213
- return target_path
214
-
215
-
216
- def DownloadUsingGsutil(filename):
217
- """Downloads the given file from Google Storage chrome-wintoolchain bucket."""
218
- temp_dir = TempDir()
219
- assert os.path.basename(filename) == filename
220
- target_path = os.path.join(temp_dir, filename)
221
- gsutil = download_from_google_storage.Gsutil(
222
- download_from_google_storage.GSUTIL_DEFAULT_PATH, boto_path=None)
223
- code = gsutil.call('cp', 'gs://chrome-wintoolchain/' + filename, target_path)
224
- if code != 0:
225
- sys.exit('gsutil failed')
226
- return target_path
227
-
228
-
229
- def GetVSInternal():
230
- """Uses gsutil to pull the toolchain from internal Google Storage bucket."""
231
- return DownloadUsingGsutil('VS2013_RTM_PRO_ENU.iso')
232
-
233
-
234
- def GetSDKInternal():
235
- """Downloads a zipped copy of the SDK from internal Google Storage bucket,
236
- and extracts it."""
237
- zip_file = DownloadUsingGsutil('Standalone.zip')
238
- return ExtractIso(zip_file)
239
-
240
-
241
- class SourceImages(object):
242
- """Local paths for components. |wdk_path| may be None if it's unnecessary for
243
- the given configuration."""
244
- def __init__(self, vs_path, sdk8_path, wdk_path):
245
- self.vs_path = vs_path
246
- self.sdk8_path = sdk8_path
247
- self.wdk_path = wdk_path
248
-
249
-
250
- def GetSourceImages(local_dir, pro):
251
- """Downloads the various sources that we need.
252
-
253
- Of note: Because Express does not include ATL, there's an additional download
254
- of the 7.1 WDK which is the latest publically accessible source for ATL. When
255
- |pro| this is not necessary (and CHROME_HEADLESS always implies Pro).
256
- """
257
- if pro and not local_dir:
258
- sys.exit('Non-Express must be used with --local')
259
- url = GetMainIsoUrl(pro)
260
- if local_dir:
261
- wdk_path = (os.path.join(local_dir, os.path.basename(WDK_ISO_URL))
262
- if not pro else None)
263
- return SourceImages(os.path.join(local_dir, os.path.basename(url)),
264
- os.path.join(local_dir, 'Standalone'),
265
- wdk_path=wdk_path)
266
- else:
267
- # Note that we do the SDK first, as it might cause an elevation prompt.
268
- sdk8_path = DownloadSDK8()
269
- vs_path = DownloadMainIso(url)
270
- wdk_path = DownloadWDKIso() if not pro else None
271
- return SourceImages(vs_path, sdk8_path, wdk_path=wdk_path)
272
-
273
-
274
- def ExtractMsiList(root_dir, packages):
275
- """Extracts the contents of a list of .msi files from an already extracted
276
- .iso file.
277
-
278
- |packages| is a list of pairs (msi, required). If required is not True, the
279
- msi is optional (this is set for packages that are in Pro but not Express).
280
- """
281
- results = []
282
- for (package, required) in packages:
283
- path_to_package = os.path.join(root_dir, package)
284
- if not os.path.exists(path_to_package) and not required:
285
- continue
286
- results.append(ExtractMsi(path_to_package))
287
- return results
288
-
289
-
290
- def ExtractComponents(image):
291
- vs_packages = [
292
- (r'vcRuntimeAdditional_amd64\vc_runtimeAdditional_x64.msi', True),
293
- (r'vcRuntimeAdditional_x86\vc_runtimeAdditional_x86.msi', True),
294
- (r'vcRuntimeDebug_amd64\vc_runtimeDebug_x64.msi', True),
295
- (r'vcRuntimeDebug_x86\vc_runtimeDebug_x86.msi', True),
296
- (r'vcRuntimeMinimum_amd64\vc_runtimeMinimum_x64.msi', True),
297
- (r'vcRuntimeMinimum_x86\vc_runtimeMinimum_x86.msi', True),
298
- (r'vc_compilerCore86\vc_compilerCore86.msi', True),
299
- (r'vc_compilerCore86res\vc_compilerCore86res.msi', True),
300
- (r'vc_compilerx64nat\vc_compilerx64nat.msi', False),
301
- (r'vc_compilerx64natres\vc_compilerx64natres.msi', False),
302
- (r'vc_compilerx64x86\vc_compilerx64x86.msi', False),
303
- (r'vc_compilerx64x86res\vc_compilerx64x86res.msi', False),
304
- (r'vc_librarycore86\vc_librarycore86.msi', True),
305
- (r'vc_libraryDesktop\x64\vc_LibraryDesktopX64.msi', True),
306
- (r'vc_libraryDesktop\x86\vc_LibraryDesktopX86.msi', True),
307
- (r'vc_libraryextended\vc_libraryextended.msi', False),
308
- (r'professionalcore\Setup\vs_professionalcore.msi', False),
309
- (r'vc_libraryselectablemfc\vc_libraryselectablemfc.msi', False),
310
- ]
311
- extracted_iso = ExtractIso(image.vs_path)
312
- result = ExtractMsiList(os.path.join(extracted_iso, 'packages'), vs_packages)
313
-
314
- sdk_packages = [
315
- (r'X86 Debuggers And Tools-x86_en-us.msi', True),
316
- (r'X64 Debuggers And Tools-x64_en-us.msi', True),
317
- (r'SDK Debuggers-x86_en-us.msi', True),
318
- (r'Windows Software Development Kit-x86_en-us.msi', True),
319
- (r'Windows Software Development Kit for Metro style Apps-x86_en-us.msi',
320
- True),
321
- ]
322
- result.extend(ExtractMsiList(os.path.join(image.sdk8_path, 'Installers'),
323
- sdk_packages))
324
-
325
- if image.wdk_path:
326
- # This image will only be set when using Express, when we need the WDK
327
- # headers and libs to supplement Express with ATL.
328
- wdk_packages = [
329
- (r'headers.msi', True),
330
- (r'libs_x86fre.msi', True),
331
- (r'libs_x64fre.msi', True),
332
- ]
333
- extracted_iso = ExtractIso(image.wdk_path)
334
- result.extend(ExtractMsiList(os.path.join(extracted_iso, 'WDK'),
335
- wdk_packages))
336
-
337
- return result
338
-
339
-
340
- def CopyToFinalLocation(extracted_dirs, target_dir):
341
- sys.stdout.write('Copying to final location...\n')
342
- mappings = {
343
- 'Program Files\\Microsoft Visual Studio 12.0\\VC\\': 'VC\\',
344
- 'Program Files\\Microsoft Visual Studio 12.0\\DIA SDK\\': 'DIA SDK\\',
345
- 'System64\\': 'sys64\\',
346
- 'System\\': 'sys32\\',
347
- 'Windows Kits\\8.1\\': 'win8sdk\\',
348
- 'WinDDK\\7600.16385.win7_wdk.100208-1538\\': 'wdk\\',
349
- }
350
- matches = []
351
- for extracted_dir in extracted_dirs:
352
- for root, _, filenames in os.walk(extracted_dir):
353
- for filename in filenames:
354
- matches.append((extracted_dir, os.path.join(root, filename)))
355
-
356
- copies = []
357
- for prefix, full_path in matches:
358
- # +1 for trailing \.
359
- partial_path = full_path[len(prefix) + 1:]
360
- for map_from, map_to in mappings.iteritems():
361
- if partial_path.startswith(map_from):
362
- target_path = os.path.join(map_to, partial_path[len(map_from):])
363
- copies.append((full_path, os.path.join(target_dir, target_path)))
364
-
365
- for full_source, full_target in copies:
366
- target_dir = os.path.dirname(full_target)
367
- if not os.path.isdir(target_dir):
368
- os.makedirs(target_dir)
369
- shutil.copy2(full_source, full_target)
370
-
371
-
372
- def GenerateSetEnvCmd(target_dir, pro):
373
- """Generate a batch file that gyp expects to exist to set up the compiler
374
- environment.
375
-
376
- This is normally generated by a full install of the SDK, but we
377
- do it here manually since we do not do a full install."""
378
- with open(os.path.join(
379
- target_dir, r'win8sdk\bin\SetEnv.cmd'), 'w') as f:
380
- f.write('@echo off\n'
381
- ':: Generated by win_toolchain\\toolchain2013.py.\n'
382
- # Common to x86 and x64
383
- 'set PATH=%~dp0..\\..\\Common7\\IDE;%PATH%\n'
384
- 'set INCLUDE=%~dp0..\\..\\win8sdk\\Include\\um;'
385
- '%~dp0..\\..\\win8sdk\\Include\\shared;'
386
- '%~dp0..\\..\\VC\\include;'
387
- '%~dp0..\\..\\VC\\atlmfc\\include\n'
388
- 'if "%1"=="/x64" goto x64\n')
389
-
390
- # x86. If we're Pro, then use the amd64_x86 cross (we don't support x86
391
- # host at all).
392
- if pro:
393
- f.write('set PATH=%~dp0..\\..\\win8sdk\\bin\\x86;'
394
- '%~dp0..\\..\\VC\\bin\\amd64_x86;'
395
- '%~dp0..\\..\\VC\\bin\\amd64;' # Needed for mspdb120.dll.
396
- '%PATH%\n')
397
- else:
398
- f.write('set PATH=%~dp0..\\..\\win8sdk\\bin\\x86;'
399
- '%~dp0..\\..\\VC\\bin;%PATH%\n')
400
- f.write('set LIB=%~dp0..\\..\\VC\\lib;'
401
- '%~dp0..\\..\\win8sdk\\Lib\\winv6.3\\um\\x86;'
402
- '%~dp0..\\..\\VC\\atlmfc\\lib\n'
403
- 'goto :EOF\n')
404
-
405
- # Express does not include a native 64 bit compiler, so we have to use
406
- # the x86->x64 cross.
407
- if not pro:
408
- # x86->x64 cross.
409
- f.write(':x64\n'
410
- 'set PATH=%~dp0..\\..\\win8sdk\\bin\\x64;'
411
- '%~dp0..\\..\\VC\\bin\\x86_amd64;'
412
- # Needed for mspdb120.dll. Must be after above though, so
413
- # that cl.exe is the x86_amd64 one.
414
- '%~dp0..\\..\\VC\\bin;'
415
- '%PATH%\n')
416
- else:
417
- # x64 native.
418
- f.write(':x64\n'
419
- 'set PATH=%~dp0..\\..\\win8sdk\\bin\\x64;'
420
- '%~dp0..\\..\\VC\\bin\\amd64;'
421
- '%PATH%\n')
422
- f.write('set LIB=%~dp0..\\..\\VC\\lib\\amd64;'
423
- '%~dp0..\\..\\win8sdk\\Lib\\winv6.3\\um\\x64;'
424
- '%~dp0..\\..\\VC\\atlmfc\\lib\\amd64\n')
425
-
426
-
427
- def DoTreeMirror(target_dir, tree_sha1):
428
- """In order to save temporary space on bots that do not have enough space to
429
- download ISOs, unpack them, and copy to the target location, the whole tree
430
- is uploaded as a zip to internal storage, and then mirrored here."""
431
- local_zip = DownloadUsingGsutil(tree_sha1 + '.zip')
432
- sys.stdout.write('Extracting %s...\n' % local_zip)
433
- sys.stdout.flush()
434
- RunOrDie('7z x "%s" -y "-o%s"' % (local_zip, target_dir))
435
-
436
-
437
- def main():
438
- parser = optparse.OptionParser(description=sys.modules[__name__].__doc__)
439
- parser.add_option('--targetdir', metavar='DIR',
440
- help='put toolchain into DIR',
441
- default=os.path.join(BASEDIR, 'win_toolchain_2013'))
442
- parser.add_option('--noclean', action='store_false', dest='clean',
443
- help='do not remove temp files',
444
- default=True)
445
- parser.add_option('--local', metavar='DIR',
446
- help='use downloaded files from DIR')
447
- parser.add_option('--express',
448
- help='use VS Express instead of Pro', action='store_true')
449
- parser.add_option('--sha1',
450
- help='tree sha1 that can be used to mirror an internal '
451
- 'copy (used if --use-gs)')
452
- parser.add_option('--use-gs',
453
- help='Use internal servers to pull isos',
454
- default=bool(int(os.environ.get('CHROME_HEADLESS', 0))),
455
- action='store_true')
456
- options, _ = parser.parse_args()
457
- try:
458
- target_dir = os.path.abspath(options.targetdir)
459
- if os.path.exists(target_dir):
460
- parser.error('%s already exists. Please [re]move it or use '
461
- '--targetdir to select a different target.\n' %
462
- target_dir)
463
- # Set the working directory to 7z subdirectory. 7-zip doesn't find its
464
- # codec dll very well, so this is the simplest way to make sure it runs
465
- # correctly, as we don't otherwise care about working directory.
466
- os.chdir(os.path.join(BASEDIR, '7z'))
467
- if options.use_gs and options.sha1:
468
- options.express = False
469
- DoTreeMirror(target_dir, options.sha1)
470
- else:
471
- images = GetSourceImages(options.local, not options.express)
472
- extracted = ExtractComponents(images)
473
- CopyToFinalLocation(extracted, target_dir)
474
- GenerateSetEnvCmd(target_dir, not options.express)
475
-
476
- data = {
477
- 'path': target_dir,
478
- 'version': '2013e' if options.express else '2013',
479
- 'win8sdk': os.path.join(target_dir, 'win8sdk'),
480
- 'wdk': os.path.join(target_dir, 'wdk'),
481
- 'runtime_dirs': [
482
- os.path.join(target_dir, 'sys64'),
483
- os.path.join(target_dir, 'sys32'),
484
- ],
485
- }
486
- with open(os.path.join(target_dir, '..', 'data.json'), 'w') as f:
487
- json.dump(data, f)
488
- finally:
489
- if options.clean:
490
- DeleteAllTempDirs()
491
-
492
-
493
- if __name__ == '__main__':
494
- sys.exit(main())