libv8 6.3.292.48.1 → 6.7.288.46.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.travis.yml +10 -34
- data/CHANGELOG.md +16 -0
- data/README.md +9 -63
- data/Rakefile +2 -2
- data/ext/libv8/builder.rb +22 -87
- data/ext/libv8/extconf.rb +1 -1
- data/ext/libv8/paths.rb +5 -18
- data/lib/libv8/version.rb +1 -1
- data/spec/location_spec.rb +1 -2
- data/spec/spec_helper.rb +0 -1
- data/vendor/depot_tools/.gitattributes +1 -2
- data/vendor/depot_tools/OWNERS +0 -1
- data/vendor/depot_tools/PRESUBMIT.py +11 -6
- data/vendor/depot_tools/README.md +0 -1
- data/vendor/depot_tools/WATCHLISTS +0 -6
- data/vendor/depot_tools/auth.py +129 -87
- data/vendor/depot_tools/autoninja +11 -1
- data/vendor/depot_tools/autoninja.bat +7 -1
- data/vendor/depot_tools/autoninja.py +14 -6
- data/vendor/depot_tools/bootstrap/win/manifest.txt +1 -1
- data/vendor/depot_tools/bootstrap/win/manifest_bleeding_edge.txt +1 -1
- data/vendor/depot_tools/cipd +23 -2
- data/vendor/depot_tools/cipd.bat +2 -2
- data/vendor/depot_tools/cipd_client_version +1 -1
- data/vendor/depot_tools/cipd_manifest.txt +17 -7
- data/vendor/depot_tools/cit.py +7 -6
- data/vendor/depot_tools/cpplint.py +195 -35
- data/vendor/depot_tools/detect_host_arch.py +51 -0
- data/vendor/depot_tools/download_from_google_storage.py +85 -26
- data/vendor/depot_tools/fetch.py +11 -6
- data/vendor/depot_tools/fetch_configs/chromium.py +0 -1
- data/vendor/depot_tools/fetch_configs/goma_client.py +41 -0
- data/vendor/depot_tools/fetch_configs/infra.py +0 -1
- data/vendor/depot_tools/fetch_configs/infra_internal.py +0 -1
- data/vendor/depot_tools/gclient-new-workdir.py +4 -0
- data/vendor/depot_tools/gclient.py +732 -476
- data/vendor/depot_tools/gclient_eval.py +569 -58
- data/vendor/depot_tools/gclient_scm.py +258 -46
- data/vendor/depot_tools/gclient_utils.py +17 -1
- data/vendor/depot_tools/gerrit_util.py +46 -13
- data/vendor/depot_tools/git_cache.py +0 -2
- data/vendor/depot_tools/git_cl.py +176 -335
- data/vendor/depot_tools/git_common.py +19 -16
- data/vendor/depot_tools/git_footers.py +19 -5
- data/vendor/depot_tools/git_hyper_blame.py +9 -3
- data/vendor/depot_tools/git_new_branch.py +15 -3
- data/vendor/depot_tools/git_upstream_diff.py +7 -2
- data/vendor/depot_tools/gsutil.py +1 -1
- data/vendor/depot_tools/infra/config/cq.cfg +1 -2
- data/vendor/depot_tools/infra/config/recipes.cfg +1 -1
- data/vendor/depot_tools/luci-auth +13 -0
- data/vendor/depot_tools/luci-auth.bat +8 -0
- data/vendor/depot_tools/man/html/depot_tools.html +0 -8
- data/vendor/depot_tools/man/html/git-upstream-diff.html +20 -3
- data/vendor/depot_tools/man/man1/git-upstream-diff.1 +27 -6
- data/vendor/depot_tools/man/man7/depot_tools.7 +0 -5
- data/vendor/depot_tools/man/man7/depot_tools_tutorial.7 +2 -2
- data/vendor/depot_tools/man/src/git-upstream-diff.txt +21 -3
- data/vendor/depot_tools/man/src/make_docs.sh +6 -0
- data/vendor/depot_tools/my_activity.py +283 -93
- data/vendor/depot_tools/owners.py +9 -4
- data/vendor/depot_tools/owners_finder.py +7 -3
- data/vendor/depot_tools/post_build_ninja_summary.py +322 -0
- data/vendor/depot_tools/presubmit_canned_checks.py +91 -106
- data/vendor/depot_tools/presubmit_support.py +219 -157
- data/vendor/depot_tools/prpc +13 -0
- data/vendor/depot_tools/prpc.bat +8 -0
- data/vendor/depot_tools/recipes/OWNERS +3 -1
- data/vendor/depot_tools/recipes/README.recipes.md +70 -111
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/__init__.py +12 -5
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/api.py +36 -68
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/deprecated_got_revision_mapping.json +0 -8
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/{trychange_oauth2_json.json → no_apply_patch_on_gclient.json} +64 -10
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/{no_shallow.json → shallow.json} +1 -1
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob.json +0 -8
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_empty_revision.json +0 -8
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail.json +0 -6
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch.json +0 -7
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_fail_patch_download.json +0 -6
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_gerrit_angle_deprecated.json +44 -0
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/{trychange_oauth2_buildbot.json → tryjob_gerrit_branch_heads.json} +51 -5
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8.json +0 -8
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/tryjob_v8_head_by_default.json +48 -8
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.py +19 -26
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/resources/bot_update.py +193 -155
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/test_api.py +9 -0
- data/vendor/depot_tools/recipes/recipe_modules/gclient/api.py +2 -7
- data/vendor/depot_tools/recipes/recipe_modules/gclient/config.py +31 -5
- data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.expected/basic.json +37 -19
- data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.expected/buildbot.json +37 -19
- data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.expected/revision.json +37 -19
- data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.expected/tryserver.json +37 -23
- data/vendor/depot_tools/recipes/recipe_modules/gclient/examples/full.py +4 -0
- data/vendor/depot_tools/recipes/recipe_modules/gerrit/api.py +40 -8
- data/vendor/depot_tools/recipes/recipe_modules/gerrit/examples/full.expected/basic.json +3 -3
- data/vendor/depot_tools/recipes/recipe_modules/gerrit/examples/full.py +6 -3
- data/vendor/depot_tools/recipes/recipe_modules/gitiles/OWNERS +0 -1
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/__init__.py +0 -1
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/api.py +7 -56
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_wrong_patch.json +0 -1
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.py +15 -16
- data/vendor/depot_tools/recipes/recipes.py +4 -2
- data/vendor/depot_tools/recipes/trigger_recipe_roller.txt +12 -0
- data/vendor/depot_tools/roll_dep.py +35 -37
- data/vendor/depot_tools/support/chromite_wrapper +1 -1
- data/vendor/depot_tools/third_party/logilab/astroid/README.chromium +3 -3
- data/vendor/depot_tools/third_party/logilab/astroid/__pkginfo__.py +2 -2
- data/vendor/depot_tools/third_party/logilab/astroid/astpeephole.py +86 -0
- data/vendor/depot_tools/third_party/logilab/astroid/bases.py +53 -66
- data/vendor/depot_tools/third_party/logilab/astroid/brain/py2pytest.py +31 -31
- data/vendor/depot_tools/third_party/logilab/astroid/brain/pynose.py +39 -16
- data/vendor/depot_tools/third_party/logilab/astroid/brain/pysix_moves.py +225 -189
- data/vendor/depot_tools/third_party/logilab/astroid/inference.py +45 -41
- data/vendor/depot_tools/third_party/logilab/astroid/manager.py +1 -0
- data/vendor/depot_tools/third_party/logilab/astroid/modutils.py +2 -2
- data/vendor/depot_tools/third_party/logilab/astroid/node_classes.py +3 -2
- data/vendor/depot_tools/third_party/logilab/astroid/nodes.py +1 -0
- data/vendor/depot_tools/third_party/logilab/astroid/protocols.py +57 -3
- data/vendor/depot_tools/third_party/logilab/astroid/raw_building.py +1 -1
- data/vendor/depot_tools/third_party/logilab/astroid/rebuilder.py +21 -1
- data/vendor/depot_tools/third_party/logilab/astroid/scoped_nodes.py +58 -33
- data/vendor/depot_tools/third_party/pylint/README.chromium +2 -2
- data/vendor/depot_tools/third_party/pylint/__pkginfo__.py +3 -3
- data/vendor/depot_tools/third_party/pylint/checkers/base.py +6 -18
- data/vendor/depot_tools/third_party/pylint/checkers/classes.py +64 -63
- data/vendor/depot_tools/third_party/pylint/checkers/design_analysis.py +25 -57
- data/vendor/depot_tools/third_party/pylint/checkers/format.py +14 -10
- data/vendor/depot_tools/third_party/pylint/checkers/python3.py +142 -37
- data/vendor/depot_tools/third_party/pylint/checkers/spelling.py +10 -1
- data/vendor/depot_tools/third_party/pylint/checkers/stdlib.py +50 -7
- data/vendor/depot_tools/third_party/pylint/checkers/strings.py +1 -1
- data/vendor/depot_tools/third_party/pylint/epylint.py +2 -1
- data/vendor/depot_tools/third_party/pylint/gui.py +1 -1
- data/vendor/depot_tools/third_party/pylint/lint.py +88 -23
- data/vendor/depot_tools/third_party/pylint/reporters/html.py +37 -5
- data/vendor/depot_tools/third_party/pylint/testutils.py +1 -1
- data/vendor/depot_tools/third_party/pylint/utils.py +5 -0
- data/vendor/depot_tools/vpython +31 -1
- data/vendor/depot_tools/win_toolchain/get_toolchain_if_necessary.py +35 -2
- data/vendor/depot_tools/win_toolchain/package_from_installed.py +0 -15
- data/vendor/depot_tools/yapf +17 -0
- data/vendor/depot_tools/{apply_issue.bat → yapf.bat} +2 -2
- metadata +16 -58
- data/ext/libv8/compiler.rb +0 -39
- data/ext/libv8/compiler/apple_llvm.rb +0 -22
- data/ext/libv8/compiler/clang.rb +0 -22
- data/ext/libv8/compiler/gcc.rb +0 -22
- data/ext/libv8/compiler/generic_compiler.rb +0 -66
- data/ext/libv8/make.rb +0 -13
- data/ext/libv8/patcher.rb +0 -21
- data/patches/0001-Build-a-standalone-static-library.patch +0 -26
- data/patches/0002-Don-t-compile-unnecessary-stuff.patch +0 -85
- data/patches/0003-Use-the-fPIC-flag-for-the-static-library.patch +0 -25
- data/patches/0004-Do-not-embed-debug-symbols-in-macOS-libraries.patch +0 -25
- data/patches/0005-Remove-TryInstallOptimizedCode.patch +0 -321
- data/patches/mingw-generate-makefiles.sh +0 -97
- data/spec/compiler/apple_llvm_spec.rb +0 -37
- data/spec/compiler/clang_spec.rb +0 -37
- data/spec/compiler/gcc_spec.rb +0 -37
- data/spec/compiler/generic_compiler_spec.rb +0 -50
- data/spec/compiler_spec.rb +0 -45
- data/spec/support/compiler_helpers.rb +0 -47
- data/vendor/depot_tools/apply_issue +0 -8
- data/vendor/depot_tools/apply_issue.py +0 -315
- data/vendor/depot_tools/man/html/git-cherry-pick-upload.html +0 -815
- data/vendor/depot_tools/man/man1/git-cherry-pick-upload.1 +0 -80
- data/vendor/depot_tools/man/src/_git-cherry-pick-upload_desc.helper.txt +0 -1
- data/vendor/depot_tools/man/src/git-cherry-pick-upload.demo.1.sh +0 -17
- data/vendor/depot_tools/man/src/git-cherry-pick-upload.txt +0 -35
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/trychange_oauth2.json +0 -8
- data/vendor/depot_tools/recipes/recipe_modules/bot_update/examples/full.expected/trychange_oauth2_json_win.json +0 -196
- data/vendor/depot_tools/recipes/recipe_modules/rietveld/__init__.py +0 -6
- data/vendor/depot_tools/recipes/recipe_modules/rietveld/api.py +0 -97
- data/vendor/depot_tools/recipes/recipe_modules/rietveld/examples/full.expected/basic.json +0 -8
- data/vendor/depot_tools/recipes/recipe_modules/rietveld/examples/full.expected/buildbot.json +0 -30
- data/vendor/depot_tools/recipes/recipe_modules/rietveld/examples/full.expected/no_auth.json +0 -27
- data/vendor/depot_tools/recipes/recipe_modules/rietveld/examples/full.py +0 -38
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_rietveld_patch.json +0 -69
- data/vendor/depot_tools/recipes/recipe_modules/tryserver/examples/full.expected/with_rietveld_patch_new.json +0 -69
- data/vendor/depot_tools/third_party/cq_client/OWNERS +0 -2
- data/vendor/depot_tools/third_party/cq_client/README.depot_tools.md +0 -2
- data/vendor/depot_tools/third_party/cq_client/README.md +0 -59
- data/vendor/depot_tools/third_party/cq_client/__init__.py +0 -3
- data/vendor/depot_tools/third_party/cq_client/v1/__init__.py +0 -3
- data/vendor/depot_tools/third_party/cq_client/v1/cq.pb.go +0 -810
- data/vendor/depot_tools/third_party/cq_client/v1/cq.proto +0 -281
- data/vendor/depot_tools/third_party/cq_client/v1/cq_pb2.py +0 -794
- data/vendor/depot_tools/third_party/cq_client/v1/testdata/cq_both.cfg +0 -71
- data/vendor/depot_tools/third_party/cq_client/v1/testdata/cq_gerrit.cfg +0 -58
- data/vendor/depot_tools/third_party/cq_client/v1/testdata/cq_rietveld.cfg +0 -60
- data/vendor/depot_tools/third_party/cq_client/v2/__init__.py +0 -3
- data/vendor/depot_tools/third_party/cq_client/v2/cq.pb.go +0 -792
- data/vendor/depot_tools/third_party/cq_client/v2/cq.proto +0 -270
- data/vendor/depot_tools/third_party/cq_client/v2/cq_pb2.py +0 -841
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 8e8d4ab4854d4b90aa58cbab9c38ffd47fe97c968530206e3ea530ce05341643
|
4
|
+
data.tar.gz: 53326757113ab5135e73952859f676be734b23863c62de07ddf7399c4a37e8ff
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c3e5a5531a444278614d1d0b998cffff088fffeb8e024a08d469cf8e67d32a33e13a445a205ac6e86ebd1e5c3ec12f4f9e6dac090da809316c6c6c081f9f75a5
|
7
|
+
data.tar.gz: 0d021f650a8af2efa4f1666006814a2688de39086ac5747bfae9329d02c80d22969bc4dcd6a7edcb91726cefcd41dc14a7253882a583f9fed6637848f2576496
|
data/.travis.yml
CHANGED
@@ -1,43 +1,19 @@
|
|
1
1
|
language: ruby
|
2
2
|
rvm:
|
3
|
-
- 2.
|
4
|
-
- 2.
|
5
|
-
-
|
6
|
-
- rbx
|
3
|
+
- 2.5
|
4
|
+
- 2.4
|
5
|
+
- rubinius-3
|
7
6
|
matrix:
|
8
7
|
include:
|
9
|
-
- rvm: 2.
|
8
|
+
- rvm: 2.5.1
|
10
9
|
os: osx
|
11
|
-
osx_image:
|
12
|
-
- rvm: 2.
|
10
|
+
osx_image: xcode9.4.1
|
11
|
+
- rvm: 2.5.1
|
13
12
|
os: osx
|
14
|
-
osx_image:
|
15
|
-
- os: osx
|
16
|
-
osx_image: xcode6.4
|
17
|
-
- os: osx
|
18
|
-
osx_image: xcode9.1
|
19
|
-
- rvm: system
|
20
|
-
os: osx
|
21
|
-
osx_image: xcode8.2
|
22
|
-
- rvm: system
|
23
|
-
os: osx
|
24
|
-
osx_image: xcode7.3
|
25
|
-
- rvm: system
|
26
|
-
os: osx
|
27
|
-
osx_image: xcode6.4
|
28
|
-
- rvm: system
|
29
|
-
os: osx
|
30
|
-
osx_image: xcode9.1
|
31
|
-
- rvm: ruby-2.3.1-clang
|
32
|
-
env: CXX=clang++
|
33
|
-
- rvm: 1.9.3
|
13
|
+
osx_image: xcode9.2
|
34
14
|
allow_failures:
|
35
|
-
- rvm:
|
36
|
-
- rvm: rbx
|
37
|
-
- os: osx
|
38
|
-
osx_image: xcode6.4
|
15
|
+
- rvm: rubinius-3
|
39
16
|
fast_finish: true
|
40
|
-
dist: trusty
|
41
17
|
addons:
|
42
18
|
apt:
|
43
19
|
packages:
|
@@ -51,7 +27,7 @@ before_install:
|
|
51
27
|
- if [ "$TRAVIS_OS_NAME" == "osx" -a "$TRAVIS_RUBY_VERSION" != "system" ]; then gem update bundler; fi
|
52
28
|
script:
|
53
29
|
- git submodule update --init
|
54
|
-
-
|
30
|
+
- bundle exec rake spec binary --trace
|
55
31
|
deploy:
|
56
32
|
provider: releases
|
57
33
|
file: $(git ls-files -o pkg | head -1)
|
@@ -60,7 +36,7 @@ deploy:
|
|
60
36
|
skip_cleanup: true
|
61
37
|
on:
|
62
38
|
tags: true
|
63
|
-
condition: $TRAVIS_OS_NAME = osx
|
39
|
+
# condition: $TRAVIS_OS_NAME = osx
|
64
40
|
cache:
|
65
41
|
bundler: true
|
66
42
|
notifications:
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,19 @@
|
|
1
|
+
### v6.7.288.46.0, v6.7.288.46.1 - 2017-07-06
|
2
|
+
|
3
|
+
* Update upstream v8 version to 6.7.288.46 (https://github.com/cowboyd/libv8/pull/258)
|
4
|
+
Due to the change in V8's build system this causes several major changes until
|
5
|
+
we're able to find a way to reimplement the necessary functionality. The changes
|
6
|
+
are listed below.
|
7
|
+
* Remove the option to specify --with-cxx. For now V8 is built with the
|
8
|
+
toolchain provided by the build system (https://github.com/cowboyd/libv8/issues/260)
|
9
|
+
* Remove the option to specify --with-system-v8. It was making it too easy for
|
10
|
+
the user to shot themself in the foot.
|
11
|
+
* Drop ARM support. The V8 build system is not working natively on ARM and for
|
12
|
+
some reason crosscompilation produces X86 binaries
|
13
|
+
(https://github.com/cowboyd/libv8/issues/261)
|
14
|
+
* Drop FreeBSD support. Chromium's depot_tools do not support FreeBSD at this
|
15
|
+
point. (https://github.com/cowboyd/libv8/issues/253)
|
16
|
+
|
1
17
|
### v6.3.292.48.0, v6.3.292.48.1 - 2017-12-20
|
2
18
|
|
3
19
|
* Update upstream v8 version to 6.3.292.48
|
data/README.md
CHANGED
@@ -11,7 +11,7 @@ source and binary form.
|
|
11
11
|
### Why?
|
12
12
|
|
13
13
|
The goal of libv8 is two fold: provide a binary gem containing the a
|
14
|
-
pre-compiled
|
14
|
+
pre-compiled libv8_monolith.a for as many platforms as possible while at the
|
15
15
|
same time supporting for an automated compilation for all others.
|
16
16
|
|
17
17
|
Not only does this drastically reduce gem install times, but it also
|
@@ -23,13 +23,12 @@ opens the door for supporting Windows.
|
|
23
23
|
That depends on your platform. Right now, we support the following
|
24
24
|
platforms.
|
25
25
|
|
26
|
+
* x86_64-darwin-17
|
26
27
|
* x86_64-darwin-16
|
27
28
|
* x86_64-darwin-15
|
28
29
|
* x86_64-darwin-14
|
29
30
|
* x86_64-linux
|
30
31
|
* x86-linux
|
31
|
-
* x86_64-freebsd-10
|
32
|
-
* x86_64-freebsd-11
|
33
32
|
|
34
33
|
If you don't see your platform on this list, first, make sure that it
|
35
34
|
installs from source, and second talk to us about setting up a binary
|
@@ -74,28 +73,17 @@ source-based distribution
|
|
74
73
|
|
75
74
|
> This step release system is a workaround to carlhuda/bundler#1537
|
76
75
|
|
77
|
-
##### Use with different standard C libraries
|
78
|
-
|
79
|
-
The Linux binary versions of this gem are linked against the most used standard
|
80
|
-
library - glibc. Currently rubygems has no mechanism to differentiate
|
81
|
-
platform-specific gems by standard library so we have no way of distributing
|
82
|
-
different binaries for different standard libraries.
|
83
|
-
|
84
|
-
What this means is that if you're running a distro that does not use glibc
|
85
|
-
(like Alpine Linux), you'll have to use a source version of the gem.
|
86
|
-
|
87
|
-
Also, at the time of writing this, the Ruby version in Alpine's package
|
88
|
-
repositories has been patched to not look to download binary versions of gems at
|
89
|
-
all.
|
90
|
-
|
91
76
|
### Requirements
|
92
77
|
|
93
78
|
Building the V8 library from source imposes the following requirements:
|
94
79
|
|
95
|
-
*
|
96
|
-
|
97
|
-
|
98
|
-
|
80
|
+
* An x86/x86_64 CPU. See [#261](https://github.com/cowboyd/libv8/issues/261) for ARM state.
|
81
|
+
* Linux with glibc or macOS. See
|
82
|
+
[#259](https://github.com/cowboyd/libv8/issues/259),
|
83
|
+
[#253](https://github.com/cowboyd/libv8/issues/253) and
|
84
|
+
[#217](https://github.com/cowboyd/libv8/issues/217) for state of other
|
85
|
+
platforms.
|
86
|
+
* Python 2
|
99
87
|
|
100
88
|
### Using a git version
|
101
89
|
|
@@ -122,47 +110,6 @@ To get the source, these commands will get you started:
|
|
122
110
|
bundle install
|
123
111
|
bundle exec rake compile
|
124
112
|
|
125
|
-
### Bring your own V8
|
126
|
-
|
127
|
-
*This is a great way to ensure that the builds of all gems that depend on libv8
|
128
|
-
fail. Please see the Gotchas section below and use the follwing instructions
|
129
|
-
only if you know what you're doing. If you're resorting to this because the
|
130
|
-
build of the gem is failing on your system or because there's no
|
131
|
-
platform-specific gem for your platform, please open up an issue.*
|
132
|
-
|
133
|
-
Because libv8 is the interface for the V8 engine used by several gems, you may
|
134
|
-
need to use libv8, even if you have V8 installed already. If you wish to use
|
135
|
-
your own V8 installation, rather than have it built for you, use the
|
136
|
-
`--with-system-v8` option.
|
137
|
-
|
138
|
-
Using RubyGems:
|
139
|
-
|
140
|
-
gem install libv8 -- --with-system-v8
|
141
|
-
|
142
|
-
Using Bundler (in your Gemfile):
|
143
|
-
|
144
|
-
bundle config build.libv8 --with-system-v8
|
145
|
-
|
146
|
-
#### Gotchas
|
147
|
-
|
148
|
-
Please note that if you intend to run your own V8, you must install
|
149
|
-
both V8 *and its headers* (found in libv8-dev for Debian-based distros).
|
150
|
-
|
151
|
-
Also, keep in mind that V8's API does not tend to be stable and in case you're
|
152
|
-
using your local version of V8 you *need* to **make sure that the the gems that
|
153
|
-
depend on libv8 are compatible with the API of the version of V8 present on your
|
154
|
-
system**. Otherwise those gems' builds *will* fail. Ideally you want the same
|
155
|
-
version of V8 as the one packaged in the installed version of the gem. See the
|
156
|
-
Versioning section for more information.
|
157
|
-
|
158
|
-
### Bring your own compiler
|
159
|
-
|
160
|
-
You can specify a compiler of your choice by either setting the `CXX`
|
161
|
-
environment variable before compilation, or by adding the
|
162
|
-
`--with-cxx=<compiler>` option to the bundle configuration:
|
163
|
-
|
164
|
-
bundle config build.libv8 --with-cxx=clang++
|
165
|
-
|
166
113
|
### About
|
167
114
|
|
168
115
|
This project spun off of
|
@@ -177,7 +124,6 @@ installed that gem.
|
|
177
124
|
### Sponsored by
|
178
125
|
|
179
126
|
<a href="http://frontside.io">![The Frontside](/thefrontside.png)</a>
|
180
|
-
<a href="https://www.scaleway.com">![Scaleway](/scaleway.png)</a>
|
181
127
|
|
182
128
|
### License
|
183
129
|
|
data/Rakefile
CHANGED
@@ -43,12 +43,12 @@ task :binary => :compile do
|
|
43
43
|
# We don't need most things for the binary
|
44
44
|
gemspec.files = []
|
45
45
|
gemspec.files += ['lib/libv8.rb', 'lib/libv8/version.rb']
|
46
|
-
gemspec.files += ['ext/libv8/
|
46
|
+
gemspec.files += ['ext/libv8/location.rb', 'ext/libv8/paths.rb']
|
47
47
|
gemspec.files += ['ext/libv8/.location.yml']
|
48
48
|
|
49
49
|
# V8
|
50
50
|
gemspec.files += Dir['vendor/v8/include/**/*.h']
|
51
|
-
gemspec.files += Dir['vendor/v8/out/**/*.a']
|
51
|
+
gemspec.files += Dir['vendor/v8/out.gn/**/*.a']
|
52
52
|
|
53
53
|
FileUtils.chmod 0644, gemspec.files
|
54
54
|
FileUtils.mkdir_p 'pkg'
|
data/ext/libv8/builder.rb
CHANGED
@@ -5,79 +5,40 @@ require 'mkmf'
|
|
5
5
|
require 'rbconfig'
|
6
6
|
require 'shellwords'
|
7
7
|
require 'libv8/version'
|
8
|
-
require File.expand_path '../compiler', __FILE__
|
9
8
|
require File.expand_path '../arch', __FILE__
|
10
|
-
require File.expand_path '../make', __FILE__
|
11
|
-
require File.expand_path '../patcher', __FILE__
|
12
9
|
|
13
10
|
module Libv8
|
14
11
|
class Builder
|
15
12
|
include Libv8::Arch
|
16
|
-
include Libv8::Make
|
17
|
-
include Libv8::Patcher
|
18
13
|
|
19
|
-
def
|
20
|
-
|
14
|
+
def gn_args
|
15
|
+
%W(is_debug=#{debug_build? ? 'true' : 'false'}
|
16
|
+
symbol_level=#{debug_build? ? '-1' : '0'}
|
17
|
+
is_component_build=false
|
18
|
+
v8_monolithic=true
|
19
|
+
v8_use_external_startup_data=false
|
20
|
+
target_cpu="#{libv8_arch}"
|
21
|
+
v8_target_cpu="#{libv8_arch}"
|
22
|
+
treat_warnings_as_errors=false
|
23
|
+
v8_enable_i18n_support=false).join(' ')
|
21
24
|
end
|
22
25
|
|
23
|
-
def
|
24
|
-
|
25
|
-
"#{libv8_arch}.#{profile}"
|
26
|
+
def generate_gn_args
|
27
|
+
system "gn gen out.gn/libv8 --args='#{gn_args}'"
|
26
28
|
end
|
27
29
|
|
28
|
-
def
|
29
|
-
|
30
|
-
defines << 'v8_use_external_startup_data=0'
|
31
|
-
|
32
|
-
# Do not use the embedded toolchain
|
33
|
-
defines << 'use_sysroot=0'
|
34
|
-
defines << 'linux_use_bundled_binutils=0'
|
35
|
-
defines << 'linux_use_bundled_gold=0'
|
36
|
-
defines << 'make_clang_dir=""'
|
37
|
-
defines << 'clang_dir=""'
|
38
|
-
|
39
|
-
# Pass clang flag to GYP in order to work around GCC compilation failures
|
40
|
-
defines << "clang=#{@compiler.is_a?(Compiler::Clang) ? '1' : '0'}"
|
41
|
-
|
42
|
-
# Add contents of the GYP_DEFINES environment variable if present
|
43
|
-
defines << ENV['GYP_DEFINES'] unless ENV['GYP_DEFINES'].nil?
|
44
|
-
|
45
|
-
"GYP_DEFINES=\"#{defines.join ' '}\""
|
46
|
-
end
|
47
|
-
|
48
|
-
def make_flags(*flags)
|
49
|
-
# Disable i18n
|
50
|
-
flags << 'i18nsupport=off'
|
51
|
-
|
52
|
-
# Solaris / Smart OS requires additional -G flag to use with -fPIC
|
53
|
-
flags << "CFLAGS=-G" if @compiler.target =~ /solaris/
|
54
|
-
|
55
|
-
# Disable werror as this version of v8 is getting difficult to maintain
|
56
|
-
# with it on
|
57
|
-
flags << 'werror=no'
|
58
|
-
|
59
|
-
# Append GYP variable definitions
|
60
|
-
flags << gyp_defines
|
61
|
-
|
62
|
-
# Append manually specified MAKEFLAGS
|
63
|
-
flags << ENV['MAKEFLAGS'] if ENV['MAKEFLAGS']
|
64
|
-
ENV['MAKEFLAGS'] = nil
|
65
|
-
|
66
|
-
"#{make_target} #{flags.join ' '}"
|
30
|
+
def debug_build?
|
31
|
+
enable_config('debug')
|
67
32
|
end
|
68
33
|
|
69
34
|
def build_libv8!
|
70
35
|
setup_python!
|
71
36
|
setup_build_deps!
|
72
37
|
Dir.chdir(File.expand_path('../../../vendor/v8', __FILE__)) do
|
73
|
-
fail 'No compilers available' if @compiler.nil?
|
74
|
-
patch!
|
75
|
-
print_build_info
|
76
38
|
puts 'Beginning compilation. This will take some time.'
|
39
|
+
generate_gn_args
|
77
40
|
|
78
|
-
|
79
|
-
puts "Building v8 with #{command}"
|
80
|
-
system command
|
41
|
+
system 'ninja -v -C out.gn/libv8 v8_monolith'
|
81
42
|
end
|
82
43
|
return $?.exitstatus
|
83
44
|
end
|
@@ -112,38 +73,24 @@ module Libv8
|
|
112
73
|
#
|
113
74
|
def setup_build_deps!
|
114
75
|
ENV['PATH'] = "#{File.expand_path('../../../vendor/depot_tools', __FILE__)}:#{ENV['PATH']}"
|
76
|
+
|
115
77
|
Dir.chdir(File.expand_path('../../../vendor', __FILE__)) do
|
116
|
-
unless Dir.exists?
|
117
|
-
system "
|
118
|
-
else
|
119
|
-
system "env #{gyp_defines} gclient fetch" or fail "could not fetch v8 build dependencies commits"
|
78
|
+
unless Dir.exists?('v8') || File.exists?('.gclient')
|
79
|
+
system "fetch v8" or fail "unable to fetch v8 source"
|
120
80
|
end
|
81
|
+
|
121
82
|
Dir.chdir('v8') do
|
83
|
+
system 'git fetch origin'
|
122
84
|
unless system "git checkout #{source_version}"
|
123
85
|
fail "unable to checkout source for v8 #{source_version}"
|
124
86
|
end
|
125
|
-
system "
|
126
|
-
system "git checkout Makefile" # Work around a weird bug on FreeBSD
|
87
|
+
system "gclient sync" or fail "could not sync v8 build dependencies"
|
127
88
|
end
|
128
89
|
end
|
129
90
|
end
|
130
91
|
|
131
92
|
private
|
132
93
|
|
133
|
-
def choose_compiler
|
134
|
-
compiler = if with_config('cxx') || ENV['CXX']
|
135
|
-
with_config('cxx') || ENV['CXX']
|
136
|
-
else
|
137
|
-
begin
|
138
|
-
MakeMakefile::CONFIG['CXX'] # stdlib > 2.0.0
|
139
|
-
rescue NameError
|
140
|
-
RbConfig::CONFIG['CXX'] # stdlib < 2.0.0
|
141
|
-
end
|
142
|
-
end
|
143
|
-
|
144
|
-
Libv8::Compiler.type_of(compiler).new compiler
|
145
|
-
end
|
146
|
-
|
147
94
|
def python_version
|
148
95
|
if system 'which python 2>&1 > /dev/null'
|
149
96
|
`python -c 'import platform; print(platform.python_version())'`.chomp
|
@@ -151,17 +98,5 @@ module Libv8
|
|
151
98
|
"not available"
|
152
99
|
end
|
153
100
|
end
|
154
|
-
|
155
|
-
def print_build_info
|
156
|
-
puts "Compiling v8 for #{libv8_arch}"
|
157
|
-
|
158
|
-
puts "Using python #{python_version}"
|
159
|
-
|
160
|
-
puts "Using compiler: #{@compiler} (#{@compiler.name} version #{@compiler.version})"
|
161
|
-
unless @compiler.compatible?
|
162
|
-
warn "Unable to find a compiler officially supported by v8."
|
163
|
-
warn "It is recommended to use clang v3.5 or GCC v4.8 or higher"
|
164
|
-
end
|
165
|
-
end
|
166
101
|
end
|
167
102
|
end
|
data/ext/libv8/extconf.rb
CHANGED
data/ext/libv8/paths.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
require 'rbconfig'
|
2
2
|
require 'shellwords'
|
3
|
-
require File.expand_path '../arch', __FILE__
|
4
3
|
|
5
4
|
module Libv8
|
6
5
|
module Paths
|
@@ -11,29 +10,17 @@ module Libv8
|
|
11
10
|
end
|
12
11
|
|
13
12
|
def object_paths
|
14
|
-
[
|
15
|
-
|
16
|
-
|
13
|
+
[Shellwords.escape(File.join(vendored_source_path,
|
14
|
+
'out.gn',
|
15
|
+
'libv8',
|
16
|
+
'obj',
|
17
|
+
"libv8_monolith.#{config['LIBEXT']}"))]
|
17
18
|
end
|
18
19
|
|
19
20
|
def config
|
20
21
|
RbConfig::MAKEFILE_CONFIG
|
21
22
|
end
|
22
23
|
|
23
|
-
def libv8_object(name)
|
24
|
-
filename = "#{libv8_profile}/libv8_#{name}.#{config['LIBEXT']}"
|
25
|
-
unless File.exist? filename
|
26
|
-
filename = "#{libv8_profile}/obj.target/tools/gyp/libv8_#{name}.#{config['LIBEXT']}"
|
27
|
-
end
|
28
|
-
return filename
|
29
|
-
end
|
30
|
-
|
31
|
-
def libv8_profile
|
32
|
-
base = "#{vendored_source_path}/out/#{Libv8::Arch.libv8_arch}"
|
33
|
-
debug = "#{base}.debug"
|
34
|
-
File.exist?(debug) ? debug : "#{base}.release"
|
35
|
-
end
|
36
|
-
|
37
24
|
def vendored_source_path
|
38
25
|
File.expand_path "../../../vendor/v8", __FILE__
|
39
26
|
end
|
data/lib/libv8/version.rb
CHANGED
data/spec/location_spec.rb
CHANGED
@@ -55,7 +55,6 @@ describe "libv8 locations" do
|
|
55
55
|
allow(@context).to receive(:ldflags) {@ldflags ||= "-lobjc -lpthread"}
|
56
56
|
|
57
57
|
allow(Libv8::Paths).to receive(:vendored_source_path) {"/foo bar/v8"}
|
58
|
-
allow(Libv8::Arch).to receive(:libv8_arch) {'x64'}
|
59
58
|
@location.configure @context
|
60
59
|
end
|
61
60
|
|
@@ -64,7 +63,7 @@ describe "libv8 locations" do
|
|
64
63
|
end
|
65
64
|
|
66
65
|
it "prepends the locations of any libv8 objects on the the ldflags" do
|
67
|
-
expect(@context.ldflags).to eql "/foo\\ bar/v8/out
|
66
|
+
expect(@context.ldflags).to eql "/foo\\ bar/v8/out.gn/libv8/obj/libv8_monolith.a -lobjc -lpthread"
|
68
67
|
end
|
69
68
|
end
|
70
69
|
end
|