Skip to content

Commit

Permalink
Remove V8 debug symbols to improve build performance (#70)
Browse files Browse the repository at this point in the history
Cache the build artifacts of V8 to avoid having to recompile every time
  • Loading branch information
Taiki-San authored Dec 21, 2018
1 parent 941d6b9 commit dfb0b3e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ branches:
only:
- master

cache:
directories:
- $HOME/build/sqreen/PyMiniRacer/py_mini_racer/extension/v8/

matrix:
include:
- dist: trusty
Expand Down
10 changes: 9 additions & 1 deletion build_mac_os_x_wheels.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
set -e
set -x

PATH_TO_V8=$HOME/build/sqreen/PyMiniRacer/py_mini_racer/extension/v8/

for PYVERSION in 2.7 3.4 3.5 3.6 3.7; do
curl https://bootstrap.pypa.io/get-pip.py | python
pip install virtualenv
Expand All @@ -11,7 +13,13 @@ for PYVERSION in 2.7 3.4 3.5 3.6 3.7; do
. ./venv_${PYVERSION}/bin/activate
pip install certifi
pip install -r requirements/setup.txt
python setup.py build_v8

# Recyling V8
if [ ! -d $PATH_TO_V8 ] || [ -z "$(ls -A $PATH_TO_V8)" ]; then
rm -rf $PATH_TO_V8
python setup.py build_v8
fi

export LDSHARED="clang++ -bundle -undefined dynamic_lookup -arch i386 -arch x86_64"
python setup.py bdist_wheel
deactivate
Expand Down
5 changes: 3 additions & 2 deletions py_mini_racer/extension/v8_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,9 @@ def gen_makefiles(path):
'v8_monolithic': 'true',
'use_gold': 'false',
'use_allocator_shim': 'false',
'symbol_level': '1',
'strip_debug_info': 'false',
'is_debug': 'false',
'symbol_level': '0',
'strip_debug_info': 'true',
'v8_use_external_startup_data': 'false',
'v8_enable_i18n_support': 'false',
'v8_static_library': 'true',
Expand Down

0 comments on commit dfb0b3e

Please sign in to comment.