Skip to content

Commit

Permalink
Issue 6063, 6531 - Update V8 to 6.5.254.41, use C++14 and NDK-r16b
Browse files Browse the repository at this point in the history
  • Loading branch information
xxxz committed Apr 18, 2018
1 parent 549616e commit ea5309a
Show file tree
Hide file tree
Showing 10 changed files with 38 additions and 26 deletions.
12 changes: 6 additions & 6 deletions .travis.yml
Expand Up @@ -22,12 +22,12 @@ python: '2.7'

env:
global:
- URL_PREFIX=https://v8.eyeofiles.com/v8-9a4991959e231351e52266b631cbd36f8341bdc3/
- URL_PREFIX=https://v8.eyeofiles.com/v8-3cdaf01c4043e19965efc5ef48df5314960b898f/
matrix:
- BUILD_ACTION=test
- BUILD_ACTION=android_arm ANDROID_NDK_ROOT=${TRAVIS_BUILD_DIR}/third_party/android-ndk-r12b
- BUILD_ACTION=android_x86 ANDROID_NDK_ROOT=${TRAVIS_BUILD_DIR}/third_party/android-ndk-r12b
- BUILD_ACTION=android_arm64 ANDROID_NDK_ROOT=${TRAVIS_BUILD_DIR}/third_party/android-ndk-r12b
- BUILD_ACTION=android_arm ANDROID_NDK_ROOT=${TRAVIS_BUILD_DIR}/third_party/android-ndk-r16b
- BUILD_ACTION=android_x86 ANDROID_NDK_ROOT=${TRAVIS_BUILD_DIR}/third_party/android-ndk-r16b
- BUILD_ACTION=android_arm64 ANDROID_NDK_ROOT=${TRAVIS_BUILD_DIR}/third_party/android-ndk-r16b

before_script:
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew update; fi
Expand All @@ -36,8 +36,8 @@ before_script:
- bash .travis/prepare-prebuilt-v8.sh
- sed -i.bak '/third_party\/v8/d' dependencies
- ./ensure_dependencies.py
- if [[ -n "$ANDROID_NDK_ROOT" && "$TRAVIS_OS_NAME" == "linux" ]]; then wget https://dl.google.com/android/repository/android-ndk-r12b-linux-x86_64.zip -O third_party/android-ndk.zip ; fi
- if [[ -n "$ANDROID_NDK_ROOT" && "$TRAVIS_OS_NAME" == "osx" ]]; then wget https://dl.google.com/android/repository/android-ndk-r12b-darwin-x86_64.zip -O third_party/android-ndk.zip ; fi
- if [[ -n "$ANDROID_NDK_ROOT" && "$TRAVIS_OS_NAME" == "linux" ]]; then wget https://dl.google.com/android/repository/android-ndk-r16b-linux-x86_64.zip -O third_party/android-ndk.zip ; fi
- if [[ -n "$ANDROID_NDK_ROOT" && "$TRAVIS_OS_NAME" == "osx" ]]; then wget https://dl.google.com/android/repository/android-ndk-r16b-darwin-x86_64.zip -O third_party/android-ndk.zip ; fi
- if [[ -n "$ANDROID_NDK_ROOT" ]]; then unzip -q third_party/android-ndk.zip -d third_party/ ; fi

script:
Expand Down
4 changes: 3 additions & 1 deletion Makefile
Expand Up @@ -128,7 +128,7 @@ build-v8-android: v8_android_multi_${HOST_OS}_${ANDROID_ARCH}

android_multi: ${BUILD_V8} ensure_dependencies
GYP_DEFINES="${GYP_PARAMETERS} ${ABP_GYP_PARAMETERS}" \
python ./make_gyp_wrapper.py --depth=. -f make-android -Ilibadblockplus.gypi --generator-output=${BUILD_DIR} -Gandroid_ndk_version=r12b libadblockplus.gyp
python ./make_gyp_wrapper.py --depth=. -f make-android -Ilibadblockplus.gypi --generator-output=${BUILD_DIR} -Gandroid_ndk_version=r16b libadblockplus.gyp
$(ANDROID_NDK_ROOT)/ndk-build -C ${BUILD_DIR} installed_modules \
BUILDTYPE=Release \
APP_ABI=$(ANDROID_ABI) \
Expand All @@ -138,6 +138,8 @@ android_multi: ${BUILD_V8} ensure_dependencies
APP_BUILD_SCRIPT=Makefile \
NDK_PROJECT_PATH=. \
NDK_OUT=. \
LOCAL_DISABLE_FATAL_LINKER_WARNINGS=true \
LOCAL_LDFLAGS="-Wl,--allow-multiple-definition" \
NDK_APP_DST_DIR=$(ANDROID_DEST_DIR)
endif

