v8/test/benchmarks/cpp/cppgc/BUILD.gn
Omer Katz 0e0d1b0d7c cppgc: Fix cppgc build
The CPPGC_BUILD_IN_V8 define (used for tracing) isn't propagated from
v8_base_without_compiler to cppgc_base, which breaks build with
perfetto. Instead use a gn args to specify standalone builds (defaulted
to false) and use that to choose the right tracing implementation.

Bug: chromium:1056170
Change-Id: I70bce819d45fb133b6f932a50a5d027e39f3e5b9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2555007
Auto-Submit: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#71356}
2020-11-24 09:35:50 +00:00

62 lines
1.5 KiB
Plaintext

# 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("../../../../gni/v8.gni")
group("gn_all") {
testonly = true
deps = []
if (v8_enable_google_benchmark) {
deps += [ ":cppgc_basic_benchmarks" ]
}
}
if (v8_enable_google_benchmark) {
v8_source_set("cppgc_benchmark_support") {
testonly = true
configs = [
"../../../..:external_config",
"../../../..:internal_config_base",
"../../../..:cppgc_base_config",
]
sources = [
"../../../../test/unittests/heap/cppgc/test-platform.cc",
"../../../../test/unittests/heap/cppgc/test-platform.h",
"utils.h",
]
deps = [ "//third_party/google_benchmark:benchmark_main" ]
if (cppgc_is_standalone) {
deps += [ "../../../..:cppgc_for_testing" ]
} else {
deps += [ "../../../..:v8_for_testing" ]
}
}
v8_executable("cppgc_basic_benchmarks") {
testonly = true
configs = [
"../../../..:external_config",
"../../../..:internal_config_base",
"../../../..:cppgc_base_config",
]
sources = [
"allocation_perf.cc",
"trace_perf.cc",
]
deps = [
":cppgc_benchmark_support",
"//third_party/google_benchmark:benchmark_main",
]
if (cppgc_is_standalone) {
deps += [ "../../../..:cppgc_for_testing" ]
} else {
deps += [ "../../../..:v8_for_testing" ]
}
}
}