Source code

Revision control

Other Tools

1
# This Source Code Form is subject to the terms of the Mozilla Public
2
# License, v. 2.0. If a copy of the MPL was not distributed with this
3
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
4
5
# This file is included at the top of all native android mozconfigs
6
if [ -z "$NO_NDK" -a -z "$USE_ARTIFACT" ]; then
7
. "$topsrcdir/build/mozconfig.stylo"
8
fi
9
10
MOZ_AUTOMATION_L10N_CHECK=0
11
. "$topsrcdir/build/mozconfig.common"
12
13
# For Android builds in TaskCluster, the system image is Debian, and
14
# we use the Java JRE/JDK from the system. We use a custom clang for
15
# the host compiler. Make sure clang uses the c++ headers included with
16
# clang, rather than the system headers which leads to incompatibility
17
# later (when linking against the clang-provided libstdc++).
18
HOST_CC="$MOZ_FETCHES_DIR/clang/bin/clang --gcc-toolchain=$MOZ_FETCHES_DIR/clang"
19
HOST_CXX="$MOZ_FETCHES_DIR/clang/bin/clang++ --gcc-toolchain=$MOZ_FETCHES_DIR/clang"
20
21
# Build Fennec
22
ac_add_options --enable-application=mobile/android
23
ac_add_options --with-android-sdk="$MOZ_FETCHES_DIR/android-sdk-linux"
24
25
ac_add_options --with-gradle="$MOZ_FETCHES_DIR/android-gradle-dependencies/gradle-dist/bin/gradle"
27
28
if [ -z "$NO_NDK" -a -z "$USE_ARTIFACT" ]; then
29
# We use our own clang instead of the NDK's clang.
30
CC="$MOZ_FETCHES_DIR/clang/bin/clang"
31
CXX="$MOZ_FETCHES_DIR/clang/bin/clang++"
32
ac_add_options --with-android-ndk="$MOZ_FETCHES_DIR/android-ndk"
33
# Make sure that any host binaries we build use whatever libraries clang
34
# linked against, rather than what's on the system.
35
mk_add_options "export LD_LIBRARY_PATH=$MOZ_FETCHES_DIR/clang/lib"
36
# Enable static analysis plugin
37
export ENABLE_CLANG_PLUGIN=1
38
fi
39
40
ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
41
42
ac_add_options --with-google-safebrowsing-api-keyfile=/builds/sb-gapi.data
43
ac_add_options --with-google-location-service-api-keyfile=/builds/gls-gapi.data
44
ac_add_options --with-mozilla-api-keyfile=/builds/mozilla-fennec-geoloc-api.key
45
46
if [ -n "$MOZ_PGO_PROFILE_USE" ]; then
47
export LLVM_PROFDATA="$MOZ_FETCHES_DIR/clang/bin/llvm-profdata"
48
49
ac_add_options --enable-profile-use
50
51
# This is disabled because jarlog re-ordering breaks apk publishing tasks,
52
# see bug 1539933.
53
# ac_add_options --with-pgo-jarlog=/builds/worker/fetches/en-US.log
54
ac_add_options --with-pgo-profile-path=/builds/worker/fetches/merged.profdata
55
fi
56
57
# Package js shell.
58
export MOZ_PACKAGE_JSSHELL=1
59
60
JS_BINARY="$topsrcdir/mobile/android/config/js_wrapper.sh"