1 change: 1 addition & 0 deletions android-v8-options.gypi
Expand Up @@ -2,6 +2,7 @@
'variables': {
'want_separate_host_toolset%': 1,
'android_ndk_root': '<!(echo ${ANDROID_NDK_ROOT})',
'android_ndk_version': 'r16b',
'clang_dir': '/usr/',
'make_clang_dir': '/usr/',
},
Expand Down
4 changes: 2 additions & 2 deletions appveyor.yml
Expand Up @@ -2,7 +2,7 @@ version: 1.0.{build}
pull_requests:
do_not_increment_build_number: true
skip_tags: true
image: Visual Studio 2015
image: Visual Studio 2017
configuration:
- Release
- Debug
Expand All @@ -17,7 +17,7 @@ install:
- C:\msys64\usr\bin\bash -lc "cd ${APPVEYOR_BUILD_FOLDER}; sed -i '/third_party\/v8/d' dependencies"
- cmd: ensure_dependencies.py
environment:
URL_PREFIX: https://v8.eyeofiles.com/v8-9a4991959e231351e52266b631cbd36f8341bdc3/
URL_PREFIX: https://v8.eyeofiles.com/v8-3cdaf01c4043e19965efc5ef48df5314960b898f/
before_build:
- cmd: set "GYP_DEFINES=libv8_include_dir=third_party/prebuilt-v8/include libv8_lib_dir=../../third_party/prebuilt-v8 libv8_no_build=true"
- cmd: createsolution.bat
Expand Down
6 changes: 2 additions & 4 deletions build-v8.cmd
Expand Up @@ -4,17 +4,15 @@ SETLOCAL
rem %1 - MSBuildBinPath, e.g. c:\Program Files (x86)\MSBuild\14.0\Bin
rem %2 - arch {ia32, x64}
rem %3 - configuration {Release, Debug}
rem %4 - platform toolset, e.g. v140
set MsBuildBinPath=%~1
set ARCH=%~2
set CONFIGURATION=%~3
set PlatformToolset=%~4

pushd "%~dp0"

@python msvs_gyp_wrapper.py --depth=build\%ARCH%\v8 -f msvs -I build-v8.gypi --generator-output=build\%ARCH%\v8 -G msvs_version=2015 -Dtarget_arch=%ARCH% -Dhost_arch=%ARCH% third_party/v8/src/v8.gyp
@python msvs_gyp_wrapper.py --depth=build\%ARCH%\v8 -f msvs -I build-v8.gypi --generator-output=build\%ARCH%\v8 -G msvs_version=2017 -Dtarget_arch=%ARCH% -Dhost_arch=%ARCH% third_party/v8/src/v8.gyp

@"%MSBuildBinPath%/msbuild.exe" /m build/%ARCH%/v8/third_party/v8/src/v8.sln /p:PlatformToolset=%PlatformToolset% /p:Configuration=%CONFIGURATION% /target:v8_snapshot,v8_libplatform,v8_libsampler
@"%MSBuildBinPath%/msbuild.exe" /m build/%ARCH%/v8/third_party/v8/src/v8.sln /p:Configuration=%CONFIGURATION% /target:v8_snapshot,v8_libplatform,v8_libsampler

popd

Expand Down
12 changes: 12 additions & 0 deletions build-v8.gypi
Expand Up @@ -6,9 +6,21 @@
'v8_use_external_startup_data': 0,
'v8_use_snapshot': 1,
'v8_random_seed%': 0,
'v8_android_log_stdout': 1,
},

