| # Copyright 2019 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/cpp/sdk_executable.gni") |
| import("//build/host.gni") |
| import("//build/package.gni") |
| |
| package("bugreport") { |
| binaries = [ |
| { |
| name = "bugreport" |
| shell = true |
| }, |
| ] |
| |
| meta = [ |
| { |
| path = "meta/bugreport.cmx" |
| dest = "bugreport.cmx" |
| }, |
| ] |
| |
| deps = [ |
| ":main", |
| ] |
| } |
| |
| executable("main") { |
| output_name = "bugreport" |
| |
| sources = [ |
| "main.cc", |
| ] |
| |
| deps = [ |
| ":command_line_options", |
| ":src", |
| "//sdk/lib/sys/cpp", |
| ] |
| } |
| |
| source_set("bug_report_schema") { |
| sources = [ |
| "bug_report_schema.h", |
| ] |
| } |
| |
| source_set("command_line_options") { |
| sources = [ |
| "command_line_options.cc", |
| "command_line_options.h", |
| ] |
| |
| deps = [ |
| "//src/lib/fxl", |
| ] |
| } |
| |
| source_set("src") { |
| sources = [ |
| "bug_reporter.cc", |
| "bug_reporter.h", |
| ] |
| |
| public_deps = [ |
| "//sdk/lib/sys/cpp", |
| ] |
| |
| deps = [ |
| ":bug_report_schema", |
| "//garnet/public/lib/fsl", |
| "//sdk/fidl/fuchsia.feedback", |
| "//third_party/rapidjson", |
| "//zircon/public/lib/zx", |
| ] |
| } |
| |
| # Host side client ------------------------------------------------------------- |
| |
| if (current_toolchain == host_toolchain) { |
| source_set("client_lib") { |
| sources = [ |
| "client/bug_report_handler.cc", |
| "client/bug_report_handler.h", |
| ] |
| |
| deps = [ |
| "//src/lib/fxl", |
| "//third_party/rapidjson", |
| ] |
| } |
| |
| sdk_executable("client") { |
| category = "partner" |
| |
| output_name = "bugreport" |
| |
| sources = [ |
| "client/main.cc", |
| ] |
| |
| deps = [ |
| ":client_lib", |
| "//src/lib/fxl", |
| ] |
| } |
| } |
| |
| install_host_tools("host_tool") { |
| deps = [ |
| ":client", |
| ] |
| |
| outputs = [ |
| "bugreport", |
| ] |
| } |