[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [tor-browser-build/master] Bug 31192 - Add Android x86_64 build support



commit f89da2a9b03b70e1ec2e99248b86a96f989d3bed
Author: Matthew Finkel <sysrqb@xxxxxxxxxxxxxx>
Date:   Wed Sep 18 20:19:32 2019 +0000

    Bug 31192 - Add Android x86_64 build support
---
 Makefile                                  | 15 ++++++++++
 README                                    |  2 ++
 README.HACKING                            | 18 ++++++++----
 README.MAKEFILE                           |  8 +++---
 projects/android-toolchain/build          |  3 +-
 projects/firefox/mozconfig-android-x86_64 | 48 +++++++++++++++++++++++++++++++
 projects/release/build                    |  3 ++
 projects/release/config                   | 12 ++++++++
 projects/rust/config                      |  4 +++
 projects/tor-browser/build.android        |  5 ++++
 rbm.conf                                  |  9 ++++++
 11 files changed, 116 insertions(+), 11 deletions(-)

diff --git a/Makefile b/Makefile
index 94a26f6..9f61bfb 100644
--- a/Makefile
+++ b/Makefile
@@ -11,6 +11,9 @@ release-android-armv7: submodule-update
 release-android-x86: submodule-update
 	$(rbm) build release --target release --target torbrowser-android-x86
 
+release-android-x86_64: submodule-update
+	$(rbm) build release --target release --target torbrowser-android-x86_64
+
 release-android-aarch64: submodule-update
 	$(rbm) build release --target release --target torbrowser-android-aarch64
 
@@ -44,6 +47,9 @@ alpha-android-armv7: submodule-update
 alpha-android-x86: submodule-update
 	$(rbm) build release --target alpha --target torbrowser-android-x86
 
+alpha-android-x86_64: submodule-update
+	$(rbm) build release --target alpha --target torbrowser-android-x86_64
+
 alpha-android-aarch64: submodule-update
 	$(rbm) build release --target alpha --target torbrowser-android-aarch64
 
@@ -77,6 +83,9 @@ nightly-android-armv7: submodule-update
 nightly-android-x86: submodule-update
 	$(rbm) build release --target nightly --target torbrowser-android-x86
 
+nightly-android-x86_64: submodule-update
+	$(rbm) build release --target nightly --target torbrowser-android-x86_64
+
 nightly-android-aarch64: submodule-update
 	$(rbm) build release --target nightly --target torbrowser-android-aarch64
 
@@ -110,6 +119,9 @@ alpha_nightly-android-armv7: submodule-update
 alpha_nightly-android-x86: submodule-update
 	$(rbm) build release --target alpha_nightly --target torbrowser-android-x86
 
+alpha_nightly-android-x86_64: submodule-update
+	$(rbm) build release --target alpha_nightly --target torbrowser-android-x86_64
+
 alpha_nightly-android-aarch64: submodule-update
 	$(rbm) build release --target alpha_nightly --target torbrowser-android-aarch64
 
@@ -140,6 +152,9 @@ testbuild-android-armv7: submodule-update
 testbuild-android-x86: submodule-update
 	$(rbm) build release --target testbuild --target torbrowser-android-x86
 
+testbuild-android-x86_64: submodule-update
+	$(rbm) build release --target testbuild --target torbrowser-android-x86_64
+
 testbuild-android-aarch64: submodule-update
 	$(rbm) build release --target testbuild --target torbrowser-android-aarch64
 
diff --git a/README b/README
index 2ea5630..481db2e 100644
--- a/README
+++ b/README
@@ -79,7 +79,9 @@ name to the makefile target:
   $ make nightly-windows-i686
   $ make nightly-osx-x86_64
   $ make nightly-android-armv7
+  $ make nightly-android-aarch64
   $ make nightly-android-x86
+  $ make nightly-android-x86_64
 
 When you want to quickly do a build to test a change, you can use the
 testbuild makefile target, and find the build in the testbuild directory.
diff --git a/README.HACKING b/README.HACKING
index 081a3d5..0d3eeb8 100644
--- a/README.HACKING
+++ b/README.HACKING
@@ -45,16 +45,18 @@ The targets are usually used to select:
 
 - the platform: torbrowser-linux-x86_64, torbrowser-linux-i686,
   torbrowser-windows-i686, torbrowser-windows-x86_64, torbrowser-osx-x86_64,
-  torbrowser-android-armv7, torbrowser-android-x86
+  torbrowser-android-armv7, torbrowser-android-aarch64, torbrowser-android-x86,
+  torbrowser-android-x86_64
 - the channel: release, nightly, alpha
 
 The targets torbrowser-linux-x86_64, torbrowser-linux-i686,
 torbrowser-windows-i686, torbrowser-windows-x86_64, torbrowser-osx-x86_64,
-torbrowser-android-armv7, and torbrowser-android-x86 are special cases. They do
-not contain options directly, instead they contain a list of other targets. For
-instance, the torbrowser-linux-x86_64 target is pointing to the linux-x86_64 and
-linux targets. You should define an option under the linux target if it applies
-to Linux on both architectures, or under the linux-x86_64 if it only applies to
+torbrowser-android-armv7, torbrowser-android-x86, torbrowser-android-aarch64,
+torbrowser-android-x86_64 are special cases. They do not contain options
+directly, instead they contain a list of other targets. For instance, the
+torbrowser-linux-x86_64 target is pointing to the linux-x86_64 and linux
+targets. You should define an option under the linux target if it applies to
+Linux on both architectures, or under the linux-x86_64 if it only applies to
 the x86_64 architecture.
 
 An option that is defined at the root of rbm.conf can be overridden by
@@ -156,8 +158,12 @@ $platform should be one of the following:
 
  - torbrowser-android-armv7
 
+ - torbrowser-android-aarch64
+
  - torbrowser-android-x86
 
+ - torbrowser-android-x86_64
+
 For example, to see tor's build script for linux x86_64 on the alpha
 channel, you can use:
 
diff --git a/README.MAKEFILE b/README.MAKEFILE
index addff64..e106ca4 100644
--- a/README.MAKEFILE
+++ b/README.MAKEFILE
@@ -8,7 +8,7 @@ Build Tor Browser for the release channel, for all supported platforms.
 The resulting build can be found in directory release/$version.
 
 release-{linux-x86_64,linux-i686,windows-i686,osx-x86_64,android-armv7,
-         android-x86}
+         android-x86,android-x86_64,android-aarch64}
 -----------------------------------------------------------------------
 Same as release, for the selected platform only.
 
