| # Copyright 2016 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("//src/sys/build/components.gni") |
| |
| source_set("importer") { |
| sources = [ |
| "importer.cc", |
| "importer.h", |
| "reader.cc", |
| "reader.h", |
| "tags.cc", |
| "tags.h", |
| ] |
| |
| public_deps = [ |
| "//src/lib/fxl", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/zircon-internal", |
| "//zircon/public/lib/zx", |
| "//zircon/system/ulib/trace-engine", |
| ] |
| |
| # TODO(fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| executable("bin") { |
| output_name = "ktrace_provider" |
| |
| sources = [ |
| "app.cc", |
| "app.h", |
| "device_reader.cc", |
| "device_reader.h", |
| "log_importer.cc", |
| "log_importer.h", |
| "main.cc", |
| ] |
| |
| deps = [ |
| ":importer", |
| "//sdk/fidl/fuchsia.boot:fuchsia.boot_c", |
| "//sdk/fidl/fuchsia.tracing.kernel", |
| "//sdk/lib/fdio", |
| "//sdk/lib/sys/cpp", |
| "//src/lib/fxl", |
| "//zircon/public/lib/zircon-internal", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/trace", |
| "//zircon/system/ulib/trace-provider:trace-provider-with-fdio", |
| ] |
| |
| # TODO(fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| fuchsia_package_with_single_component("ktrace_provider") { |
| manifest = "meta/ktrace_provider.cmx" |
| deps = [ ":bin" ] |
| } |
| |
| executable("importer_test_app") { |
| testonly = true |
| output_name = "importer_tests" |
| |
| sources = [ |
| "importer_unittest.cc", |
| "test_reader.cc", |
| "test_reader.h", |
| ] |
| |
| deps = [ |
| ":importer", |
| "//src/lib/fxl", |
| "//src/lib/fxl/test:gtest_main", |
| "//third_party/googletest:gtest", |
| "//zircon/public/lib/fbl", |
| "//zircon/system/ulib/trace-engine", |
| "//zircon/system/ulib/trace-test-utils", |
| ] |
| |
| # TODO(fxbug.dev/58162): delete the below and fix compiler warnings |
| configs += [ "//build/config:Wno-conversion" ] |
| } |
| |
| fuchsia_unittest_package("ktrace_provider_tests") { |
| manifest = "meta/importer_tests.cmx" |
| deps = [ ":importer_test_app" ] |
| } |