| # Copyright 2020 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/config.gni") | |
| import("//src/sys/core/build/core_shard.gni") | |
| ############################################################################### | |
| # GROUPS | |
| ############################################################################### | |
| group("forensics") { | |
| testonly = true | |
| deps = [ | |
| ":pkg", | |
| ":tests", | |
| "crasher", | |
| "snapshot", | |
| ] | |
| } | |
| group("tests") { | |
| testonly = true | |
| deps = [ | |
| "crash_reports/tests", | |
| "exceptions/tests", | |
| "feedback:tests", | |
| "feedback_data/system_log_recorder/tests", | |
| "feedback_data/tests", | |
| "last_reboot/tests", | |
| "snapshot/tests", | |
| "utils/redact/tests", | |
| "utils/tests", | |
| ] | |
| } | |
| group("userdebug_configs") { | |
| deps = [ ":feedback_userdebug_config" ] | |
| } | |
| group("user_configs") { | |
| deps = [ ":feedback_user_config" ] | |
| } | |
| group("workstation_configs") { | |
| deps = [ ":feedback_workstation_product_config" ] | |
| } | |
| ############################################################################### | |
| # PACKAGES | |
| ############################################################################### | |
| fuchsia_package("pkg") { | |
| package_name = "forensics" | |
| deps = [ | |
| ":exceptions", | |
| ":feedback", | |
| ] | |
| } | |
| ############################################################################### | |
| # COMPONENTS | |
| ############################################################################### | |
| fuchsia_component("exceptions") { | |
| manifest = "exceptions/meta/exceptions.cml" | |
| deps = [ | |
| ":exception_handler_exe", | |
| ":exceptions_exe", | |
| ] | |
| } | |
| fuchsia_component("feedback") { | |
| manifest = "feedback/meta/feedback.cml" | |
| deps = [ | |
| ":feedback_data_config", | |
| ":feedback_default_build_type_config", | |
| ":feedback_default_product_config", | |
| ":feedback_exe", | |
| ":system_log_recorder_exe", | |
| ] | |
| } | |
| ############################################################################### | |
| # CORE SHARDS | |
| ############################################################################### | |
| core_shard("core_shard") { | |
| shard_file = "forensics.core_shard.cml" | |
| } | |
| ############################################################################### | |
| # EXECUTABLES | |
| ############################################################################### | |
| # We use a template to have multiple copies of the same binary named differently. | |
| template("forensics_unified_binary") { | |
| executable(target_name) { | |
| output_name = invoker.output_name | |
| sources = [ "unified_binary.cc" ] | |
| deps = [ | |
| "exceptions:main", | |
| "exceptions/handler:main", | |
| "feedback:main", | |
| "feedback_data/system_log_recorder:main", | |
| "//sdk/lib/syslog/cpp", | |
| ] | |
| } | |
| } | |
| forensics_unified_binary("exceptions_exe") { | |
| output_name = "exceptions" | |
| } | |
| forensics_unified_binary("exception_handler_exe") { | |
| output_name = "exception_handler" | |
| } | |
| forensics_unified_binary("feedback_exe") { | |
| output_name = "feedback" | |
| } | |
| forensics_unified_binary("system_log_recorder_exe") { | |
| output_name = "system_log_recorder" | |
| } | |
| ############################################################################### | |
| # CONFIGS | |
| ############################################################################### | |
| resource("feedback_default_product_config") { | |
| sources = [ "feedback/configs/product/default.json" ] | |
| outputs = [ "data/product/default_config.json" ] | |
| } | |
| config_data("feedback_workstation_product_config") { | |
| for_pkg = "forensics" | |
| sources = [ "feedback/configs/product/workstation.json" ] | |
| outputs = [ "product/override_config.json" ] | |
| } | |
| resource("feedback_data_config") { | |
| sources = [ "feedback_data/configs/default.json" ] | |
| outputs = [ "data/feedback_data/config.json" ] | |
| } | |
| resource("feedback_default_build_type_config") { | |
| sources = [ "feedback/configs/build_type/default.json" ] | |
| outputs = [ "data/build_type/default_config.json" ] | |
| } | |
| config_data("feedback_user_config") { | |
| for_pkg = "forensics" | |
| sources = [ "feedback/configs/build_type/user.json" ] | |
| outputs = [ "build_type/override_config.json" ] | |
| } | |
| config_data("feedback_userdebug_config") { | |
| for_pkg = "forensics" | |
| sources = [ "feedback/configs/build_type/userdebug.json" ] | |
| outputs = [ "build_type/override_config.json" ] | |
| } | |
| config_data("feedback_remote_device_id_provider") { | |
| for_pkg = "forensics" | |
| sources = [ "feedback/configs/remote_device_id_provider" ] | |
| outputs = [ "feedback/remote_device_id_provider" ] | |
| } | |
| config_data("exceptions_enable_jitd_on_startup") { | |
| for_pkg = "forensics" | |
| sources = [ "exceptions/configs/jitd_on_startup.json" ] | |
| outputs = [ "exceptions/enable_jitd_on_startup.json" ] | |
| } |