blob: 8e0881a75df7860dc3cfee3c45716d4d8e53e4c9 [file] [log] [blame] [edit]
# Copyright 2023 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.
import("//build/components.gni")
import("//build/rust/rustc_library.gni")
import("//tools/protobuf/rust_proto_library.gni")
# TODO(https://fxbug.dev/42075035): Create our own copy of the protobuf file and avoid depending on perfetto.
rust_proto_library("pprof_proto") {
sources = [ "//third_party/perfetto/protos/third_party/pprof/profile.proto" ]
packages = [ "perfetto.third_party.perftools.profiles" ]
include_dirs = [ "//third_party/protobuf/src" ]
}
rustc_library("pprof") {
edition = "2021"
with_unit_tests = true
deps = [
":pprof_proto",
"//src/performance/memory/index_table_builder",
"//third_party/rust_crates:hex",
"//third_party/rust_crates:thiserror",
]
test_deps = [ "//third_party/rust_crates:itertools" ]
sources = [
"src/lib.rs",
"src/module_map.rs",
"src/string_table.rs",
]
}
fuchsia_unittest_package("pprof_tests") {
deps = [ ":pprof_test" ]
}
group("tests") {
testonly = true
public_deps = [ ":pprof_tests" ]
}