v8/v8
0

[infra] Get google_benchmark from DEPS

This uses the GN layer for google_benchmark from Chromium directly,
which will allow rolling without maintaining this layer in V8.

This comes with the cost of compiling google_benchmark in v8
stand-alone if no explicit compile target was specified on the
command line (i.e. the implicit "all" target). This seems to be
below 1% of overall compile time though and will likely be quickly
hot in the reclient cache, since these targets rarely change.

Bug: chromium:1513046
Change-Id: Ia086c67ddc50f28f396527523f437eeb87f03f4b
Cq-Include-Trybots: luci.chromium.try:linux-rel
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5144246
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Reviewed-by: Liviu Rau <liviurau@google.com>
Cr-Commit-Position: refs/heads/main@{#91674}
This commit is contained in:
Michael Achenbach
2023-12-21 08:24:08 +01:00
committed by V8 LUCI CQ
parent a654e27b50
commit 5e1afae87b
5 changed files with 5 additions and 115 deletions
DEPS
test/benchmarks/cpp
third_party/google_benchmark

3
DEPS

@ -258,6 +258,9 @@ deps = {
'condition': 'checkout_fuchsia_no_hooks',
'dep_type': 'cipd',
},
'third_party/google_benchmark': {
'url': Var('chromium_url') + '/chromium/src/third_party/google_benchmark.git' + '@' + '992199c3cb1076d307816e963ed4b5102df53c65',
},
'third_party/google_benchmark/src': {
'url': Var('chromium_url') + '/external/github.com/google/benchmark.git' + '@' + 'b177433f3ee2513b1075140c723d73ab8901790f',
},

@ -28,6 +28,7 @@ if (v8_enable_google_benchmark) {
deps = [
"//:v8_libbase",
"//third_party/google_benchmark:benchmark_main",
"//third_party/google_benchmark:google_benchmark",
]
}
@ -41,6 +42,7 @@ if (v8_enable_google_benchmark) {
deps = [
"//:v8_libbase",
"//third_party/google_benchmark:benchmark_main",
"//third_party/google_benchmark:google_benchmark",
]
}
}

@ -1,90 +0,0 @@
# Copyright 2020 The V8 project authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import("//build/config/gclient_args.gni")
import("../../gni/v8.gni")
if (v8_enable_google_benchmark) {
config("benchmark_config") {
include_dirs = [ "src/include" ]
defines = [
# We always build google_benchmark statically.
"BENCHMARK_STATIC_DEFINE=1",
]
}
# TODO(crbug.com/1344570): Remove once third_party/google_benchmark no longer
# uses std::wstring_convert.
config("benchmark_suppress_warnings") {
cflags = [ "-Wno-deprecated-declarations" ]
}
source_set("google_benchmark") {
testonly = true
public = [
"src/include/benchmark/benchmark.h",
"src/include/benchmark/export.h",
]
sources = [
"src/src/arraysize.h",
"src/src/benchmark.cc",
"src/src/benchmark_api_internal.cc",
"src/src/benchmark_api_internal.h",
"src/src/benchmark_name.cc",
"src/src/benchmark_register.cc",
"src/src/benchmark_register.h",
"src/src/benchmark_runner.cc",
"src/src/benchmark_runner.h",
"src/src/check.cc",
"src/src/check.h",
"src/src/colorprint.cc",
"src/src/colorprint.h",
"src/src/commandlineflags.cc",
"src/src/commandlineflags.h",
"src/src/complexity.cc",
"src/src/complexity.h",
"src/src/console_reporter.cc",
"src/src/counter.cc",
"src/src/counter.h",
"src/src/csv_reporter.cc",
"src/src/cycleclock.h",
"src/src/internal_macros.h",
"src/src/json_reporter.cc",
"src/src/log.h",
"src/src/mutex.h",
"src/src/perf_counters.cc",
"src/src/perf_counters.h",
"src/src/re.h",
"src/src/reporter.cc",
"src/src/statistics.cc",
"src/src/statistics.h",
"src/src/string_util.cc",
"src/src/string_util.h",
"src/src/sysinfo.cc",
"src/src/thread_manager.h",
"src/src/thread_timer.h",
"src/src/timers.cc",
"src/src/timers.h",
]
all_dependent_configs = [ ":benchmark_config" ]
configs += [ ":benchmark_suppress_warnings" ]
defines = [
# Tell google_benchmark to always use standard regular expressions.
"HAVE_GNU_POSIX_REGEX=0",
"HAVE_POSIX_REGEX=0",
"HAVE_STD_REGEX=1",
]
}
source_set("benchmark_main") {
testonly = true
sources = [ "src/src/benchmark_main.cc" ]
public_deps = [ ":google_benchmark" ]
}
}

@ -1,3 +0,0 @@
file:../../INFRA_OWNERS
mlippautz@chromium.org

@ -1,22 +0,0 @@
Name: Google Benchmark
Short Name: benchmark
URL: https://github.com/google/benchmark
Version: unknown
License: Apache 2.0
License File: src/LICENSE
Security Critical: no
Shipped: no
Description:
A microbenchmark support library.
To include this library in the V8 checkout, add the following clause to
your .gclient configuration.
"custom_vars": {
"checkout_google_benchmark": True,
}
Local Additions:
* gn file for building in V8