summaryrefslogtreecommitdiffstats
path: root/mobile/android/moz.configure
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 19:33:14 +0000
commit36d22d82aa202bb199967e9512281e9a53db42c9 (patch)
tree105e8c98ddea1c1e4784a60a5a6410fa416be2de /mobile/android/moz.configure
parentInitial commit. (diff)
downloadfirefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.tar.xz
firefox-esr-36d22d82aa202bb199967e9512281e9a53db42c9.zip
Adding upstream version 115.7.0esr.upstream/115.7.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mobile/android/moz.configure')
-rw-r--r--mobile/android/moz.configure96
1 files changed, 96 insertions, 0 deletions
diff --git a/mobile/android/moz.configure b/mobile/android/moz.configure
new file mode 100644
index 0000000000..66c3a7c8eb
--- /dev/null
+++ b/mobile/android/moz.configure
@@ -0,0 +1,96 @@
+# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+project_flag(
+ "MOZ_ANDROID_EXCLUDE_FONTS",
+ help="Whether to exclude font files from the build",
+ default=True,
+)
+
+project_flag(
+ "MOZ_ANDROID_HLS_SUPPORT",
+ help="Enable HLS (HTTP Live Streaming) support (currently using the ExoPlayer library)",
+ default=True,
+)
+
+option(
+ "--num-content-services",
+ default="40",
+ help="The number of content process services to generate in the GeckoView manifest",
+)
+
+
+@depends("--num-content-services")
+def num_content_services(value):
+ strValue = value[0]
+ intValue = int(strValue)
+ acceptableRange = range(1, 41)
+ if intValue not in acceptableRange:
+ die(
+ "Unacceptable value, must be within range [%d,%d)"
+ % (acceptableRange.start, acceptableRange.stop)
+ )
+ return strValue
+
+
+set_config("MOZ_ANDROID_CONTENT_SERVICE_COUNT", num_content_services)
+set_define("MOZ_ANDROID_CONTENT_SERVICE_COUNT", num_content_services)
+
+option(
+ "--enable-isolated-process",
+ env="MOZ_ANDROID_CONTENT_SERVICE_ISOLATED_PROCESS",
+ help="Enable generating content process services with isolatedProcess=true",
+ default=False,
+)
+set_config(
+ "MOZ_ANDROID_CONTENT_SERVICE_ISOLATED_PROCESS",
+ depends_if("MOZ_ANDROID_CONTENT_SERVICE_ISOLATED_PROCESS")(lambda x: True),
+)
+
+option(
+ "--enable-geckoview-lite",
+ help="Build GeckoView in Lite mode. Lite mode removes all unnecessary dependencies like Glean.",
+)
+
+set_config("MOZ_ANDROID_GECKOVIEW_LITE", True, when="--enable-geckoview-lite")
+
+imply_option("MOZ_NORMANDY", False)
+imply_option("MOZ_SERVICES_HEALTHREPORT", True)
+imply_option("MOZ_ANDROID_HISTORY", True)
+imply_option("--enable-small-chunk-size", True)
+
+
+@depends(target)
+def check_target(target):
+ if target.os != "Android":
+ log.error(
+ "You must specify --target=arm-linux-androideabi (or some "
+ "other valid Android target) when building mobile/android."
+ )
+ die(
+ "See https://developer.mozilla.org/docs/Mozilla/Developer_guide/"
+ "Build_Instructions/Simple_Firefox_for_Android_build "
+ "for more information about the necessary options."
+ )
+
+
+include("../../toolkit/moz.configure")
+include("../../build/moz.configure/android-sdk.configure")
+include("../../build/moz.configure/java.configure")
+include("gradle.configure")
+
+# Automation will set this via the TC environment.
+option(
+ env="MOZ_ANDROID_FAT_AAR_ARCHITECTURES",
+ nargs="*",
+ choices=("armeabi-v7a", "arm64-v8a", "x86", "x86_64"),
+ help='Comma-separated list of Android CPU architectures like "armeabi-v7a,arm64-v8a,x86,x86_64"',
+)
+
+set_config(
+ "MOZ_ANDROID_FAT_AAR_ARCHITECTURES",
+ depends("MOZ_ANDROID_FAT_AAR_ARCHITECTURES")(lambda x: x),
+)