@@ -18,7 +18,7 @@ Build Tor Browser for the alpha channel, for all supported platforms.
 The resulting build can be found in directory alpha/$version.
 
 alpha-{linux-x86_64,linux-i686,windows-i686,osx-x86_64,android-armv7,
-       android-x86}
+       android-x86,android-x86_64,android-aarch64}
 ---------------------------------------------------------------------
 Same as alpha, for the selected platform only.
 
@@ -32,7 +32,7 @@ components.
 The resulting build can be found in directory nightly/$date
 
 nightly-{linux-x86_64,linux-i686,windows-i686,osx-x86_64,android-armv7,
-         android-x86}
+         android-x86,android-x86_64,android-aarch64}
 -----------------------------------------------------------------------
 Same as nightly, for the selected platform only.
 
@@ -43,7 +43,7 @@ This is the same as 'make alpha', but the output directory is different.
 The resulting build can be found in directory alpha_nightly/$date
 
 alpha_nightly-{linux-x86_64,linux-i686,windows-i686,osx-x86_64,android-armv7,
-               android-x86}
+               android-x86,android-x86_64,android-aarch64}
 -----------------------------------------------------------------------------
 The same as alpha_nightly, for the selected platform only.
 
diff --git a/projects/android-toolchain/build b/projects/android-toolchain/build
index 42e961c..f4defc5 100644
--- a/projects/android-toolchain/build
+++ b/projects/android-toolchain/build
@@ -20,8 +20,9 @@ rm -fR android-ndk-r17b
 
 # The architectures we support
 ./build/tools/make_standalone_toolchain.py --api [% c("var/android_min_api_armv7") %] --arch arm --install-dir=./arm
