aboutsummaryrefslogtreecommitdiff
path: root/src/base/BUILD.gn
diff options
context:
space:
mode:
Diffstat (limited to 'src/base/BUILD.gn')
-rw-r--r--src/base/BUILD.gn38
1 files changed, 37 insertions, 1 deletions
diff --git a/src/base/BUILD.gn b/src/base/BUILD.gn
index f761a5348..47748464b 100644
--- a/src/base/BUILD.gn
+++ b/src/base/BUILD.gn
@@ -31,10 +31,14 @@ perfetto_component("base") {
"../../include/perfetto/ext/base",
]
sources = [
+ "android_utils.cc",
+ "base64.cc",
+ "crash_keys.cc",
"ctrl_c_handler.cc",
"event_fd.cc",
"file_utils.cc",
"getopt_compat.cc",
+ "log_ring_buffer.h",
"logging.cc",
"metatrace.cc",
"paged_memory.cc",
@@ -128,6 +132,8 @@ source_set("test_support") {
"../../gn:default_deps",
]
sources = [
+ "test/tmp_dir_tree.cc",
+ "test/tmp_dir_tree.h",
"test/utils.cc",
"test/utils.h",
"test/vm_test_utils.cc",
@@ -153,8 +159,14 @@ perfetto_unittest_source_set("unittests") {
"../../gn:gtest_and_gmock",
]
+ if (enable_perfetto_ipc) {
+ deps += [ "http:unittests" ]
+ }
+
sources = [
+ "base64_unittest.cc",
"circular_queue_unittest.cc",
+ "flat_hash_map_unittest.cc",
"flat_set_unittest.cc",
"getopt_compat_unittest.cc",
"logging_unittest.cc",
@@ -163,6 +175,7 @@ perfetto_unittest_source_set("unittests") {
"paged_memory_unittest.cc",
"periodic_task_unittest.cc",
"scoped_file_unittest.cc",
+ "small_vector_unittest.cc",
"string_splitter_unittest.cc",
"string_utils_unittest.cc",
"string_view_unittest.cc",
@@ -189,6 +202,9 @@ perfetto_unittest_source_set("unittests") {
"watchdog_posix_unittest.cc",
]
}
+ if (is_fuchsia) {
+ deps += [ "//third_party/fuchsia-sdk/sdk/pkg/fdio" ]
+ }
if (perfetto_build_standalone || perfetto_build_with_android) {
# This causes some problems on the chromium waterfall.
if (is_linux || is_android) {
@@ -200,13 +216,33 @@ perfetto_unittest_source_set("unittests") {
}
if (enable_perfetto_benchmarks) {
+ declare_args() {
+ perfetto_benchmark_3p_libs_prefix = ""
+ }
source_set("benchmarks") {
+ # If you intend to reproduce the comparison with {Absl, Folly, Tessil}
+ # you need to manually install those libraries and then set the GN arg
+ # perfetto_benchmark_3p_libs_prefix = "/usr/local"
testonly = true
deps = [
":base",
"../../gn:benchmark",
"../../gn:default_deps",
]
- sources = [ "flat_set_benchmark.cc" ]
+ if (perfetto_benchmark_3p_libs_prefix != "") {
+ configs -= [ "//gn/standalone:c++11" ]
+ configs += [ "//gn/standalone:c++17" ]
+ defines = [ "PERFETTO_HASH_MAP_COMPARE_THIRD_PARTY_LIBS" ]
+ cflags = [ "-isystem${perfetto_benchmark_3p_libs_prefix}/include" ]
+ libs = [
+ "${perfetto_benchmark_3p_libs_prefix}/lib/libfolly.a",
+ "${perfetto_benchmark_3p_libs_prefix}/lib/libabsl_raw_hash_set.a",
+ "${perfetto_benchmark_3p_libs_prefix}/lib/libabsl_hash.a",
+ ]
+ }
+ sources = [
+ "flat_hash_map_benchmark.cc",
+ "flat_set_benchmark.cc",
+ ]
}
}