Actually make headless work on arm aarch64

Following the two comments at
https://code.briarproject.org/briar/briar/-/issues/1854#note_44340

.jar files now get built with

    $ ./gradlew --configure-on-demand briar-headless:x86LinuxJar
    $ ./gradlew --configure-on-demand briar-headless:aarch64LinuxJar

Related to #1854
This commit is contained in:
Nico Alt
2021-03-03 12:00:00 +00:00
parent c5d2661c1d
commit b738bdd14e
3 changed files with 37 additions and 7 deletions

View File

@@ -96,15 +96,21 @@ public class UnixTorPluginFactory implements DuplexPluginFactory {
String architecture = null;
if (isLinux()) {
String arch = System.getProperty("os.arch");
LOG.info("System's os.arch is " + arch);
if (arch.equals("amd64")) {
architecture = "linux-x86_64";
}
else if (arch.equals("aarch64")) {
architecture = "linux-aarch64";
}
}
if (architecture == null) {
LOG.info("Tor is not supported on this architecture");
return null;
}
LOG.info("The selected architecture for Tor is " + architecture);
Backoff backoff = backoffFactory.createBackoff(MIN_POLLING_INTERVAL,
MAX_POLLING_INTERVAL, BACKOFF_BASE);
TorRendezvousCrypto torRendezvousCrypto = new TorRendezvousCryptoImpl();