-
Notifications
You must be signed in to change notification settings - Fork 30.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
PR-URL: #19201 Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Myles Borins <myles.borins@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
- Loading branch information
Showing
2 changed files
with
16 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,9 @@ | ||
#!/bin/bash | ||
|
||
# Get V8 branch from v8/include/v8-version.h | ||
MAJOR=$(grep V8_MAJOR_VERSION deps/v8/include/v8-version.h | cut -d ' ' -f 3) | ||
MINOR=$(grep V8_MINOR_VERSION deps/v8/include/v8-version.h | cut -d ' ' -f 3) | ||
BRANCH=$MAJOR.$MINOR | ||
BUILD_ARCH_TYPE=$1 | ||
V8_BUILD_OPTIONS=$2 | ||
|
||
# clean up if someone presses ctrl-c | ||
trap cleanup INT | ||
|
||
function cleanup() { | ||
trap - INT | ||
rm .gclient || true | ||
rm .gclient_entries || true | ||
rm -rf _bad_scm/ || true | ||
find v8 -name ".git" | xargs rm -rf || true | ||
echo "git cleanup" | ||
git reset --hard HEAD | ||
git clean -fdq | ||
# unstash local changes | ||
git stash pop | ||
exit 0 | ||
} | ||
|
||
cd deps | ||
# stash local changes | ||
git stash | ||
rm -rf v8 | ||
|
||
echo "Fetching V8 from chromium.googlesource.com" | ||
fetch v8 | ||
if [ "$?" -ne 0 ]; then | ||
echo "V8 fetch failed" | ||
exit 1 | ||
fi | ||
echo "V8 fetched" | ||
|
||
cd v8 | ||
|
||
echo "Checking out branch:$BRANCH" | ||
git checkout remotes/branch-heads/$BRANCH | ||
|
||
echo "Sync dependencies" | ||
gclient sync | ||
|
||
cd .. | ||
cleanup | ||
cd deps/v8 | ||
tools/node/fetch_deps.py . | ||
PATH=~/_depot_tools:$PATH tools/dev/v8gen.py $BUILD_ARCH_TYPE --no-goma $V8_BUILD_OPTIONS | ||
PATH=~/_depot_tools:$PATH ninja -C out.gn/$BUILD_ARCH_TYPE/ d8 cctest inspector-test |