1
0
Fork 0
mirror of https://github.com/syncthing/syncthing-android.git synced 2025-01-09 03:31:46 +00:00

Merge pull request #738 from syncthing/arm64-sha256simd

[WIP] Speed up Hashing for ARMv8
This commit is contained in:
Felix Ableitner 2017-01-05 12:46:10 +09:00 committed by GitHub
commit 71546fb160
4 changed files with 19 additions and 18 deletions

View file

@ -8,3 +8,5 @@
./make-go.bash 386
./make-syncthing.bash 386
./make-go.bash arm64
./make-syncthing.bash arm64

View file

@ -27,17 +27,18 @@ case "$1" in
export GOARCH=arm
export GOARM=5
;;
arm64)
export GOOS=linux
export GOARCH=arm64
export GOARM=8
;;
386)
export GOOS=linux
export GOARCH=386
export GO386=387
;;
amd64)
export GOOS=linux
export GOARCH=amd64
;;
*)
echo "Must specify either arm or 386 or amd64"
echo "Invalid architecture"
exit 1
esac

View file

@ -13,6 +13,13 @@ case "$1" in
export GOARM=5
export TARGETDIR=$MYDIR$JNIDIR/armeabi
;;
arm64)
export CGO_ENABLED=0
export GOOS=linux
export GOARCH=arm64
export GOARM=8
export TARGETDIR=$MYDIR$JNIDIR/arm64-v8a
;;
386)
export CGO_ENABLED=0
export GOOS=linux
@ -20,14 +27,8 @@ case "$1" in
export GO386=387
export TARGETDIR=$MYDIR$JNIDIR/x86
;;
amd64)
export CGO_ENABLED=0
export GOOS=linux
export GOARCH=amd64
export TARGETDIR=$MYDIR$JNIDIR/x86_64
;;
*)
echo "Must specify either arm or 386 or amd64"
echo "Invalid architecture"
exit 1
esac

View file

@ -37,10 +37,7 @@ public class SyncthingRunnable implements Runnable {
private static final String TAG_NICE = "SyncthingRunnableIoNice";
private static final String TAG_KILL = "SyncthingRunnableKill";
public static final String UNIT_TEST_PATH = "was running";
/**
* Path to the native, integrated syncthing binary, relative to the data folder
*/
public static final String BINARY_NAME = "lib/libsyncthing.so";
public static final String BINARY_NAME = "libsyncthing.so";
private static final int LOG_FILE_MAX_LINES = 1000;
private static final AtomicReference<Process> mSyncthing = new AtomicReference<>();
@ -63,7 +60,7 @@ public class SyncthingRunnable implements Runnable {
*/
public SyncthingRunnable(Context context, Command command) {
mContext = context;
mSyncthingBinary = mContext.getApplicationInfo().dataDir + "/" + BINARY_NAME;
mSyncthingBinary = mContext.getApplicationInfo().nativeLibraryDir + "/" + BINARY_NAME;
mLogFile = new File(mContext.getExternalFilesDir(null), "syncthing.log");
switch (command) {
case generate:
@ -87,7 +84,7 @@ public class SyncthingRunnable implements Runnable {
*/
public SyncthingRunnable(Context context, String[] manualCommand) {
mContext = context;
mSyncthingBinary = mContext.getApplicationInfo().dataDir + "/" + BINARY_NAME;
mSyncthingBinary = mContext.getApplicationInfo().nativeLibraryDir + "/" + BINARY_NAME;
mCommand = manualCommand;
mLogFile = new File(mContext.getExternalFilesDir(null), "syncthing.log");
}