'target_defaults': {
'defines': [
'__ANDROID_API__=16',
],
},
'conditions': [
['OS=="linux" or OS=="mac"', {
'target_defaults': {
'cflags': [ '-fPIC' ],
'cflags_cc': [ '-fPIC' ]
}
}],
['OS=="win"', {
'target_defaults': {
'configurations': {
Expand Down
4 changes: 2 additions & 2 deletions common.gypi
Expand Up @@ -14,14 +14,14 @@
# Adding -fpermissive to solve this.
# See https://issues.adblockplus.org/ticket/4950
# We might be able to do without after upgrading V8.
'cflags_cc': [ '-fno-rtti', '-std=c++11', '-fexceptions', '-fpermissive' ],
'cflags_cc': [ '-fno-rtti', '-std=c++14', '-fexceptions', '-fpermissive' ],
'cflags!': [ '-Werror', ],
'ldflags': [ '-pthread', ],
},
}],
['OS=="mac"', {
'xcode_settings': {
'CLANG_CXX_LANGUAGE_STANDARD': 'c++11',
'CLANG_CXX_LANGUAGE_STANDARD': 'c++14',
'CLANG_CXX_LIBRARY': 'libc++',
},
}],
Expand Down
4 changes: 2 additions & 2 deletions createsolution.bat
Expand Up @@ -6,6 +6,6 @@ python ensure_dependencies.py

mkdir build\ia32\shell
mkdir build\x64\shell
python msvs_gyp_wrapper.py --depth=build\ia32 -f msvs -G msvs_version=2015 -I libadblockplus.gypi --generator-output=build\ia32 -Dtarget_arch=ia32 -Dhost_arch=ia32 libadblockplus.gyp
python msvs_gyp_wrapper.py --depth=build\x64 -f msvs -G msvs_version=2015 -I libadblockplus.gypi --generator-output=build\x64 -Dtarget_arch=x64 -Dhost_arch=x64 libadblockplus.gyp
python msvs_gyp_wrapper.py --depth=build\ia32 -f msvs -G msvs_version=2017 -I libadblockplus.gypi --generator-output=build\ia32 -Dtarget_arch=ia32 -Dhost_arch=ia32 libadblockplus.gyp
python msvs_gyp_wrapper.py --depth=build\x64 -f msvs -G msvs_version=2017 -I libadblockplus.gypi --generator-output=build\x64 -Dtarget_arch=x64 -Dhost_arch=x64 libadblockplus.gyp
popd
14 changes: 7 additions & 7 deletions dependencies
Expand Up @@ -3,11 +3,11 @@ _self = buildtools/ensure_dependencies.py
buildtools = buildtools hg:6ab9eb46db2a git:2f2bf1f217314022327d4bd9c39002e9248dcf7f
adblockpluscore = adblockpluscore hg:5f5cea471d7e git:059151706b3d88c78f85ad3ebf2dddbc598a47fa
third_party/googletest = googletest-github hg:368e1f54e5f6 git:d225acc90bc3a8c420a9bcd1f033033c1ccd7fe0
third_party/gyp = gyp hg:2488397072ad git:8ffe7e7b1b82890a7e9ea21176bf039b6c53167b
third_party/v8 = v8-googlesource hg:3f696d7a8e86 git:9a4991959e231351e52266b631cbd36f8341bdc3
third_party/v8/base/trace_event/common = chromium-trace_event-common hg:23ca1cb1bb90 git:65d1d42a5df6c0a563a6fdfa58a135679185e5d9
third_party/v8/build = chromium-src-build hg:9cbbad34638b git:1808a907ce42f13b224c263e9843d718fc6d9c39
third_party/gyp = gyp hg:5382e1309be1 git:85707cef17503c05c0105fb0430fd8ada907d719
third_party/v8 = v8-googlesource hg:53878a34248d git:3cdaf01c4043e19965efc5ef48df5314960b898f
third_party/v8/base/trace_event/common = chromium-trace_event-common hg:63c6e10ea83a git:0e9a47d74970bee1bbfc063c47215406f8918699
third_party/v8/build = chromium-src-build hg:741226696ec2 git:b3a78cd03a95c30ff10f863f736249eb04f0f34d
third_party/v8/testing/gtest = googletest-github hg:324727ee9ad7 git:6f8a66431cb592dad629028a50b3dd418a408c87
third_party/v8/tools/gyp = gyp hg:94c61f14b4e6 git:eb296f67da078ec01f5e3a9ea9cdc6d26d680161
third_party/v8/tools/clang = chromium-src-tools-clang hg:057a211296cf git:844603c1fcd47f578931b3ccd583e19f816a3842
third_party/v8/third_party/icu = chromium-deps-icu hg:da2e19dff3f2 git:dfa798fe694702b43a3debc3290761f22b1acaf8
third_party/v8/tools/gyp = gyp hg:c8ca69b92a84 git:d61a9397e668fa9843c4aa7da9e79460fe590bfb
third_party/v8/tools/clang = chromium-src-tools-clang hg:62daeac63377 git:27088876ff821e8a1518383576a43662a3255d56
third_party/v8/third_party/icu = chromium-deps-icu hg:1b0a5846a073 git:c8ca2962b46670ec89071ffd1291688983cd319c
3 changes: 1 addition & 2 deletions v8.gypi
Expand Up @@ -66,8 +66,7 @@
'build-v8.cmd',
'$(MSBuildBinPath)',
'<(target_arch)',
'<(CONFIGURATION_NAME)',
'$(PlatformToolset)'
'<(CONFIGURATION_NAME)'
]
}],
}]
Expand Down

0 comments on commit ea5309a

Please sign in to comment.