Bug 1820876 - Update NDK to r23c. r=firefox-build-system-reviewers,nalexander

Wrench android builds had been kept on rustc 1.67 waiting for this
upgrade.

Differential Revision: https://phabricator.services.mozilla.com/D172089
This commit is contained in:
Mike Hommey 2023-03-23 01:27:51 +00:00
Родитель 2907b87962
Коммит 1f158eae92
7 изменённых файлов: 25 добавлений и 62 удалений

Просмотреть файл

@ -139,18 +139,29 @@ def host_dir(host, base_dir):
return dir return dir
@depends(ndk, target, host) @depends(host, ndk, "--with-android-toolchain")
@checking("for the Android toolchain directory", lambda x: x or "not found")
def android_toolchain(host, ndk, toolchain):
if not ndk:
return
if toolchain:
return toolchain[0]
toolchain = host_dir(host, os.path.join(ndk, "toolchains", "llvm", "prebuilt"))
if toolchain:
return toolchain
die("You have to specify --with-android-toolchain=" "/path/to/ndk/toolchain.")
@depends(target, android_toolchain)
@checking("for android sysroot directory") @checking("for android sysroot directory")
@imports(_from="os.path", _import="isdir") @imports(_from="os.path", _import="isdir")
def android_sysroot(ndk, target, host): def android_sysroot(target, android_toolchain):
if target.os != "Android": if target.os != "Android":
return return
search_dirs = [ search_dirs = [
os.path.join( os.path.join(android_toolchain, "sysroot"),
host_dir(host, os.path.join(ndk, "toolchains", "llvm", "prebuilt")),
"sysroot",
),
] ]
for sysroot_dir in search_dirs: for sysroot_dir in search_dirs:
@ -163,31 +174,6 @@ def android_sysroot(ndk, target, host):
) )
@depends(target, host, ndk, "--with-android-toolchain")
@checking("for the Android toolchain directory", lambda x: x or "not found")
def android_toolchain(target, host, ndk, toolchain):
if not ndk:
return
if toolchain:
return toolchain[0]
else:
if target.cpu == "arm" and target.endianness == "little":
target_base = "arm-linux-androideabi"
elif target.cpu == "x86":
target_base = "x86"
elif target.cpu == "x86_64":
target_base = "x86_64"
elif target.cpu == "aarch64" and target.endianness == "little":
target_base = "aarch64-linux-android"
else:
die("Target cpu is not supported.")
toolchain = host_dir(host, "%s/toolchains/%s-4.9/prebuilt" % (ndk, target_base))
if toolchain:
return toolchain
die("You have to specify --with-android-toolchain=" "/path/to/ndk/toolchain.")
@depends(target, host, ndk, "--with-android-lldb-server") @depends(target, host, ndk, "--with-android-lldb-server")
@checking("for the Android LLDB server", lambda x: x or "not found") @checking("for the Android LLDB server", lambda x: x or "not found")
@imports(_from="os", _import="listdir") @imports(_from="os", _import="listdir")

Просмотреть файл

@ -62,7 +62,7 @@ EOF
cd .. cd ..
TARGETS="aarch64-linux-gnu i686-w64-mingw32" TARGETS="aarch64-linux-gnu arm-linux-gnueabi i686-w64-mingw32"
if [ -d $MOZ_FETCHES_DIR/sysroot ]; then if [ -d $MOZ_FETCHES_DIR/sysroot ]; then
# Don't silently use a non-existing directory for C++ headers. # Don't silently use a non-existing directory for C++ headers.

Просмотреть файл

@ -97,6 +97,7 @@ if CONFIG['MOZ_AAUDIO'] or CONFIG['MOZ_OPENSL']:
if CONFIG['MOZ_AAUDIO']: if CONFIG['MOZ_AAUDIO']:
SOURCES += ['cubeb_aaudio.cpp'] SOURCES += ['cubeb_aaudio.cpp']
SOURCES['cubeb_aaudio.cpp'].flags += ['-D__ANDROID_UNAVAILABLE_SYMBOLS_ARE_WEAK__']
DEFINES['USE_AAUDIO'] = True DEFINES['USE_AAUDIO'] = True
if CONFIG['MOZ_OPENSL']: if CONFIG['MOZ_OPENSL']:

