Skip to content

Commit

Permalink
Move NDK to CIPD-based //third_party/android_toolchain
Browse files Browse the repository at this point in the history
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}
  • Loading branch information
prashanthswami authored and Chromium LUCI CQ committed Jun 7, 2023
1 parent 29ad67f commit c2e7afa
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 35 deletions.
10 changes: 8 additions & 2 deletions DEPS
Original file line number Diff line number Diff line change
Expand Up @@ -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': {
Expand Down
16 changes: 9 additions & 7 deletions android_webview/tools/run_simpleperf.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,10 @@ def Run(self):
@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:
Expand Down Expand Up @@ -226,10 +227,11 @@ def _GetWebViewApkPath(self, package_name):
@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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
14 changes: 7 additions & 7 deletions build/android/devil_chromium.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
}
}
Expand All @@ -57,7 +57,7 @@
"file_info": {
"default": {
"local_paths": [
"../../third_party/android_ndk/simpleperf"
"../../third_party/android_toolchain/simpleperf"
]
}
}
Expand Down
4 changes: 2 additions & 2 deletions build/android/pylib/constants/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@
'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'),
Expand Down
2 changes: 1 addition & 1 deletion build/android/tests/symbolize/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build/config/android/config.gni
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
10 changes: 5 additions & 5 deletions build/config/siso/clang_linux.star
Original file line number Diff line number Diff line change
Expand Up @@ -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": ["*"],
},
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion build_overrides/build.gni
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion components/cronet/android/dependencies.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/asan.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
4 changes: 2 additions & 2 deletions tools/binary_size/libsupersize/path_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand Down
3 changes: 1 addition & 2 deletions tools/clang/scripts/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@
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')
Expand Down
2 changes: 1 addition & 1 deletion tools/perf/chrome_telemetry_build/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -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/",
]
Expand Down

0 comments on commit c2e7afa

Please sign in to comment.