Skip to content
Snippets Groups Projects
Commit f89da2a9 authored by Matthew Finkel's avatar Matthew Finkel
Browse files

Bug 31192 - Add Android x86_64 build support

parent 52ebafd7
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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.
......
......@@ -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:
......
......@@ -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.
......
......@@ -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
......
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
......@@ -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 -%]
......
......@@ -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") %]'
......
......@@ -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
......
......@@ -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/*' ],
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment