Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1dfb5b5

Browse filesBrowse files
Jaideep BajwaMylesBorins
authored andcommitted
v8: update make-v8.sh to use git
google build tool gclient doesn't support svn anymore. Updating v8 build script to use git instead. PR-URL: #9393 Reviewed By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
1 parent 9f0ef5a commit 1dfb5b5
Copy full SHA for 1dfb5b5

File tree

Expand file treeCollapse file tree

2 files changed

+30
-21
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+30
-21
lines changed
Open diff view settings
Collapse file

‎Makefile‎

Copy file name to clipboardExpand all lines: Makefile
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ cctest: all
109109
@out/$(BUILDTYPE)/$@
110110

111111
v8:
112-
tools/make-v8.sh v8
112+
tools/make-v8.sh
113113
$(MAKE) -C deps/v8 $(V8_ARCH).$(BUILDTYPE_LOWER) $(V8_BUILD_OPTIONS)
114114

115115
test: | cctest # Depends on 'all'.
Collapse file

‎tools/make-v8.sh‎

Copy file name to clipboard
+29-20Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,47 @@
11
#!/bin/bash
22

3-
4-
git_origin=$(git config --get remote.origin.url | sed 's/.\+[\/:]\([^\/]\+\/[^\/]\+\)$/\1/')
5-
git_branch=$(git rev-parse --abbrev-ref HEAD)
6-
v8ver=${1:-v8} #default v8
7-
svn_prefix=https://github.com
8-
svn_path="$svn_prefix/$git_origin/branches/$git_branch/deps/$v8ver"
9-
#svn_path="$git_origin/branches/$git_branch/deps/$v8ver"
10-
gclient_string="solutions = [{'name': 'v8', 'url': '$svn_path', 'managed': False}]"
3+
# Get V8 branch from v8/include/v8-version.h
4+
MAJOR=$(grep V8_MAJOR_VERSION deps/v8/include/v8-version.h | cut -d ' ' -f 3)
5+
MINOR=$(grep V8_MINOR_VERSION deps/v8/include/v8-version.h | cut -d ' ' -f 3)
6+
BRANCH=$MAJOR.$MINOR
117

128
# clean up if someone presses ctrl-c
139
trap cleanup INT
1410

1511
function cleanup() {
1612
trap - INT
17-
1813
rm .gclient || true
1914
rm .gclient_entries || true
2015
rm -rf _bad_scm/ || true
21-
22-
#if v8ver isn't v8, move the v8 folders
23-
#back to what they were
24-
if [ "$v8ver" != "v8" ]; then
25-
mv v8 $v8ver
26-
mv .v8old v8
27-
fi
16+
find v8 -name ".git" | xargs rm -rf || true
17+
echo "git cleanup"
18+
git reset --hard HEAD
19+
git clean -fdq
20+
# unstash local changes
21+
git stash pop
2822
exit 0
2923
}
3024

3125
cd deps
32-
echo $gclient_string > .gclient
33-
if [ "$v8ver" != "v8" ]; then
34-
mv v8 .v8old
35-
mv $v8ver v8
26+
# stash local changes
27+
git stash
28+
rm -rf v8
29+
30+
echo "Fetching V8 from chromium.googlesource.com"
31+
fetch v8
32+
if [ "$?" -ne 0 ]; then
33+
echo "V8 fetch failed"
34+
exit 1
3635
fi
36+
echo "V8 fetched"
37+
38+
cd v8
39+
40+
echo "Checking out branch:$BRANCH"
41+
git checkout remotes/branch-heads/$BRANCH
42+
43+
echo "Sync dependencies"
3744
gclient sync
45+
46+
cd ..
3847
cleanup

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.