Move NDK to CIPD-based //third_party/android_toolchain
Move all references from //third_party/android_ndk to the new CIPD-based //third_party/android_toolchain. Bug: 1448383 Test: CQ Change-Id: I83e085035c4eb71229e69ebe29de7f0598606c4b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4575445 Reviewed-by: Nico Weber <thakis@chromium.org> Reviewed-by: Nate Fischer <ntfschr@chromium.org> Commit-Queue: Prashanth Swaminathan <prashanthsw@google.com> Cr-Commit-Position: refs/heads/main@{#1154515}
This commit is contained in:

committed by
Chromium LUCI CQ

parent
29ad67fb87
commit
c2e7afa50a
DEPS
android_webview/tools
base/allocator/partition_allocator
build
android
config
build_overrides
components/cronet/android
docs
tools
10
DEPS
10
DEPS
@ -992,9 +992,15 @@ deps = {
|
||||
'dep_type': 'cipd',
|
||||
},
|
||||
|
||||
'src/third_party/android_ndk': {
|
||||
'url': Var('chromium_git') + '/android_ndk.git' + '@' + '310956bd122ec2b96049f8d7398de6b717f3452e',
|
||||
'src/third_party/android_toolchain': {
|
||||
'packages': [
|
||||
{
|
||||
'package': 'chromium/third_party/android_toolchain/r23c/android_toolchain',
|
||||
'version': 'version:2@r23c.cr0',
|
||||
},
|
||||
],
|
||||
'condition': 'checkout_android_native_support',
|
||||
'dep_type': 'cipd',
|
||||
},
|
||||
|
||||
'src/third_party/androidx': {
|
||||
|
@ -190,9 +190,10 @@ class SimplePerfRunner:
|
||||
@staticmethod
|
||||
def RunSimplePerf(perf_data_path, args):
|
||||
"""Runs the simple perf commandline."""
|
||||
cmd = ['third_party/android_ndk/simpleperf/app_profiler.py',
|
||||
'--perf_data_path', perf_data_path,
|
||||
'--skip_collect_binaries']
|
||||
cmd = [
|
||||
'third_party/android_toolchain/simpleperf/app_profiler.py',
|
||||
'--perf_data_path', perf_data_path, '--skip_collect_binaries'
|
||||
]
|
||||
if args.system_wide:
|
||||
cmd.append('--system_wide')
|
||||
else:
|
||||
@ -226,10 +227,11 @@ class SimplePerfRunner:
|
||||
@staticmethod
|
||||
def GetOriginalReportHtml(perf_data_path, report_html_path):
|
||||
"""Gets the original report.html from running simpleperf."""
|
||||
cmd = ['third_party/android_ndk/simpleperf/report_html.py',
|
||||
'--record_file', perf_data_path,
|
||||
'--report_path', report_html_path,
|
||||
'--no_browser']
|
||||
cmd = [
|
||||
'third_party/android_toolchain/simpleperf/report_html.py',
|
||||
'--record_file', perf_data_path, '--report_path', report_html_path,
|
||||
'--no_browser'
|
||||
]
|
||||
subprocess.check_call(cmd)
|
||||
lines = []
|
||||
with open(report_html_path, 'r') as f:
|
||||
|
@ -67,8 +67,8 @@ namespace {
|
||||
#if defined(PR_SET_VMA) && defined(PR_SET_VMA_ANON_NAME)
|
||||
const char* PageTagToName(PageTag tag) {
|
||||
// Important: All the names should be string literals. As per prctl.h in
|
||||
// //third_party/android_ndk the kernel keeps a pointer to the name instead
|
||||
// of copying it.
|
||||
// //third_party/android_toolchain the kernel keeps a pointer to the name
|
||||
// instead of copying it.
|
||||
//
|
||||
// Having the name in .rodata ensures that the pointer remains valid as
|
||||
// long as the mapping is alive.
|
||||
|
@ -23,32 +23,32 @@
|
||||
"file_info": {
|
||||
"android_armeabi-v7a": {
|
||||
"local_paths": [
|
||||
"../../third_party/android_ndk/simpleperf/bin/android/arm/simpleperf"
|
||||
"../../third_party/android_toolchain/simpleperf/bin/android/arm/simpleperf"
|
||||
]
|
||||
},
|
||||
"android_arm64-v8a": {
|
||||
"local_paths": [
|
||||
"../../third_party/android_ndk/simpleperf/bin/android/arm64/simpleperf"
|
||||
"../../third_party/android_toolchain/simpleperf/bin/android/arm64/simpleperf"
|
||||
]
|
||||
},
|
||||
"android_x86": {
|
||||
"local_paths": [
|
||||
"../../third_party/android_ndk/simpleperf/bin/android/x86/simpleperf"
|
||||
"../../third_party/android_toolchain/simpleperf/bin/android/x86/simpleperf"
|
||||
]
|
||||
},
|
||||
"android_x86_64": {
|
||||
"local_paths": [
|
||||
"../../third_party/android_ndk/simpleperf/bin/android/x86_64/simpleperf"
|
||||
"../../third_party/android_toolchain/simpleperf/bin/android/x86_64/simpleperf"
|
||||
]
|
||||
},
|
||||
"linux_x86": {
|
||||
"local_paths": [
|
||||
"../../third_party/android_ndk/simpleperf/bin/linux/x86/simpleperf"
|
||||
"../../third_party/android_toolchain/simpleperf/bin/linux/x86/simpleperf"
|
||||
]
|
||||
},
|
||||
"linux_x86_64": {
|
||||
"local_paths": [
|
||||
"../../third_party/android_ndk/simpleperf/bin/linux/x86_64/simpleperf"
|
||||
"../../third_party/android_toolchain/simpleperf/bin/linux/x86_64/simpleperf"
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -57,7 +57,7 @@
|
||||
"file_info": {
|
||||
"default": {
|
||||
"local_paths": [
|
||||
"../../third_party/android_ndk/simpleperf"
|
||||
"../../third_party/android_toolchain/simpleperf"
|
||||
]
|
||||
}
|
||||
}
|
||||
|
@ -119,8 +119,8 @@ ANDROID_SDK_ROOT = os.path.join(DIR_SOURCE_ROOT, 'third_party', 'android_sdk',
|
||||
'public')
|
||||
ANDROID_SDK_TOOLS = os.path.join(ANDROID_SDK_ROOT,
|
||||
'build-tools', ANDROID_SDK_BUILD_TOOLS_VERSION)
|
||||
ANDROID_NDK_ROOT = os.path.join(DIR_SOURCE_ROOT,
|
||||
'third_party', 'android_ndk')
|
||||
ANDROID_NDK_ROOT = os.path.join(DIR_SOURCE_ROOT, 'third_party',
|
||||
'android_toolchain')
|
||||
|
||||
BAD_DEVICES_JSON = os.path.join(DIR_SOURCE_ROOT,
|
||||
os.environ.get('CHROMIUM_OUT_DIR', 'out'),
|
||||
|
@ -2,7 +2,7 @@
|
||||
# Use of this source code is governed by a BSD-style license that can be
|
||||
# found in the LICENSE file.
|
||||
|
||||
TOOLCHAIN=../../../../third_party/android_ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi-
|
||||
TOOLCHAIN=../../../../third_party/android_toolchain/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/arm-linux-androideabi-
|
||||
CXX=$(TOOLCHAIN)g++
|
||||
|
||||
lib%.so: %.cc
|
||||
|
@ -96,7 +96,7 @@ if (is_android || is_chromeos) {
|
||||
}
|
||||
|
||||
if (!defined(default_android_ndk_root)) {
|
||||
default_android_ndk_root = "//third_party/android_ndk"
|
||||
default_android_ndk_root = "//third_party/android_toolchain"
|
||||
default_android_ndk_version = "r23"
|
||||
default_android_ndk_major_version = 23
|
||||
} else {
|
||||
|
@ -36,12 +36,12 @@ __filegroups = {
|
||||
"type": "glob",
|
||||
"includes": ["*.h"],
|
||||
},
|
||||
"third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include:include": {
|
||||
"third_party/android_toolchain/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include:include": {
|
||||
"type": "glob",
|
||||
"includes": ["*"],
|
||||
# can't use "*.h", because c++ headers have no extension.
|
||||
},
|
||||
"third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include:include": {
|
||||
"third_party/android_toolchain/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include:include": {
|
||||
"type": "glob",
|
||||
"includes": ["*"],
|
||||
},
|
||||
@ -105,9 +105,9 @@ def __step_config(ctx, step_config):
|
||||
"build/linux/debian_bullseye_i386-sysroot/usr/include:include",
|
||||
"build/linux/debian_bullseye_i386-sysroot/usr/lib:headers",
|
||||
],
|
||||
"third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot:headers": [
|
||||
"third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include:include",
|
||||
"third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include:include",
|
||||
"third_party/android_toolchain/toolchains/llvm/prebuilt/linux-x86_64/sysroot:headers": [
|
||||
"third_party/android_toolchain/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/include:include",
|
||||
"third_party/android_toolchain/toolchains/llvm/prebuilt/linux-x86_64/sysroot/usr/local/include:include",
|
||||
],
|
||||
|
||||
# need this because we use
|
||||
|
@ -7,7 +7,7 @@ import("//build/config/gclient_args.gni")
|
||||
|
||||
# Uncomment these to specify a different NDK location and version in
|
||||
# non-Chromium builds.
|
||||
# default_android_ndk_root = "//third_party/android_ndk"
|
||||
# default_android_ndk_root = "//third_party/android_toolchain"
|
||||
# default_android_ndk_version = "r10e"
|
||||
|
||||
# Some non-Chromium builds don't support building java targets.
|
||||
|
@ -40,7 +40,7 @@
|
||||
//net/traffic_annotation
|
||||
//third_party/abseil-cpp
|
||||
//third_party/android_deps
|
||||
//third_party/android_ndk
|
||||
//third_party/android_toolchain
|
||||
//third_party/android_sdk
|
||||
//third_party/androidx
|
||||
//third_party/ashmem
|
||||
|
@ -212,7 +212,7 @@ If the above step fails or to run stuff without Chromium testing script (ex.
|
||||
ContentShell.apk, or any third party apk or binary), device setup is needed:
|
||||
```shell
|
||||
tools/android/asan/third_party/asan_device_setup.sh \
|
||||
--lib third_party/android_ndk/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/*/lib/linux
|
||||
--lib third_party/android_toolchain/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/*/lib/linux
|
||||
# wait a few seconds for the device to reload
|
||||
```
|
||||
It only needs to be run once per device. It is safe to run it multiple times.
|
||||
|
@ -155,12 +155,12 @@ def GetObjDumpPath():
|
||||
def GetDisassembleObjDumpPath(arch):
|
||||
path = None
|
||||
if arch == 'arm':
|
||||
path = FromToolsSrcRoot('third_party', 'android_ndk', 'toolchains',
|
||||
path = FromToolsSrcRoot('third_party', 'android_toolchain', 'toolchains',
|
||||
'arm-linux-androideabi-4.9', 'prebuilt',
|
||||
'linux-x86_64', 'bin',
|
||||
'arm-linux-androideabi-objdump')
|
||||
elif arch == 'arm64':
|
||||
path = FromToolsSrcRoot('third_party', 'android_ndk', 'toolchains',
|
||||
path = FromToolsSrcRoot('third_party', 'android_toolchain', 'toolchains',
|
||||
'aarch64-linux-android-4.9', 'prebuilt',
|
||||
'linux-x86_64', 'bin',
|
||||
'aarch64-linux-android-objdump')
|
||||
|
@ -55,8 +55,7 @@ LLVM_INSTRUMENTED_DIR = os.path.join(THIRD_PARTY_DIR, 'llvm-instrumented')
|
||||
LLVM_PROFDATA_FILE = os.path.join(LLVM_INSTRUMENTED_DIR, 'profdata.prof')
|
||||
LLVM_BUILD_TOOLS_DIR = os.path.abspath(
|
||||
os.path.join(LLVM_DIR, '..', 'llvm-build-tools'))
|
||||
ANDROID_NDK_DIR = os.path.join(
|
||||
CHROMIUM_DIR, 'third_party', 'android_ndk')
|
||||
ANDROID_NDK_DIR = os.path.join(CHROMIUM_DIR, 'third_party', 'android_toolchain')
|
||||
FUCHSIA_SDK_DIR = os.path.join(CHROMIUM_DIR, 'third_party', 'fuchsia-sdk',
|
||||
'sdk')
|
||||
PINNED_CLANG_DIR = os.path.join(LLVM_BUILD_TOOLS_DIR, 'pinned-clang')
|
||||
|
@ -211,7 +211,7 @@ group("telemetry_chrome_test_without_chrome") {
|
||||
|
||||
# These dependencies are necessary for running Telemetry tests in an
|
||||
# Android emulator.
|
||||
"//third_party/android_ndk/simpleperf/",
|
||||
"//third_party/android_toolchain/simpleperf/",
|
||||
"//third_party/android_sdk/public/",
|
||||
"//tools/android/avd/proto/",
|
||||
]
|
||||
|
Reference in New Issue
Block a user