Skip to content

Commit

Permalink
Update travis build instructions for using gn to build.
Browse files Browse the repository at this point in the history
Tested on a linux machine, maybe it'll work this time.
  • Loading branch information
augustoroman committed Mar 21, 2018
1 parent 0479fb0 commit 2618569
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 6 deletions.
2 changes: 1 addition & 1 deletion symlink.sh
Expand Up @@ -20,7 +20,7 @@ if [[ ! -d "${V8_DIR}/include" ]]; then
exit 1
fi

V8_LIBS="out.gn/x64.release/obj"
V8_LIBS="out.gn/golib/obj"

if [[ ! -d "${V8_DIR}/${V8_LIBS}" ]]; then
echo "ERROR: ${V8_DIR}/${V8_LIBS} directory does not exist." >&2
Expand Down
23 changes: 20 additions & 3 deletions travis-install-linux.sh
Expand Up @@ -12,13 +12,30 @@ mkdir -p ${CHROMIUM_DIR}
pushd ${CHROMIUM_DIR}
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
export PATH="$(pwd)/depot_tools:$PATH"
gclient
fetch v8
cd v8
git checkout ${V8_VERSION}
gclient sync
tools/dev/v8gen.py x64.release -- v8_use_external_startup_data=false v8_enable_i18n_support=false v8_enable_gdbjit=false v8_static_library=true is_component_build=false
ninja -C out.gn/x64.release v8_libbase v8_libplatform v8_base v8_snapshot
gn gen out.gn/golib --args='
target_cpu = "x64"
is_debug = false
symbol_level = 0
strip_debug_info = true
v8_experimental_extra_library_files = []
v8_extra_library_files = []
v8_static_library = true
is_component_build = false
use_custom_libcxx = false
use_custom_libcxx_for_host = false
icu_use_data_file = false
is_desktop_linux = false
v8_enable_i18n_support = false
v8_use_external_startup_data = false
v8_enable_gdbjit = false'
ninja -C out.gn/golib v8_libbase v8_libplatform v8_base v8_nosnapshot v8_libsampler v8_init v8_initializers
popd
./symlink.sh ${CHROMIUM_DIR}/v8
go install .
2 changes: 1 addition & 1 deletion v8.go
Expand Up @@ -12,7 +12,7 @@ package v8
// #include <string.h>
// #include "v8_c_bridge.h"
// #cgo CXXFLAGS: -I${SRCDIR} -I${SRCDIR}/include -std=c++11
// #cgo LDFLAGS: -L${SRCDIR}/libv8 -lv8_base -lv8_libbase -lv8_snapshot -lv8_libplatform -ldl -pthread
// #cgo LDFLAGS: -pthread -L${SRCDIR}/libv8 -lv8_base -lv8_init -lv8_initializers -lv8_libbase -lv8_libplatform -lv8_libsampler -lv8_nosnapshot
import "C"

import (
Expand Down
2 changes: 1 addition & 1 deletion v8_create.go
Expand Up @@ -15,7 +15,7 @@ import (
// #include <string.h>
// #include "v8_c_bridge.h"
// #cgo CXXFLAGS: -I${SRCDIR} -I${SRCDIR}/include -std=c++11
// #cgo LDFLAGS: -L${SRCDIR}/libv8 -lv8_base -lv8_libbase -lv8_snapshot -lv8_libsampler -lv8_libplatform -ldl -pthread
// #cgo LDFLAGS: -pthread -L${SRCDIR}/libv8 -lv8_base -lv8_init -lv8_initializers -lv8_libbase -lv8_libplatform -lv8_libsampler -lv8_nosnapshot
import "C"

var float64Type = reflect.TypeOf(float64(0))
Expand Down

0 comments on commit 2618569

Please sign in to comment.