Просмотреть файл

@ -20,7 +20,7 @@ from tqdm import tqdm
# variable. # variable.
from mozboot.bootstrap import MOZCONFIG_SUGGESTION_TEMPLATE from mozboot.bootstrap import MOZCONFIG_SUGGESTION_TEMPLATE
NDK_VERSION = "r21d" NDK_VERSION = "r23c"
CMDLINE_TOOLS_VERSION_STRING = "9.0" CMDLINE_TOOLS_VERSION_STRING = "9.0"
CMDLINE_TOOLS_VERSION = "9477386" CMDLINE_TOOLS_VERSION = "9477386"
@ -676,19 +676,14 @@ def generate_mozconfig(os_name, artifact_mode=False):
def android_ndk_url(os_name, ver=NDK_VERSION): def android_ndk_url(os_name, ver=NDK_VERSION):
# Produce a URL like # Produce a URL like
# 'https://dl.google.com/android/repository/android-ndk-$VER-linux-x86_64.zip # 'https://dl.google.com/android/repository/android-ndk-$VER-linux.zip
base_url = "https://dl.google.com/android/repository/android-ndk" base_url = "https://dl.google.com/android/repository/android-ndk"
if os_name == "macosx": if os_name == "macosx":
# |mach bootstrap| uses 'macosx', but Google uses 'darwin'. # |mach bootstrap| uses 'macosx', but Google uses 'darwin'.
os_name = "darwin" os_name = "darwin"
if sys.maxsize > 2 ** 32: return "%s-%s-%s.zip" % (base_url, ver, os_name)
arch = "x86_64"
else:
arch = "x86"
return "%s-%s-%s-%s.zip" % (base_url, ver, os_name, arch)
def main(argv): def main(argv):

Просмотреть файл

@ -46,6 +46,7 @@ job-defaults:
toolchain: toolchain:
- android-ndk-linux - android-ndk-linux
- android-sdk-linux - android-sdk-linux
- linux64-binutils
- linux64-jdk - linux64-jdk
- linux64-rust-android - linux64-rust-android
- linux64-rust-size - linux64-rust-size

Просмотреть файл

@ -176,26 +176,6 @@ linux64-rust-macos-1.68:
] ]
toolchain-alias: linux64-rust-macos toolchain-alias: linux64-rust-macos
linux64-rust-android-1.67:
description: "rust repack with android-cross support"
treeherder:
symbol: TL(rust-android-1.67)
run:
arguments: [
'--channel', '1.67.0',
'--host', 'x86_64-unknown-linux-gnu',
'--target', 'x86_64-unknown-linux-gnu',
'--target', 'armv7-linux-androideabi',
'--target', 'thumbv7neon-linux-androideabi',
'--target', 'aarch64-linux-android',
'--target', 'i686-linux-android',
'--target', 'x86_64-linux-android',
'--compiler-builtins-hack',
]
fetches:
toolchain:
- linux64-clang-toolchain
linux64-rust-android-1.68: linux64-rust-android-1.68:
description: "rust repack with android-cross support" description: "rust repack with android-cross support"
treeherder: treeherder:

Просмотреть файл

@ -272,7 +272,7 @@ jobs:
- android-system-image-x86_64-linux - android-system-image-x86_64-linux
- android-avd-x86_64-linux - android-avd-x86_64-linux
- linux64-jdk - linux64-jdk
- linux64-rust-android-1.67 - linux64-rust-android
- wrench-deps - wrench-deps
treeherder: treeherder:
platform: android-em-7-0-x86/debug platform: android-em-7-0-x86/debug
@ -317,7 +317,7 @@ jobs:
- android-system-image-x86_64-linux - android-system-image-x86_64-linux
- android-avd-x86_64-linux - android-avd-x86_64-linux
- linux64-jdk - linux64-jdk
- linux64-rust-android-1.67 - linux64-rust-android
- wrench-deps - wrench-deps
treeherder: treeherder:
platform: android-em-7-0-x86/opt platform: android-em-7-0-x86/opt