1
0
Fork 0
mirror of https://github.com/rubyjs/libv8 synced 2023-03-27 23:21:48 -04:00

move to full checkout of the v8 source

This commit is contained in:
Charles Lowell 2015-07-03 14:55:40 -05:00
parent 8d97b7a290
commit 33b71c76d3
8 changed files with 34 additions and 32 deletions

3
.gitignore vendored
View file

@ -12,3 +12,6 @@ lib/libv8/VERSION
/ext/libv8/.location.yml
/release/**/libv8
/release/**/.vagrant
/vendor/.gclient
/vendor/.gclient_entries
/vendor/v8/

3
.gitmodules vendored
View file

@ -1,6 +1,3 @@
[submodule "vendor/v8"]
path = vendor/v8
url = https://chromium.googlesource.com/v8/v8.git
[submodule "vendor/depot_tools"]
path = vendor/depot_tools
url = https://chromium.googlesource.com/chromium/tools/depot_tools.git

View file

@ -74,8 +74,9 @@ end
desc "clean up artifacts of the build"
task :clean => [:clean_submodules] do
sh "rm -rf pkg"
sh "rm -rf vendor/v8"
sh "git clean -dxf"
end
task :default => [:compile, :spec]
task :build => [:clean_submodules]
task :build => [:clean]

View file

@ -1,4 +1,8 @@
unless $:.include? File.expand_path("../../../lib", __FILE__)
$:.unshift File.expand_path("../../../lib", __FILE__)
end
require 'mkmf'
require 'libv8/version'
require File.expand_path '../compiler', __FILE__
require File.expand_path '../arch', __FILE__
require File.expand_path '../make', __FILE__
@ -51,10 +55,10 @@ module Libv8
end
def build_libv8!
setup_python!
setup_build_deps!
Dir.chdir(File.expand_path('../../../vendor/v8', __FILE__)) do
fail 'No compilers available' if @compiler.nil?
setup_python!
setup_build_deps!
patch!
print_build_info
puts 'Beginning compilation. This will take some time.'
@ -77,9 +81,30 @@ module Libv8
end
end
##
# The release tag to checkout. If this is version 4.5.95.0 of the libv8 gem,
# then this will be 4.5.95
#
def source_version
Libv8::VERSION.gsub(/\.\d+$/, '')
end
##
# Checkout all of the V8 source and its dependencies using the
# chromium depot tools.
#
# https://chromium.googlesource.com/v8/v8.git#Getting-the-Code
#
def setup_build_deps!
fetch = File.expand_path('../../../vendor/depot_tools/fetch', __FILE__)
gclient = File.expand_path('../../../vendor/depot_tools/gclient', __FILE__)
`#{gclient} sync`
Dir.chdir(File.expand_path('../../../vendor', __FILE__)) do
`#{fetch} v8`
Dir.chdir('v8') do
`git checkout #{source_version}`
`#{gclient} sync`
end
end
end
private

View file

@ -19,7 +19,7 @@ Gem::Specification.new do |s|
submodules = `git submodule --quiet foreach 'echo $path'`.split("\n").map(&:chomp)
submodules.each do |submodule|
s.files += Dir.chdir(submodule) do
`git ls-files`.split("\n").reject {|f| f =~ /^out|^test|^benchmarks/}.map {|f| "#{submodule}/#{f}"}
`git ls-files`.split("\n").map {|f| "#{submodule}/#{f}"}
end
end

11
vendor/.gclient vendored
View file

@ -1,11 +0,0 @@
solutions = [
{ "name" : "v8",
"url" : "https://chromium.googlesource.com/v8/v8.git",
"deps_file" : "DEPS",
"managed" : True,
"custom_deps" : {
},
"safesync_url": "",
},
]
cache_dir = None

View file

@ -1,12 +0,0 @@
entries = {
'v8': 'https://chromium.googlesource.com/v8/v8.git',
'v8/build/gyp': 'https://chromium.googlesource.com/external/gyp.git@5122240c5e5c4d8da12c543d82b03d6089eb77c5',
'v8/buildtools': 'https://chromium.googlesource.com/chromium/buildtools.git@ecc8e253abac3b6186a97573871a084f4c0ca3ae',
'v8/testing/gmock': 'https://chromium.googlesource.com/external/googlemock.git@29763965ab52f24565299976b936d1265cb6a271',
'v8/testing/gtest': 'https://chromium.googlesource.com/external/googletest.git@23574bf2333f834ff665f894c97bef8a5b33a0a9',
'v8/third_party/icu': 'https://chromium.googlesource.com/chromium/deps/icu.git@7fe225d77f307fdbe24695179a84336ef95c1253',
'v8/tools/clang': 'https://chromium.googlesource.com/chromium/src/tools/clang.git@73ec8804ed395b0886d6edf82a9f33583f4a7902',
'v8/buildtools/clang_format/script': 'https://chromium.googlesource.com/chromium/llvm-project/cfe/tools/clang-format.git@81edd558fea5dd7855d67a1dc61db34ae8c1fd63',
'v8/buildtools/third_party/libc++/trunk': 'https://chromium.googlesource.com/chromium/llvm-project/libcxx.git@48198f9110397fff47fe7c37cbfa296be7d44d3d',
'v8/buildtools/third_party/libc++abi/trunk': 'https://chromium.googlesource.com/chromium/llvm-project/libcxxabi.git@4ad1009ab3a59fa7a6896d74d5e4de5885697f95',
}

1
vendor/v8 vendored

@ -1 +0,0 @@
Subproject commit b0493ed16c0b363a0e92bf4a790d4fd851c74e70