Bug 1829068 skip AudioSink initialization if there's another intialization pending...
[gecko.git] / mobile / android / moz.configure
blob66c3a7c8eb56058f3d0d41d473473f3d0fa8c36c
1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
7 project_flag(
8     "MOZ_ANDROID_EXCLUDE_FONTS",
9     help="Whether to exclude font files from the build",
10     default=True,
13 project_flag(
14     "MOZ_ANDROID_HLS_SUPPORT",
15     help="Enable HLS (HTTP Live Streaming) support (currently using the ExoPlayer library)",
16     default=True,
19 option(
20     "--num-content-services",
21     default="40",
22     help="The number of content process services to generate in the GeckoView manifest",
26 @depends("--num-content-services")
27 def num_content_services(value):
28     strValue = value[0]
29     intValue = int(strValue)
30     acceptableRange = range(1, 41)
31     if intValue not in acceptableRange:
32         die(
33             "Unacceptable value, must be within range [%d,%d)"
34             % (acceptableRange.start, acceptableRange.stop)
35         )
36     return strValue
39 set_config("MOZ_ANDROID_CONTENT_SERVICE_COUNT", num_content_services)
40 set_define("MOZ_ANDROID_CONTENT_SERVICE_COUNT", num_content_services)
42 option(
43     "--enable-isolated-process",
44     env="MOZ_ANDROID_CONTENT_SERVICE_ISOLATED_PROCESS",
45     help="Enable generating content process services with isolatedProcess=true",
46     default=False,
48 set_config(
49     "MOZ_ANDROID_CONTENT_SERVICE_ISOLATED_PROCESS",
50     depends_if("MOZ_ANDROID_CONTENT_SERVICE_ISOLATED_PROCESS")(lambda x: True),
53 option(
54     "--enable-geckoview-lite",
55     help="Build GeckoView in Lite mode. Lite mode removes all unnecessary dependencies like Glean.",
58 set_config("MOZ_ANDROID_GECKOVIEW_LITE", True, when="--enable-geckoview-lite")
60 imply_option("MOZ_NORMANDY", False)
61 imply_option("MOZ_SERVICES_HEALTHREPORT", True)
62 imply_option("MOZ_ANDROID_HISTORY", True)
63 imply_option("--enable-small-chunk-size", True)
66 @depends(target)
67 def check_target(target):
68     if target.os != "Android":
69         log.error(
70             "You must specify --target=arm-linux-androideabi (or some "
71             "other valid Android target) when building mobile/android."
72         )
73         die(
74             "See https://developer.mozilla.org/docs/Mozilla/Developer_guide/"
75             "Build_Instructions/Simple_Firefox_for_Android_build "
76             "for more information about the necessary options."
77         )
80 include("../../toolkit/moz.configure")
81 include("../../build/moz.configure/android-sdk.configure")
82 include("../../build/moz.configure/java.configure")
83 include("gradle.configure")
85 # Automation will set this via the TC environment.
86 option(
87     env="MOZ_ANDROID_FAT_AAR_ARCHITECTURES",
88     nargs="*",
89     choices=("armeabi-v7a", "arm64-v8a", "x86", "x86_64"),
90     help='Comma-separated list of Android CPU architectures like "armeabi-v7a,arm64-v8a,x86,x86_64"',
93 set_config(
94     "MOZ_ANDROID_FAT_AAR_ARCHITECTURES",
95     depends("MOZ_ANDROID_FAT_AAR_ARCHITECTURES")(lambda x: x),