mirror of
https://github.com/syncthing/syncthing-android.git
synced 2024-11-22 20:31:16 +00:00
Force static linking
This commit is contained in:
parent
2d935b5485
commit
73a21a3c04
2 changed files with 5 additions and 4 deletions
|
@ -34,13 +34,15 @@ if [ -z $GOROOT ] || [[ $(go version) != go\ version\ go1.4* ]] ; then
|
|||
fi
|
||||
|
||||
# Add GO compiler to PATH
|
||||
export PATH=$PATH:$GOROOT/bin
|
||||
export PATH=$GOROOT/bin:$PATH
|
||||
# Disable CGO (no dynamic linking)
|
||||
export CGO_ENABLED=0
|
||||
|
||||
# Check whether GOLANG is compiled with cross-compilation for 386
|
||||
if [ ! -f $GOROOT/bin/linux_386/go ]; then
|
||||
pushd $GOROOT/src
|
||||
# Build GO for cross-compilation
|
||||
GOOS=linux GOARCH=386 ./make.bash --no-clean
|
||||
GOOS=linux GOARCH=386 GO386=387 ./make.bash --no-clean
|
||||
popd
|
||||
fi
|
||||
|
||||
|
|
|
@ -106,10 +106,9 @@ task copyNative(type: Copy) {
|
|||
def lib_dir = "libs/"
|
||||
new File(lib_dir).mkdirs()
|
||||
def st_dir = "bin/";
|
||||
from st_dir + 'syncthing-x86', st_dir + 'syncthing-armeabi', st_dir + 'syncthing-armeabi-v7a';
|
||||
from st_dir + 'syncthing-x86', st_dir + 'syncthing-armeabi';
|
||||
into lib_dir
|
||||
rename('syncthing-x86', 'x86/libsyncthing.so')
|
||||
rename('syncthing-armeabi-v7a', 'armeabi-v7a/libsyncthing.so')
|
||||
rename('syncthing-armeabi', 'armeabi/libsyncthing.so')
|
||||
}
|
||||
buildNative.finalizedBy copyNative
|
||||
|
|
Loading…
Reference in a new issue