Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
com.ccwangluo.accelerator
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sheteng
com.ccwangluo.accelerator
Commits
c55fd2dd
Commit
c55fd2dd
authored
Dec 23, 2017
by
Mygod
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Refine goBuild speed
parent
3c3406d3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
25 deletions
+30
-25
core/src/overture/make.bash
core/src/overture/make.bash
+30
-25
No files found.
core/src/overture/make.bash
View file @
c55fd2dd
...
@@ -56,33 +56,38 @@ export GOROOT=$DIR/go
...
@@ -56,33 +56,38 @@ export GOROOT=$DIR/go
export
GOPATH
=
$DIR
export
GOPATH
=
$DIR
export
PATH
=
$GOROOT
/bin:
$GOPATH
/bin:
$PATH
export
PATH
=
$GOROOT
/bin:
$GOPATH
/bin:
$PATH
echo
"Get dependences for overture"
if
[
!
-f
"
$TARGET
/armeabi-v7a/liboverture.so"
]
||
[
!
-f
"
$TARGET
/arm64-v8a/liboverture.so"
]
||
go get
-u
github.com/tools/godep
[
!
-f
"
$TARGET
/x86/liboverture.so"
]
;
then
pushd
$GOPATH
/src/github.com/shadowsocks/overture/main
echo
"Get dependences for overture"
godep restore
go get
-u
github.com/tools/godep
echo
"Cross compile overture for arm"
pushd
$GOPATH
/src/github.com/shadowsocks/overture/main
if
[
!
-f
"
$TARGET
/armeabi-v7a/liboverture.so"
]
;
then
godep restore
echo
"Cross compile overture for arm"
if
[
!
-f
"
$TARGET
/armeabi-v7a/liboverture.so"
]
;
then
try
env
CGO_ENABLED
=
1
CC
=
$ANDROID_ARM_CC
GOOS
=
android
GOARCH
=
arm
GOARM
=
7 go build
-ldflags
=
"-s -w"
try
env
CGO_ENABLED
=
1
CC
=
$ANDROID_ARM_CC
GOOS
=
android
GOARCH
=
arm
GOARM
=
7 go build
-ldflags
=
"-s -w"
try
$ANDROID_ARM_STRIP
main
try
$ANDROID_ARM_STRIP
main
try
mv
main
$TARGET
/armeabi-v7a/liboverture.so
try
mv
main
$TARGET
/armeabi-v7a/liboverture.so
fi
fi
echo
"Cross compile overture for arm64"
echo
"Cross compile overture for arm64"
if
[
!
-f
"
$TARGET
/arm64-v8a/liboverture.so"
]
;
then
if
[
!
-f
"
$TARGET
/arm64-v8a/liboverture.so"
]
;
then
try
env
CGO_ENABLED
=
1
CC
=
$ANDROID_ARM64_CC
GOOS
=
android
GOARCH
=
arm64 go build
-ldflags
=
"-s -w"
try
env
CGO_ENABLED
=
1
CC
=
$ANDROID_ARM64_CC
GOOS
=
android
GOARCH
=
arm64 go build
-ldflags
=
"-s -w"
try
$ANDROID_ARM64_STRIP
main
try
$ANDROID_ARM64_STRIP
main
try
mv
main
$TARGET
/arm64-v8a/liboverture.so
try
mv
main
$TARGET
/arm64-v8a/liboverture.so
fi
fi
echo
"Cross compile overture for x86"
echo
"Cross compile overture for x86"
if
[
!
-f
"
$TARGET
/x86/liboverture.so"
]
;
then
if
[
!
-f
"
$TARGET
/x86/liboverture.so"
]
;
then
try
env
CGO_ENABLED
=
1
CC
=
$ANDROID_X86_CC
GOOS
=
android
GOARCH
=
386 go build
-ldflags
=
"-s -w"
try
env
CGO_ENABLED
=
1
CC
=
$ANDROID_X86_CC
GOOS
=
android
GOARCH
=
386 go build
-ldflags
=
"-s -w"
try
$ANDROID_X86_STRIP
main
try
$ANDROID_X86_STRIP
main
try
mv
main
$TARGET
/x86/liboverture.so
try
mv
main
$TARGET
/x86/liboverture.so
fi
fi
popd
popd
fi
echo
"Successfully build overture"
echo
"Successfully build overture"
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment