Move //buildtools to //flutter/buildtools (flutter/engine#51526)

This commit is contained in:
Jason Simmons 2024-03-21 10:06:44 -07:00 committed by GitHub
parent a6f055f17e
commit 762d37fd2e
23 changed files with 55 additions and 44 deletions

38
DEPS
View File

@ -842,7 +842,7 @@ deps = {
# Clang on mac and linux are expected to typically be the same revision.
# They are separated out so that the autoroller can more easily manage them.
'src/buildtools/mac-x64/clang': {
'src/flutter/buildtools/mac-x64/clang': {
'packages': [
{
'package': 'fuchsia/third_party/clang/mac-amd64',
@ -853,7 +853,7 @@ deps = {
'dep_type': 'cipd',
},
'src/buildtools/mac-arm64/clang': {
'src/flutter/buildtools/mac-arm64/clang': {
'packages': [
{
'package': 'fuchsia/third_party/clang/mac-arm64',
@ -864,7 +864,7 @@ deps = {
'dep_type': 'cipd',
},
'src/buildtools/linux-x64/clang': {
'src/flutter/buildtools/linux-x64/clang': {
'packages': [
{
'package': 'fuchsia/third_party/clang/linux-amd64',
@ -875,7 +875,7 @@ deps = {
'dep_type': 'cipd',
},
'src/buildtools/linux-arm64/clang': {
'src/flutter/buildtools/linux-arm64/clang': {
'packages': [
{
'package': 'fuchsia/third_party/clang/linux-arm64',
@ -886,7 +886,7 @@ deps = {
'dep_type': 'cipd',
},
'src/buildtools/windows-x64/clang': {
'src/flutter/buildtools/windows-x64/clang': {
'packages': [
{
'package': 'fuchsia/third_party/clang/windows-amd64',
@ -898,7 +898,7 @@ deps = {
},
# GOMA
'src/buildtools/mac-x64/goma': {
'src/flutter/buildtools/mac-x64/goma': {
'packages': [
{
'package': 'fuchsia/third_party/goma/client/mac-amd64',
@ -909,7 +909,7 @@ deps = {
'dep_type': 'cipd',
},
'src/buildtools/linux-x64/goma': {
'src/flutter/buildtools/linux-x64/goma': {
'packages': [
{
'package': 'fuchsia/third_party/goma/client/linux-amd64',
@ -920,7 +920,7 @@ deps = {
'dep_type': 'cipd',
},
'src/buildtools/windows-x64/goma': {
'src/flutter/buildtools/windows-x64/goma': {
'packages': [
{
'package': 'fuchsia/third_party/goma/client/windows-amd64',
@ -932,7 +932,7 @@ deps = {
},
# RBE binaries and configs.
'src/buildtools/linux-x64/reclient': {
'src/flutter/buildtools/linux-x64/reclient': {
'packages': [
{
'package': 'infra/rbe/client/${{platform}}',
@ -943,7 +943,7 @@ deps = {
'dep_type': 'cipd',
},
'src/buildtools/mac-arm64/reclient': {
'src/flutter/buildtools/mac-arm64/reclient': {
'packages': [
{
'package': 'infra/rbe/client/${{platform}}',
@ -954,7 +954,7 @@ deps = {
'dep_type': 'cipd',
},
'src/buildtools/mac-x64/reclient': {
'src/flutter/buildtools/mac-x64/reclient': {
'packages': [
{
'package': 'infra/rbe/client/${{platform}}',
@ -965,7 +965,7 @@ deps = {
'dep_type': 'cipd',
},
'src/buildtools/windows-x64/reclient': {
'src/flutter/buildtools/windows-x64/reclient': {
'packages': [
{
'package': 'infra/rbe/client/${{platform}}',
@ -980,7 +980,7 @@ deps = {
'packages': [
{
'package': 'flutter_internal/rbe/reclient_cfgs',
'version': 'PKYzmgx_GlWBAq7PEphD7bsfZ55WSOifmWisD0N-4e4C',
'version': 'ZuU_165luvP45DTYUP6WlEXb5EXyVxEuAm45ZB1c3zoC',
}
],
'condition': 'use_rbe',
@ -988,7 +988,7 @@ deps = {
},
# gcloud
'src/buildtools/linux-x64/gcloud': {
'src/flutter/buildtools/linux-x64/gcloud': {
'packages': [
{
'package': 'infra/3pp/tools/gcloud/${{platform}}',
@ -999,7 +999,7 @@ deps = {
'dep_type': 'cipd',
},
'src/buildtools/mac-arm64/gcloud': {
'src/flutter/buildtools/mac-arm64/gcloud': {
'packages': [
{
'package': 'infra/3pp/tools/gcloud/${{platform}}',
@ -1051,7 +1051,7 @@ deps = {
},
# cmake is only used by impeller-cmake-example.
'src/buildtools/mac-x64/cmake': {
'src/flutter/buildtools/mac-x64/cmake': {
'packages': [
{
'package': 'infra/3pp/tools/cmake/mac-amd64',
@ -1162,7 +1162,7 @@ hooks = [
'condition': 'use_cipd_goma and host_os == "mac"',
'action': [
'python3',
'src/buildtools/mac-x64/goma/goma_ctl.py',
'src/flutter/buildtools/mac-x64/goma/goma_ctl.py',
'ensure_start'
]
},
@ -1172,7 +1172,7 @@ hooks = [
'condition': 'use_cipd_goma and host_os == "linux"',
'action': [
'python3',
'src/buildtools/linux-x64/goma/goma_ctl.py',
'src/flutter/buildtools/linux-x64/goma/goma_ctl.py',
'ensure_start'
]
},
@ -1182,7 +1182,7 @@ hooks = [
'condition': 'use_cipd_goma and download_windows_deps',
'action': [
'python3',
'src/buildtools/windows-x64/goma/goma_ctl.py',
'src/flutter/buildtools/windows-x64/goma/goma_ctl.py',
'ensure_start'
]
},

View File

@ -134,6 +134,9 @@ app.*.symbols
# GN build support for protobufs vended by Fuchsia.
# /build/secondary/third_party/protobuf
# Build tools vended from CIPD
/buildtools
# RBE support configurations and scripts vended from CIPD
/build/rbe

View File

@ -23,7 +23,7 @@ import git_revision
def get_clang_version():
clang_executable = str(
os.path.join('..', '..', 'buildtools', 'mac-x64', 'clang', 'bin', 'clang++')
os.path.join('..', '..', 'flutter', 'buildtools', 'mac-x64', 'clang', 'bin', 'clang++')
)
version = subprocess.check_output([clang_executable, '--version'])
return version.splitlines()[0]

View File

@ -326,6 +326,7 @@ class ClangFormatChecker extends FormatChecker {
clangFormat = File(
path.join(
srcDir.absolute.path,
'flutter',
'buildtools',
clangOs,
'clang',

View File

@ -56,7 +56,7 @@ fi
# Determine wether to use x64 or arm64.
if command -v arch &> /dev/null && [[ $(arch) == "arm64" ]]; then
CLANG_TIDY_PATH="buildtools/mac-arm64/clang/bin/clang-tidy"
CLANG_TIDY_PATH="flutter/buildtools/mac-arm64/clang/bin/clang-tidy"
fi
COMPILE_COMMANDS="$SRC_DIR/out/host_debug/compile_commands.json"

View File

@ -9,7 +9,6 @@
../../../README.md
../../../build
../../../build_overrides
../../../buildtools
../../../flutter/.ci.yaml
../../../flutter/.clang-format
../../../flutter/.clang-tidy
@ -27,6 +26,7 @@
../../../flutter/analysis_options.yaml
../../../flutter/build
../../../flutter/build_overrides
../../../flutter/buildtools
../../../flutter/ci
../../../flutter/common/README.md
../../../flutter/display_list/benchmarking/dl_complexity_unittests.cc

View File

@ -1,2 +1,2 @@
Signature: 10ea95d73c5e8a92240f014b15634a8c
Signature: ca33ea519500557f75994e39099baaa0

View File

@ -6,6 +6,7 @@ assert(is_ios)
import("//build/config/ios/ios_sdk.gni")
import("//build/toolchain/clang.gni")
import("//build/toolchain/toolchain.gni")
import("//flutter/common/config.gni")
import("//flutter/shell/config.gni")
import("//flutter/shell/gpu/gpu.gni")
@ -344,7 +345,7 @@ copy("copy_asan_runtime_dylib") {
visibility = [ ":*" ]
_libclang_base_path =
"//buildtools/mac-x64/clang/lib/clang/13.0.0/lib/darwin/"
"$buildtools_path/mac-x64/clang/lib/clang/13.0.0/lib/darwin/"
if (defined(use_ios_simulator) && use_ios_simulator) {
_dylib_name = "libclang_rt.asan_iossim_dynamic.dylib"

View File

@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/toolchain/toolchain.gni")
import("//flutter/build/dart/dart.gni")
import("//flutter/tools/fuchsia/clang.gni")
@ -23,7 +24,7 @@ template("generate_dart_profiler_symbols") {
args = [
"--nm",
rebase_path("//buildtools/${host_os}-${host_cpu}/clang/bin/llvm-nm"),
rebase_path("$buildtools_path/${host_os}-${host_cpu}/clang/bin/llvm-nm"),
"--binary",
rebase_path(invoker.library_path),
"--output",

View File

@ -15,8 +15,7 @@ buildroot_dir = os.path.abspath(os.path.join(os.path.realpath(__file__), '..', '
ARCH_SUBPATH = 'mac-arm64' if platform.processor() == 'arm' else 'mac-x64'
DSYMUTIL = os.path.join(
os.path.dirname(__file__), '..', '..', '..', 'buildtools', ARCH_SUBPATH, 'clang', 'bin',
'dsymutil'
os.path.dirname(__file__), '..', '..', 'buildtools', ARCH_SUBPATH, 'clang', 'bin', 'dsymutil'
)
out_dir = os.path.join(buildroot_dir, 'out')

View File

@ -18,8 +18,7 @@ from create_xcframework import create_xcframework # pylint: disable=import-erro
ARCH_SUBPATH = 'mac-arm64' if platform.processor() == 'arm' else 'mac-x64'
DSYMUTIL = os.path.join(
os.path.dirname(__file__), '..', '..', '..', 'buildtools', ARCH_SUBPATH, 'clang', 'bin',
'dsymutil'
os.path.dirname(__file__), '..', '..', 'buildtools', ARCH_SUBPATH, 'clang', 'bin', 'dsymutil'
)
buildroot_dir = os.path.abspath(os.path.join(os.path.realpath(__file__), '..', '..', '..', '..'))

View File

@ -15,8 +15,7 @@ from create_xcframework import create_xcframework # pylint: disable=import-erro
ARCH_SUBPATH = 'mac-arm64' if platform.processor() == 'arm' else 'mac-x64'
DSYMUTIL = os.path.join(
os.path.dirname(__file__), '..', '..', '..', 'buildtools', ARCH_SUBPATH, 'clang', 'bin',
'dsymutil'
os.path.dirname(__file__), '..', '..', 'buildtools', ARCH_SUBPATH, 'clang', 'bin', 'dsymutil'
)

View File

@ -17,8 +17,7 @@ buildroot_dir = os.path.abspath(os.path.join(os.path.realpath(__file__), '..', '
ARCH_SUBPATH = 'mac-arm64' if platform.processor() == 'arm' else 'mac-x64'
DSYMUTIL = os.path.join(
os.path.dirname(__file__), '..', '..', '..', 'buildtools', ARCH_SUBPATH, 'clang', 'bin',
'dsymutil'
os.path.dirname(__file__), '..', '..', 'buildtools', ARCH_SUBPATH, 'clang', 'bin', 'dsymutil'
)
out_dir = os.path.join(buildroot_dir, 'out')

View File

@ -3,10 +3,10 @@ ENGINE_BUILDROOT=$(cd $TESTING_DIRECTORY/../..; pwd -P)
case "$(uname -s)" in
Linux)
BUILDTOOLS_DIRECTORY="${ENGINE_BUILDROOT}/buildtools/linux-x64"
BUILDTOOLS_DIRECTORY="${ENGINE_BUILDROOT}/flutter/buildtools/linux-x64"
;;
Darwin)
BUILDTOOLS_DIRECTORY="${ENGINE_BUILDROOT}/buildtools/mac-x64"
BUILDTOOLS_DIRECTORY="${ENGINE_BUILDROOT}/flutter/buildtools/mac-x64"
;;
esac

View File

@ -40,7 +40,7 @@ void main(List<String> arguments) {
outPath = p.join(engineCheckoutPath, outPath);
}
final String buildToolsPath = arguments.length == 1
? p.join(p.dirname(outPath), 'buildtools')
? p.join(p.dirname(outPath), 'flutter', 'buildtools')
: arguments[1];
String platform;

View File

@ -39,6 +39,7 @@ void main() {
'.git',
'.github',
'build_overrides',
'buildtools',
'prebuilts',
'third_party',
};

View File

@ -18,9 +18,7 @@ import sys
# Path constants. (All of these should be absolute paths.)
THIS_DIR = os.path.abspath(os.path.dirname(__file__))
LLVM_BUILD_DIR = os.path.abspath(
os.path.join(THIS_DIR, '..', '..', 'buildtools', 'windows-x64', 'clang')
)
LLVM_BUILD_DIR = os.path.abspath(os.path.join(THIS_DIR, '..', 'buildtools', 'windows-x64', 'clang'))
def GetDiaDll():

View File

@ -2,10 +2,12 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/toolchain/toolchain.gni")
declare_args() {
# The default clang toolchain provided by the prebuilt. This variable is
# additionally consumed by the Go toolchain.
clang_base = rebase_path("//buildtools/${host_os}-${host_cpu}/clang/lib")
clang_base = rebase_path("$buildtools_path/${host_os}-${host_cpu}/clang/lib")
}
if (current_cpu == "arm64") {

View File

@ -2,6 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/toolchain/toolchain.gni")
import("//flutter/common/fuchsia_config.gni")
# The inputs to this template are 'binary_path' and a boolean 'unstripped'.
@ -33,7 +34,8 @@ template("_copy_debug_symbols") {
"--destination-base",
rebase_path(_dest_base),
"--read-elf",
rebase_path("//buildtools/${host_os}-${host_cpu}/clang/bin/llvm-readelf"),
rebase_path(
"$buildtools_path/${host_os}-${host_cpu}/clang/bin/llvm-readelf"),
]
if (unstripped) {

View File

@ -231,7 +231,9 @@ def setup_rbe(args):
if args.rbe_platform:
rbe_gn_args['rbe_platform'] = args.rbe_platform
rbe_gn_args['rbe_dir'] = os.path.join(SRC_ROOT, 'buildtools', buildtools_dir(), 'reclient')
rbe_gn_args['rbe_dir'] = os.path.join(
SRC_ROOT, 'flutter', 'buildtools', buildtools_dir(), 'reclient'
)
rbe_gn_args['rbe_cfg'] = os.path.join(
SRC_ROOT, 'flutter', 'build', 'rbe', 'rewrapper-' + buildtools_dir() + '.cfg'
@ -271,7 +273,7 @@ def setup_goma(args):
buildtools_platform = 'mac-x64'
# Prefer the goma fetched by gclient if it exists.
cipd_goma_dir = os.path.join(SRC_ROOT, 'buildtools', buildtools_platform, 'goma')
cipd_goma_dir = os.path.join(SRC_ROOT, 'flutter', 'buildtools', buildtools_platform, 'goma')
# Next, if GOMA_DIR is set, use that install.
goma_dir = os.environ.get('GOMA_DIR')
@ -457,6 +459,8 @@ def to_gn_args(args):
gn_args = {}
gn_args['buildtools_path'] = '//flutter/buildtools'
gn_args['is_debug'] = args.unoptimized
gn_args.update(setup_git_versions())

View File

@ -183,6 +183,7 @@ final ArgParser _parser = ArgParser()
valueHelp: 'path/to/dir/or/file (relative to the engine root)',
defaultsTo: _engine != null ? <String>[
'build',
'buildtools',
'impeller/compiler/code_gen_template.h',
'prebuilts',
'third_party',

View File

@ -22,6 +22,7 @@ final Set<String> skippedPaths = <String>{
r'buildtools', // only used by build
r'flutter/build',
r'flutter/build_overrides', // only used by build
r'flutter/buildtools', // only used by build
r'flutter/ci',
r'flutter/docs',
r'flutter/flutter_frontend_server',

View File

@ -329,7 +329,7 @@ final class BuildRunner extends Runner {
Platform.windows => 'windows-$_hostCpu',
_ => throw StateError('This host OS "$os" is not supported.'),
};
return p.join(engineSrcDir.path, 'buildtools', platformDir);
return p.join(engineSrcDir.path, 'flutter', 'buildtools', platformDir);
}();
Future<bool> _bootstrapRbe(