diff --git a/.travis.yml b/.travis.yml index abe3cd3c..9ab65991 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,37 +1,53 @@ +language: ruby rvm: - - 2.3.0 - - 2.2.4 - - 2.1.8 - - 1.9.3 + - 2.4.0 + - 2.3.3 + - 2.2 - rbx matrix: include: - - rvm: system + - rvm: 2.4.0 + os: osx + osx_image: xcode8.2 + - rvm: 2.4.0 os: osx osx_image: xcode7.3 - rvm: system os: osx - osx_image: xcode6.4 + osx_image: xcode8.2 - rvm: system os: osx - osx_image: beta-xcode6.2 -bundler_args: --jobs=1 --retry=3 + osx_image: xcode7.3 + - rvm: ruby-2.3.2-clang + env: CXX=clang++ + - rvm: 1.9.3 + allow_failures: + - rvm: 1.9.3 + - rvm: rbx + fast_finish: true +bundler_args: --jobs=4 --retry=3 before_install: - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update; fi - if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install git-svn; fi - if [ "$TRAVIS_OS_NAME" == "linux" ]; then gem update --system; fi - if [ "$TRAVIS_OS_NAME" == "linux" ]; then gem update bundler; fi - - if [ "$TRAVIS_OS_NAME" == "osx" ]; then sudo gem install bundler ; fi + - if [ "$TRAVIS_OS_NAME" == "osx" -a "$TRAVIS_RUBY_VERSION" == "system" ]; then sudo gem install bundler; fi + - if [ "$TRAVIS_OS_NAME" == "osx" -a "$TRAVIS_RUBY_VERSION" != "system" ]; then gem update --system; fi + - if [ "$TRAVIS_OS_NAME" == "osx" -a "$TRAVIS_RUBY_VERSION" != "system" ]; then gem update bundler; fi script: - MAKEFLAGS+=-j8 bundle exec rake checkout compile spec binary --trace deploy: provider: releases file: $(git ls-files -o pkg | head -1) api_key: - secure: hvq5MEvIq3qk2OC3qGj7dVjq8p6RzGdY98Gq+cSn2MaNr3AUFgJw11458ZGqwrsB3V9TLnPIVZFeSRd2PWYfUx+aan5qtKX4yGc17UJ5IyFPSyCgQj5N1NR40pAwEmFJkVcLXDSMhIVMlo64lCfetCS7apOewOxuH85JcZENrIiEyoOH5rWpd7W8idNTy+dCUaLEN30rOuA2JP0KPgP9uwf5J89tzGp/THy0Dk++pyz9JdOiPxI07CUf/zqHGwm8F4XAdx0SxRwesokDDU2x5dik1cYVVYqcdwHUpz4ywaT6WjjQ50Kt0KHi869kCMkUZ7TtNbCXUoWFZavkK7DSUSmJeuEniaTYxKRPf7bhWJudKko/qwWhLLAWzVtfwGc5uJnE7ZcpeBdbcOLhv+zOFVyes9S16VGxWpkEZykgGynltvbcX3gLb7cYYtZkoTMdeeTZpuHSyuupHCBSU+KM76AeeXG9zpX6STR3jYDKrf1ZqibwEH6AR77BOG+pK7zstD8sZaBvp+KERgYPg6+kA2omVazWFrYK1pIi8L2wzuTWmajL83STz+P+iuA0a4xXA+XGzJhZ9B/U+Ib2wf5R7y9/EdkF/xTN5nG2sHKHgswGkXf1WCfR1qxMBXHzIvyJcEeBg0bskiiedlgPtbZVG5Utrxt0Q9+7VDz/4A5NNZ4= + secure: OMCBceg89uRnU+FIPAPbeOK2pISvV4Cz62r9iTRIGXQCOOXX8M40i77/3DmtkMtc9FEuNyAu1+CH886PL2WtZZPK4CmEU3HuqXz1a5VsCI+zcAZL1tevKvblXOVQ3MG+B/SZRC3rEzGwjk4027WtzCCGoGCLUu4TFJP05+/8XN4= skip_cleanup: true on: tags: true + condition: $TRAVIS_OS_NAME = osx + all_branches: true +cache: + bundler: true notifications: recipients: - cowboyd@thefrontside.net diff --git a/CHANGELOG.md b/CHANGELOG.md index 1ead0259..01c2e711 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,13 @@ -### Unreleased +### 3.16.14.18, 3.16.14.19 - 2016-03-01: + +* Dramatically reduce the binary size on macOS (thanks @aviat) +* Fix compilation on FreeBSD 11 #231 + +### 3.16.14.16, 3.16.14.17 - 2016-04-28: + +* macOS Sierra binary gem + +### 3.16.14.14, 3.16.14.15 - 2016-04-28: * Enhance compiler version detection and architecture detection #212 * Introduce darwin13-15 binary building #211 diff --git a/Rakefile b/Rakefile index c33ffbbf..eda78849 100644 --- a/Rakefile +++ b/Rakefile @@ -92,7 +92,7 @@ task :devkit do end namespace :build do - ['x86_64-linux', 'x86-linux', 'x86_64-freebsd10'].each do |arch| + ['x86_64-linux', 'x86-linux', 'x86_64-freebsd10', 'x86_64-freebsd11'].each do |arch| desc "build binary gem for #{arch}" task arch do arch_dir = Pathname(__FILE__).dirname.join("release/#{arch}") diff --git a/lib/libv8/version.rb b/lib/libv8/version.rb index 96b2e8cf..5fd56557 100644 --- a/lib/libv8/version.rb +++ b/lib/libv8/version.rb @@ -1,3 +1,3 @@ module Libv8 - VERSION = "3.16.14.15" + VERSION = "3.16.14.19" end diff --git a/patches/disable-xcode-debugging.patch b/patches/disable-xcode-debugging.patch new file mode 100644 index 00000000..8a6d7adf --- /dev/null +++ b/patches/disable-xcode-debugging.patch @@ -0,0 +1,11 @@ +diff --git a/build/standalone.gypi b/build/standalone.gypi +index 125c5bf..7c1fe2b 100644 +--- a/build/standalone.gypi ++++ b/build/standalone.gypi +@@ -194,6 +194,7 @@ + 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES', + 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden + 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics ++ 'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO', # No -gdwarf-2 + 'GCC_VERSION': 'com.apple.compilers.llvmgcc42', + 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof diff --git a/patches/do-not-use-MAP_NORESERVE-on-freebsd.patch b/patches/do-not-use-MAP_NORESERVE-on-freebsd.patch new file mode 100644 index 00000000..0711825b --- /dev/null +++ b/patches/do-not-use-MAP_NORESERVE-on-freebsd.patch @@ -0,0 +1,31 @@ +diff --git a/src/platform-freebsd.cc b/src/platform-freebsd.cc +index 62653b4ca7..a64dd98ce5 100644 +--- a/src/platform-freebsd.cc ++++ b/src/platform-freebsd.cc +@@ -368,7 +368,7 @@ VirtualMemory::VirtualMemory(size_t size, size_t alignment) + void* reservation = mmap(OS::GetRandomMmapAddr(), + request_size, + PROT_NONE, +- MAP_PRIVATE | MAP_ANON | MAP_NORESERVE, ++ MAP_PRIVATE | MAP_ANON, + kMmapFd, + kMmapFdOffset); + if (reservation == MAP_FAILED) return; +@@ -440,7 +440,7 @@ void* VirtualMemory::ReserveRegion(size_t size) { + void* result = mmap(OS::GetRandomMmapAddr(), + size, + PROT_NONE, +- MAP_PRIVATE | MAP_ANON | MAP_NORESERVE, ++ MAP_PRIVATE | MAP_ANON, + kMmapFd, + kMmapFdOffset); + +@@ -470,7 +470,7 @@ bool VirtualMemory::UncommitRegion(void* base, size_t size) { + return mmap(base, + size, + PROT_NONE, +- MAP_PRIVATE | MAP_ANON | MAP_NORESERVE | MAP_FIXED, ++ MAP_PRIVATE | MAP_ANON | MAP_FIXED, + kMmapFd, + kMmapFdOffset) != MAP_FAILED; + } diff --git a/release/x86_64-freebsd11/Vagrantfile b/release/x86_64-freebsd11/Vagrantfile new file mode 100644 index 00000000..4ed1da65 --- /dev/null +++ b/release/x86_64-freebsd11/Vagrantfile @@ -0,0 +1,86 @@ +# -*- mode: ruby -*- +# vi: set ft=ruby : + +# All Vagrant configuration is done below. The "2" in Vagrant.configure +# configures the configuration version (we support older styles for +# backwards compatibility). Please don't change it unless you know what +# you're doing. +Vagrant.configure(2) do |config| + # The most common configuration options are documented and commented below. + # For a complete reference, please see the online documentation at + # https://docs.vagrantup.com. + + # Every Vagrant development environment requires a box. You can search for + # boxes at https://atlas.hashicorp.com/search. + config.vm.box = "freebsd/FreeBSD-11.0-RELEASE-p1" + + # Disable automatic box update checking. If you disable this, then + # boxes will only be checked for updates when the user runs + # `vagrant box outdated`. This is not recommended. + # config.vm.box_check_update = false + + # Create a forwarded port mapping which allows access to a specific port + # within the machine from a port on the host machine. In the example below, + # accessing "localhost:8080" will access port 80 on the guest machine. + # config.vm.network "forwarded_port", guest: 80, host: 8080 + + # Create a private network, which allows host-only access to the machine + # using a specific IP. + # config.vm.network "private_network", ip: "192.168.33.10" + config.vm.network "private_network", ip: "192.168.33.11" + + # Create a public network, which generally matched to bridged network. + # Bridged networks make the machine appear as another physical device on + # your network. + # config.vm.network "public_network" + + # Share an additional folder to the guest VM. The first argument is + # the path on the host to the actual folder. The second argument is + # the path on the guest to mount the folder. And the optional third + # argument is a set of non-required options. + config.vm.synced_folder ".", "/vagrant", nfs: true + config.vm.synced_folder "../..", "/libv8", nfs: true + + + # Provider-specific configuration so you can fine-tune various + # backing providers for Vagrant. These expose provider-specific options. + # Example for VirtualBox: + # + # config.vm.provider "virtualbox" do |vb| + # # Display the VirtualBox GUI when booting the machine + # vb.gui = true + # + # # Customize the amount of memory on the VM: + # vb.memory = "1024" + # end + # + # View the documentation for the provider you are using for more + # information on available options. + # Various settings as suggested by the FreeBSD community + config.ssh.shell = "sh" + config.vm.base_mac = "080027D14C66" + config.vm.provider :virtualbox do |vb| + vb.customize ["modifyvm", :id, "--hwvirtex", "on"] + vb.customize ["modifyvm", :id, "--audio", "none"] + vb.customize ["modifyvm", :id, "--nictype1", "virtio"] + vb.customize ["modifyvm", :id, "--nictype2", "virtio"] + end + + # Define a Vagrant Push strategy for pushing to Atlas. Other push strategies + # such as FTP and Heroku are also available. See the documentation at + # https://docs.vagrantup.com/v2/push/atlas.html for more information. + # config.push.define "atlas" do |push| + # push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME" + # end + + # Enable provisioning with a shell script. Additional provisioners such as + # Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the + # documentation for more information about their specific syntax and use. + # config.vm.provision "shell", inline: <<-SHELL + # sudo apt-get update + # sudo apt-get install -y apache2 + # SHELL + config.vm.provision "shell", inline: <<-SHELL + pkg install -y gmake ruby rubygem-bundler git-subversion python2 + SHELL +end