-./build/tools/make_standalone_toolchain.py --api [% c("var/android_min_api_x86") %] --arch x86 --install-dir=./x86
 ./build/tools/make_standalone_toolchain.py --api [% c("var/android_min_api_aarch64") %] --arch arm64 --install-dir=./arm64
+./build/tools/make_standalone_toolchain.py --api [% c("var/android_min_api_x86") %] --arch x86 --install-dir=./x86
+./build/tools/make_standalone_toolchain.py --api [% c("var/android_min_api_x86_64") %] --arch x86_64 --install-dir=./x86_64
 
 # Tool Archives
 cd $SDK_HOME
diff --git a/projects/firefox/mozconfig-android-x86_64 b/projects/firefox/mozconfig-android-x86_64
new file mode 100644
index 0000000..55bc883
--- /dev/null
+++ b/projects/firefox/mozconfig-android-x86_64
@@ -0,0 +1,48 @@
+mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-x86_64-linux-android
+mk_add_options MOZ_APP_DISPLAYNAME="Tor Browser"
+export MOZILLA_OFFICIAL=1
+CC="clang"
+CXX="clang++"
+
+ac_add_options --with-android-min-sdk=21
+
+ac_add_options --enable-optimize
+ac_add_options --enable-official-branding
+
+ac_add_options --enable-application=mobile/android
+ac_add_options --target=x86_64-linux-android
+ac_add_options --with-android-ndk=/var/tmp/dist/android-toolchain/android-ndk
+ac_add_options --with-android-sdk=/var/tmp/dist/android-toolchain/android-sdk-linux
+ac_add_options --with-gradle=/var/tmp/dist/android-toolchain/gradle/gradle-4.10.2/bin/gradle
+ac_add_options --with-android-version=21
+
+ac_add_options --with-android-distribution-directory=@TOPSRCDIR@/mobile/android/torbrowser
+ac_add_options --with-l10n-base=/var/tmp/dist/locales
+
+# We do not use Tor Launcher on Android:
+ac_add_options --disable-tor-launcher
+
+if [ -z "${TB_BUILD_WITH_UPDATER}" ]; then
+# Because Google Play will likely be the primary distribution medium,
+# we disable updating and rely on Google Play by default. The
+# Developer Policy explicitly prohibits in-app updating:
+#    An app distributed via Google Play may not modify, replace, or
+#    update itself using any method other than Google Plays update
+#    mechanism.
+# https://play.google.com/about/privacy-security-deception/malicious-behavior/
+
+    ac_add_options --disable-tor-browser-update
+    ac_add_options --disable-signmar
+    ac_add_options --disable-verify-mar
+fi
+
+ac_add_options --enable-strip
+ac_add_options --disable-tests
+ac_add_options --disable-debug
+ac_add_options --disable-rust-debug
+ac_add_options --disable-crashreporter
+ac_add_options --disable-webrtc
+
+ac_add_options --without-google-play-services
+
+ac_add_options --enable-proxy-bypass-protection
diff --git a/projects/release/build b/projects/release/build
index 347d9a8..c1badd6 100644
--- a/projects/release/build
+++ b/projects/release/build
@@ -10,6 +10,9 @@ mkdir -p "$destdir"
 [% IF c("var/torbrowser-android-x86") -%]
   mv [% c('input_files_by_name/android-x86') %]/* "$destdir"/
 [% END -%]
+[% IF c("var/torbrowser-android-x86_64") -%]
+  mv [% c('input_files_by_name/android-x86_64') %]/* "$destdir"/
+[% END -%]
 [% IF c("var/torbrowser-android-aarch64") -%]
   mv [% c('input_files_by_name/android-aarch64') %]/* "$destdir"/
 [% END -%]
diff --git a/projects/release/config b/projects/release/config
index 524eadf..d1aee8c 100644
--- a/projects/release/config
+++ b/projects/release/config
@@ -17,6 +17,7 @@ targets:
     - torbrowser-osx-x86_64
     - torbrowser-android-armv7
     - torbrowser-android-x86
+    - torbrowser-android-x86_64
     - torbrowser-android-aarch64
     - torbrowser-src
   torbrowser-android-armv7:
@@ -25,6 +26,9 @@ targets:
   torbrowser-android-x86:
     var:
       torbrowser-android-x86: 1
+  torbrowser-android-x86_64:
+    var:
+      torbrowser-android-x86_64: 1
   torbrowser-android-aarch64:
     var:
       torbrowser-android-aarch64: 1
@@ -121,6 +125,14 @@ input_files:
      - '[% c("var/build_target") %]'
      - torbrowser-android-x86
 
+ - name: android-x86_64
+   project: tor-browser
+   enable: '[% c("var/torbrowser-android-x86_64") %]'
+   target:
+     - '[% c("var/containers_target") %]'
+     - '[% c("var/build_target") %]'
+     - torbrowser-android-x86_64
+
  - name: android-aarch64
    project: tor-browser
    enable: '[% c("var/torbrowser-android-aarch64") %]'
diff --git a/projects/rust/config b/projects/rust/config
index dbde815..03d7be0 100644
--- a/projects/rust/config
+++ b/projects/rust/config
@@ -22,6 +22,10 @@ targets:
     var:
       configure_opt: --enable-local-rust --enable-vendor --enable-extended --release-channel=stable --sysconfdir=etc --target=i686-linux-android --set=target.i686-linux-android.cc=$ANDROID_NDK_HOME/x86/bin/i686-linux-android-gcc
 
+  android-x86_64:
+    var:
+      configure_opt: --enable-local-rust --enable-vendor --enable-extended --release-channel=stable --sysconfdir=etc --target=x86_64-linux-android --set=target.x86_64-linux-android.cc=$ANDROID_NDK_HOME/x86_64/bin/x86_64-linux-android-gcc
+
   android-aarch64:
     var:
       configure_opt: --enable-local-rust --enable-vendor --enable-extended --release-channel=stable --sysconfdir=etc --target=aarch64-linux-android --set=target.aarch64-linux-android.cc=$ANDROID_NDK_HOME/arm64/bin/aarch64-linux-android-gcc
diff --git a/projects/tor-browser/build.android b/projects/tor-browser/build.android
index b90c8b9..9f255da 100644
--- a/projects/tor-browser/build.android
+++ b/projects/tor-browser/build.android
@@ -24,6 +24,11 @@ zip -d $apk lib/\*
           zip_src => [ 'lib/x86/*' ],
           zip_args => '$apk',
        }) %]
+[% ELSIF c("var/android-x86_64") %]
+    [% c('zip', {
+          zip_src => [ 'lib/x86_64/*' ],
+          zip_args => '$apk',
+       }) %]
 [% ELSIF c("var/android-armv7") %]
     [% c('zip', {
           zip_src => [ 'lib/armeabi-v7a/*' ],
diff --git a/rbm.conf b/rbm.conf
index e6379f8..008fab7 100644
--- a/rbm.conf
+++ b/rbm.conf
@@ -191,6 +191,14 @@ targets:
     var:
       android-x86: 1
       osname: android-x86
+  torbrowser-android-x86_64:
+    - android-x86_64
+    - android
+  android-x86_64:
+    arch: x86_64
+    var:
+      android-x86_64: 1
+      osname: android-x86_64
   torbrowser-android-aarch64:
     - android-aarch64
     - android
@@ -209,6 +217,7 @@ targets:
       android_min_api_aarch64: 21
       android_min_api_armv7: 16
       android_min_api_x86: 16
+      android_min_api_x86_64: 21
       snowflake: 0
       container:
         suite: stretch



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits