Skip to content
This repository has been archived by the owner on Dec 4, 2023. It is now read-only.

Update to 8.4.255 #301

Merged
merged 5 commits into from Jul 20, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -15,4 +15,5 @@ lib/libv8/VERSION
/release/**/.scaleway
/vendor/.gclient
/vendor/.gclient_entries
/vendor/.cipd
/vendor/v8/
18 changes: 12 additions & 6 deletions .travis.yml
Expand Up @@ -7,10 +7,12 @@ rvm:
- 2.5
matrix:
include:
- rvm: 2.6
os: osx
osx_image: xcode9.4.1
fast_finish: true
- os: osx
osx_image: xcode12
- os: osx
osx_image: xcode11.3
- os: osx
osx_image: xcode10.1
addons:
apt:
packages:
Expand All @@ -26,18 +28,22 @@ before_install:
script:
- git submodule update --init
- bundle exec rake spec binary --trace
before_deploy:
- bundle exec rake osx_varients --trace
deploy:
provider: releases
file: $(git ls-files -o pkg | head -1)
file_glob: true
file: pkg/*.gem
api_key:
secure: OMCBceg89uRnU+FIPAPbeOK2pISvV4Cz62r9iTRIGXQCOOXX8M40i77/3DmtkMtc9FEuNyAu1+CH886PL2WtZZPK4CmEU3HuqXz1a5VsCI+zcAZL1tevKvblXOVQ3MG+B/SZRC3rEzGwjk4027WtzCCGoGCLUu4TFJP05+/8XN4=
skip_cleanup: true
on:
tags: true
# condition: $TRAVIS_OS_NAME = osx
rvm: '2.7' # Only deploy 1 of each platform
cache:
bundler: true
notifications:
recipients:
- cowboyd@thefrontside.net
- bordjukov@gmail.com
- nightpool@cybre.space
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,7 @@
### v8.4.255.0 - 2020-07-15

* Update upstream v8 version to 8.4.255.0

### v7.3.495.0 - 2020-04-14

* Update upstream v8 version to 7.3.495.0
Expand Down
3 changes: 0 additions & 3 deletions README.md
Expand Up @@ -26,9 +26,6 @@ platforms.
* x86_64-darwin-19
* x86_64-darwin-18
* x86_64-darwin-17
* x86_64-darwin-16
* x86_64-darwin-15
* x86_64-darwin-14
* x86_64-linux
* x86-linux

Expand Down
66 changes: 29 additions & 37 deletions Rakefile
@@ -1,6 +1,7 @@
require 'bundler/setup'
require 'rspec/core/rake_task'
require 'tmpdir'
require 'rubygems/package'

Bundler::GemHelper.install_tasks
RSpec::Core::RakeTask.new :spec
Expand All @@ -20,9 +21,20 @@ DISTRIBUTIONS = [
module Helpers
module_function
def binary_gemspec(platform = Gem::Platform.local)
gemspec = eval(File.read 'libv8.gemspec')
gemspec.platform = platform
gemspec
eval(File.read 'libv8.gemspec').tap do |gemspec|
gemspec.platform = platform
gemspec.extensions.clear

# We don't need most things for the binary
gemspec.files = []
gemspec.files += ['lib/libv8.rb', 'lib/libv8/version.rb']
gemspec.files += ['ext/libv8/location.rb', 'ext/libv8/paths.rb']
gemspec.files += ['ext/libv8/.location.yml']

# V8
gemspec.files += Dir['vendor/v8/include/**/*.h']
gemspec.files += Dir['vendor/v8/out.gn/**/*.a']
end
end

def binary_gem_name(platform = Gem::Platform.local)
Expand All @@ -38,28 +50,11 @@ end
desc "build a binary gem #{Helpers.binary_gem_name}"
task :binary => :compile do
gemspec = Helpers.binary_gemspec
gemspec.extensions.clear

# We don't need most things for the binary
gemspec.files = []
gemspec.files += ['lib/libv8.rb', 'lib/libv8/version.rb']
gemspec.files += ['ext/libv8/location.rb', 'ext/libv8/paths.rb']
gemspec.files += ['ext/libv8/.location.yml']

# V8
gemspec.files += Dir['vendor/v8/include/**/*.h']
gemspec.files += Dir['vendor/v8/out.gn/**/*.a']

FileUtils.chmod 0644, gemspec.files
FileUtils.mkdir_p 'pkg'

package = if Gem::VERSION < '2.0.0'
Gem::Builder.new(gemspec).build
else
require 'rubygems/package'
Gem::Package.build gemspec
end

package = Gem::Package.build gemspec
FileUtils.mv package, 'pkg'
end

Expand Down Expand Up @@ -110,22 +105,19 @@ end
task :default => [:compile, :spec]
task :build => [:clean]

task :repack, [:gemfile, :new_arch] do |t, args|
dir = Dir::mktmpdir

begin
sh "gem unpack #{args[:gemfile]} --target=#{dir}"
sh "gem spec #{args[:gemfile]} --ruby > #{dir}/repack.gemspec"
Dir.chdir(dir) do
sh "sed -iorig 's/^ s.platform = .*$/ s.platform = \"#{args[:new_arch]}\".freeze/' repack.gemspec"
Dir.chdir(Dir.glob("libv8-*/").first) do
sh 'mv ../repack.gemspec ./'
sh 'gem build repack.gemspec'
end
end
desc 'Generate OSX varient platform names. Requires `compile` to already have been run.'
task :osx_varients do
gemspec = Helpers.binary_gemspec
next unless gemspec.platform.os == 'osx'

%w(x86_64 universal).each do |cpu|
platform = gemspec.platform.dup
next unless platform.cpu != cpu

platform.cpu = cpu
gemspec.platform = platform

sh "mv #{dir}/*/*.gem ./pkg/"
ensure
FileUtils.remove_entry_secure dir
package = Gem::Package.build gemspec
FileUtils.mv package, 'pkg'
end
end
3 changes: 2 additions & 1 deletion ext/libv8/builder.rb
Expand Up @@ -23,7 +23,8 @@ def gn_args
v8_use_external_startup_data=false
target_cpu="#{libv8_arch}"
v8_target_cpu="#{libv8_arch}"
treat_warnings_as_errors=false).join(' ')
treat_warnings_as_errors=false
icu_use_data_file=false).join(' ')
end

def generate_gn_args
Expand Down
2 changes: 1 addition & 1 deletion lib/libv8/version.rb
@@ -1,3 +1,3 @@
module Libv8
VERSION = "7.3.495.0"
VERSION = "8.4.255.0"
end
2 changes: 1 addition & 1 deletion vendor/depot_tools
Submodule depot_tools updated from 9c0620 to 9d9199