From 8f629f2ee0b732089d46da88a767a16199b47552 Mon Sep 17 00:00:00 2001 From: Zachary Anderson Date: Fri, 3 Nov 2023 10:59:49 -0700 Subject: [PATCH] Move //third_party/benchmark to //flutter/third_party/benchmark (flutter/engine#47652) As part of eliminating the Flutter buildroot (https://github.com/flutter/flutter/issues/67373), we are moving all third-party dependencies from //third_party to //flutter/third_party. Once all third-party dependencies have been migrated, tooling and config will be moved and the buildroot will be eliminated altogether. No tests changed because there is no semantic change to this PR. This is simply relocating a dependency. --- DEPS | 2 +- engine/src/flutter/benchmarking/BUILD.gn | 6 +- .../flutter/third_party/benchmark/BUILD.gn | 59 ++++++++++++++++++ .../secondary/third_party/benchmark/BUILD.gn | 60 ------------------- .../flutter/ci/licenses_golden/excluded_files | 2 +- .../flutter/ci/licenses_golden/tool_signature | 2 +- engine/src/flutter/third_party/txt/BUILD.gn | 2 +- .../src/flutter/tools/licenses/lib/paths.dart | 2 +- 8 files changed, 67 insertions(+), 68 deletions(-) create mode 100644 engine/src/flutter/build/secondary/flutter/third_party/benchmark/BUILD.gn delete mode 100644 engine/src/flutter/build/secondary/third_party/benchmark/BUILD.gn diff --git a/DEPS b/DEPS index b00954a96b..b0ff5dc12d 100644 --- a/DEPS +++ b/DEPS @@ -294,7 +294,7 @@ deps = { 'src/flutter/third_party/gtest-parallel': Var('chromium_git') + '/external/github.com/google/gtest-parallel' + '@' + '38191e2733d7cbaeaef6a3f1a942ddeb38a2ad14', - 'src/third_party/benchmark': + 'src/flutter/third_party/benchmark': Var('chromium_git') + '/external/github.com/google/benchmark' + '@' + '431abd149fd76a072f821913c0340137cc755f36', 'src/third_party/googletest': diff --git a/engine/src/flutter/benchmarking/BUILD.gn b/engine/src/flutter/benchmarking/BUILD.gn index 08a33710fe..50c208bdd6 100644 --- a/engine/src/flutter/benchmarking/BUILD.gn +++ b/engine/src/flutter/benchmarking/BUILD.gn @@ -3,7 +3,7 @@ # found in the LICENSE file. config("benchmark_config") { - include_dirs = [ "//third_party/benchmark:benchmark_config" ] + include_dirs = [ "//flutter/third_party/benchmark:benchmark_config" ] } source_set("benchmarking") { @@ -16,7 +16,7 @@ source_set("benchmarking") { public_deps = [ "//flutter/fml", - "//third_party/benchmark", + "//flutter/third_party/benchmark", ] public_configs = [ @@ -39,7 +39,7 @@ source_set("benchmarking_library") { "library.h", ] - public_deps = [ "//third_party/benchmark" ] + public_deps = [ "//flutter/third_party/benchmark" ] public_configs = [ "//flutter:config", diff --git a/engine/src/flutter/build/secondary/flutter/third_party/benchmark/BUILD.gn b/engine/src/flutter/build/secondary/flutter/third_party/benchmark/BUILD.gn new file mode 100644 index 0000000000..77011568cb --- /dev/null +++ b/engine/src/flutter/build/secondary/flutter/third_party/benchmark/BUILD.gn @@ -0,0 +1,59 @@ +# Copyright 2016 The Fuchsia Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. +config("benchmark_config") { + visibility = [ ":*" ] + include_dirs = [ "include" ] +} +static_library("benchmark") { + testonly = true + + sources = [ + "//flutter/third_party/benchmark/src/arraysize.h", + "//flutter/third_party/benchmark/src/benchmark.cc", + "//flutter/third_party/benchmark/src/benchmark_api_internal.cc", + "//flutter/third_party/benchmark/src/benchmark_api_internal.h", + "//flutter/third_party/benchmark/src/benchmark_main.cc", + "//flutter/third_party/benchmark/src/benchmark_name.cc", + "//flutter/third_party/benchmark/src/benchmark_register.cc", + "//flutter/third_party/benchmark/src/benchmark_register.h", + "//flutter/third_party/benchmark/src/benchmark_runner.cc", + "//flutter/third_party/benchmark/src/benchmark_runner.h", + "//flutter/third_party/benchmark/src/check.h", + "//flutter/third_party/benchmark/src/colorprint.cc", + "//flutter/third_party/benchmark/src/colorprint.h", + "//flutter/third_party/benchmark/src/commandlineflags.cc", + "//flutter/third_party/benchmark/src/commandlineflags.h", + "//flutter/third_party/benchmark/src/complexity.cc", + "//flutter/third_party/benchmark/src/complexity.h", + "//flutter/third_party/benchmark/src/console_reporter.cc", + "//flutter/third_party/benchmark/src/counter.cc", + "//flutter/third_party/benchmark/src/counter.h", + "//flutter/third_party/benchmark/src/csv_reporter.cc", + "//flutter/third_party/benchmark/src/cycleclock.h", + "//flutter/third_party/benchmark/src/internal_macros.h", + "//flutter/third_party/benchmark/src/json_reporter.cc", + "//flutter/third_party/benchmark/src/log.h", + "//flutter/third_party/benchmark/src/mutex.h", + "//flutter/third_party/benchmark/src/perf_counters.cc", + "//flutter/third_party/benchmark/src/perf_counters.h", + "//flutter/third_party/benchmark/src/re.h", + "//flutter/third_party/benchmark/src/reporter.cc", + "//flutter/third_party/benchmark/src/sleep.cc", + "//flutter/third_party/benchmark/src/sleep.h", + "//flutter/third_party/benchmark/src/statistics.cc", + "//flutter/third_party/benchmark/src/statistics.h", + "//flutter/third_party/benchmark/src/string_util.cc", + "//flutter/third_party/benchmark/src/string_util.h", + "//flutter/third_party/benchmark/src/sysinfo.cc", + "//flutter/third_party/benchmark/src/thread_manager.h", + "//flutter/third_party/benchmark/src/thread_timer.h", + "//flutter/third_party/benchmark/src/timers.cc", + "//flutter/third_party/benchmark/src/timers.h", + ] + public_configs = [ ":benchmark_config" ] + defines = [ + "HAVE_STD_REGEX", + "HAVE_THREAD_SAFETY_ATTRIBUTES", + ] +} diff --git a/engine/src/flutter/build/secondary/third_party/benchmark/BUILD.gn b/engine/src/flutter/build/secondary/third_party/benchmark/BUILD.gn deleted file mode 100644 index f88d6bf0c6..0000000000 --- a/engine/src/flutter/build/secondary/third_party/benchmark/BUILD.gn +++ /dev/null @@ -1,60 +0,0 @@ -# Copyright 2016 The Fuchsia Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. -config("benchmark_config") { - visibility = [ ":*" ] - include_dirs = [ "include" ] -} -static_library("benchmark") { - testonly = true - - sources = [ - "//third_party/benchmark/src/arraysize.h", - "//third_party/benchmark/src/benchmark.cc", - "//third_party/benchmark/src/benchmark_api_internal.cc", - "//third_party/benchmark/src/benchmark_api_internal.h", - "//third_party/benchmark/src/benchmark_main.cc", - "//third_party/benchmark/src/benchmark_name.cc", - "//third_party/benchmark/src/benchmark_register.cc", - "//third_party/benchmark/src/benchmark_register.h", - "//third_party/benchmark/src/benchmark_runner.cc", - "//third_party/benchmark/src/benchmark_runner.h", - "//third_party/benchmark/src/check.h", - "//third_party/benchmark/src/colorprint.cc", - "//third_party/benchmark/src/colorprint.h", - "//third_party/benchmark/src/commandlineflags.cc", - "//third_party/benchmark/src/commandlineflags.h", - "//third_party/benchmark/src/complexity.cc", - "//third_party/benchmark/src/complexity.h", - "//third_party/benchmark/src/console_reporter.cc", - "//third_party/benchmark/src/counter.cc", - "//third_party/benchmark/src/counter.h", - "//third_party/benchmark/src/csv_reporter.cc", - "//third_party/benchmark/src/cycleclock.h", - "//third_party/benchmark/src/internal_macros.h", - "//third_party/benchmark/src/json_reporter.cc", - "//third_party/benchmark/src/log.h", - "//third_party/benchmark/src/mutex.h", - "//third_party/benchmark/src/perf_counters.cc", - "//third_party/benchmark/src/perf_counters.h", - "//third_party/benchmark/src/re.h", - "//third_party/benchmark/src/reporter.cc", - "//third_party/benchmark/src/sleep.cc", - "//third_party/benchmark/src/sleep.h", - "//third_party/benchmark/src/statistics.cc", - "//third_party/benchmark/src/statistics.h", - "//third_party/benchmark/src/string_util.cc", - "//third_party/benchmark/src/string_util.h", - "//third_party/benchmark/src/sysinfo.cc", - "//third_party/benchmark/src/sysinfo.h", - "//third_party/benchmark/src/thread_manager.h", - "//third_party/benchmark/src/thread_timer.h", - "//third_party/benchmark/src/timers.cc", - "//third_party/benchmark/src/timers.h", - ] - public_configs = [ ":benchmark_config" ] - defines = [ - "HAVE_STD_REGEX", - "HAVE_THREAD_SAFETY_ATTRIBUTES", - ] -} diff --git a/engine/src/flutter/ci/licenses_golden/excluded_files b/engine/src/flutter/ci/licenses_golden/excluded_files index b50f836af1..3e061375ff 100644 --- a/engine/src/flutter/ci/licenses_golden/excluded_files +++ b/engine/src/flutter/ci/licenses_golden/excluded_files @@ -430,6 +430,7 @@ ../../../flutter/third_party/accessibility/gfx/geometry/vector2d_unittest.cc ../../../flutter/third_party/accessibility/gfx/range/range_unittest.cc ../../../flutter/third_party/accessibility/gfx/test +../../../flutter/third_party/benchmark ../../../flutter/third_party/flatbuffers/.bazelci ../../../flutter/third_party/flatbuffers/.clang-format ../../../flutter/third_party/flatbuffers/.editorconfig @@ -1347,7 +1348,6 @@ ../../../third_party/angle/third_party ../../../third_party/angle/tools ../../../third_party/angle/util -../../../third_party/benchmark ../../../third_party/boringssl/.git ../../../third_party/boringssl/.gitignore ../../../third_party/boringssl/OWNERS diff --git a/engine/src/flutter/ci/licenses_golden/tool_signature b/engine/src/flutter/ci/licenses_golden/tool_signature index b306484a42..15bfaeedad 100644 --- a/engine/src/flutter/ci/licenses_golden/tool_signature +++ b/engine/src/flutter/ci/licenses_golden/tool_signature @@ -1,2 +1,2 @@ -Signature: 88225600314ebc39278ede6c886440b5 +Signature: 58eabd70bbf9797956ee94d042df857d diff --git a/engine/src/flutter/third_party/txt/BUILD.gn b/engine/src/flutter/third_party/txt/BUILD.gn index da4d0615d7..d917870109 100644 --- a/engine/src/flutter/third_party/txt/BUILD.gn +++ b/engine/src/flutter/third_party/txt/BUILD.gn @@ -137,7 +137,7 @@ if (enable_unittests) { ":txt_fixtures", "//flutter/fml", "//flutter/testing:testing_lib", - "//third_party/benchmark", + "//flutter/third_party/benchmark", "//third_party/skia/modules/skparagraph", ] } diff --git a/engine/src/flutter/tools/licenses/lib/paths.dart b/engine/src/flutter/tools/licenses/lib/paths.dart index 02476fb4d2..23ccd816cf 100644 --- a/engine/src/flutter/tools/licenses/lib/paths.dart +++ b/engine/src/flutter/tools/licenses/lib/paths.dart @@ -29,6 +29,7 @@ final Set skippedPaths = { r'flutter/lib/web_ui/dev', // these are build tools; they do not end up in Engine artifacts r'flutter/prebuilts', r'flutter/sky/packages/sky_engine/LICENSE', + r'flutter/third_party/benchmark', // only used by tests r'flutter/third_party/flatbuffers/android', r'flutter/third_party/flatbuffers/benchmarks', r'flutter/third_party/flatbuffers/docs', @@ -74,7 +75,6 @@ final Set skippedPaths = { r'third_party/angle/third_party', // Unused by Flutter: BUILD files with forwarding targets (but no code). r'third_party/angle/tools', // These are build-time tools, and aren't shipped. r'third_party/angle/util', - r'third_party/benchmark', // only used by tests r'third_party/boringssl/src/crypto/err/err_data_generate.go', r'third_party/boringssl/src/fuzz', // testing tools, not shipped r'third_party/boringssl/src/rust', // rust-related code is not shipped