Always check out google_benchmark, part 3.

Add a WebRTC-specific arg that can be used to control use of targets
that rely on //third_party/google_benchmarks, so the .gni in that
directory can eventually be removed.

Bug: chromium:1404759
Change-Id: I2a9422fae119ca13eb50028d962fc0a671b5fb33
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/297460
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Cr-Commit-Position: refs/heads/main@{#39553}
This commit is contained in:
Peter Kasting 2023-03-13 16:01:00 -07:00 committed by WebRTC LUCI CQ
parent 9a5de95af9
commit 1e6d77c29a
6 changed files with 266 additions and 264 deletions

View File

@ -628,7 +628,7 @@ if (rtc_include_tests && !build_with_chromium) {
}
}
if (enable_google_benchmarks) {
if (enable_google_benchmarks && rtc_enable_google_benchmarks) {
rtc_test("benchmarks") {
testonly = true
deps = [

View File

@ -13,9 +13,6 @@ enable_java_templates = true
# only needed to support both WebRTC standalone and Chromium builds.
build_with_chromium = false
# WebRTC checks out google_benchmark by default since it is always used.
checkout_google_benchmark = true
# Use our own suppressions files.
asan_suppressions_file = "//build/sanitizers/asan_suppressions.cc"
lsan_suppressions_file = "//tools_webrtc/sanitizers/lsan_suppressions_webrtc.cc"

View File

@ -2041,7 +2041,7 @@ if (rtc_include_tests) {
"synchronization:mutex",
"third_party/sigslot",
]
if (enable_google_benchmarks) {
if (enable_google_benchmarks && rtc_enable_google_benchmarks) {
deps += [ "synchronization:synchronization_unittests" ]
}
if (is_win) {

View File

@ -73,8 +73,8 @@ rtc_library("yield_policy") {
]
}
if (rtc_include_tests) {
if (enable_google_benchmarks) {
if (rtc_include_tests && enable_google_benchmarks &&
rtc_enable_google_benchmarks) {
rtc_library("synchronization_unittests") {
testonly = true
sources = [
@ -104,5 +104,4 @@ if (rtc_include_tests) {
"//third_party/google_benchmark",
]
}
}
}

View File

@ -494,16 +494,17 @@ rtc_library("video_test_support") {
}
}
if (rtc_include_tests && enable_google_benchmarks) {
if (rtc_include_tests) {
if (enable_google_benchmarks && rtc_enable_google_benchmarks) {
rtc_library("benchmark_main") {
testonly = true
sources = [ "benchmark_main.cc" ]
deps = [ "//third_party/google_benchmark" ]
}
}
}
if (rtc_include_tests && !build_with_chromium) {
if (!build_with_chromium) {
rtc_library("resources_dir_flag") {
testonly = true
visibility = [ "*" ]
@ -736,6 +737,7 @@ if (rtc_include_tests && !build_with_chromium) {
deps += [ "../modules/video_capture:video_capture_internal_impl" ]
}
}
}
}
if (is_ios) {

View File

@ -54,6 +54,10 @@ declare_args() {
# This is useful for example to be able to get RTC_DLOGs on a release build.
rtc_dlog_always_on = false
# Enables additional build targets that rely on
# //third_party/google_benchmarks.
rtc_enable_google_benchmarks = true
# Setting this to true will make RTC_OBJC_EXPORT expand to code that will
# manage symbols visibility. By default, Obj-C/Obj-C++ symbols are exported
# if C++ symbols are but setting this arg to true while keeping