| # Copyright 2022 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/host.gni") |
| |
| declare_args() { |
| # Build any ffx plugins that can be built either as built-in or as separate |
| # subtools as subtools. |
| # |
| # Note that if you change this and don't `fx clean` you may wind up with stale |
| # copies of either the main `ffx` binary (with all the plugins built in) or |
| # the separately compiled ones, and that might produce confusing `ffx help` |
| # or `ffx commands` output. |
| # |
| # When all subtools that will be migrated to the SDK have been migrated, |
| # this config flag will be set to true by default, deprecated, and eventually |
| # removed: fxb/117339 |
| ffx_build_dual_mode_plugins_as_subtools = false |
| } |
| |
| # The path within the build where test host tools live |
| ffx_test_host_tools_out_dir = "${host_tools_dir}" |
| |
| # The list of ffx plugins that we'd expect to be included directly in the binary |
| # for architectural reasons. |
| required_ffx_plugins = [ |
| "//src/developer/ffx/plugins/config:ffx_config_plugin", |
| "//src/developer/ffx/plugins/daemon:ffx_daemon_plugin", |
| "//src/developer/ffx/plugins/schema:ffx_schema", |
| "//src/developer/ffx/plugins/target:ffx_target", |
| "//src/developer/ffx/plugins/version:ffx_version", |
| ] |
| |
| # The list of ffx plugins that we currently build as part of the 'main' ffx |
| # binary but that don't really have to be there. These should all be migrated |
| # to being "dual mode" subtools. |
| included_ffx_plugins = [ |
| "//src/connectivity/network/net-cli/ffx:ffx_net", |
| "//src/developer/ffx/plugins/cts:ffx_cts", |
| "//src/developer/ffx/plugins/debug:ffx_debug_plugin", |
| "//src/developer/ffx/plugins/doctor:ffx_doctor", |
| "//src/developer/ffx/plugins/test:ffx_test", |
| ] |
| |
| # The list of plugins that can be built either as plugins or subtools, |
| # used in the main ffx target if `ffx_build_dual_mode_plugns_as_subtools` |
| # is false, and in tools/BUILD.gn if it's true (with the suffix of |
| # `_tool_host_tool` appended) |
| dual_mode_plugins = [ |
| "//src/connectivity/network/testing/network-test-realm/ffx:ffx_net_test_realm", |
| "//src/developer/ffx/plugins/agis:ffx_agis", |
| "//src/developer/ffx/plugins/assembly:ffx_assembly", |
| "//src/developer/ffx/plugins/audio:ffx_audio", |
| "//src/developer/ffx/plugins/component:ffx_component", |
| "//src/developer/ffx/plugins/coverage:ffx_coverage", |
| "//src/developer/ffx/plugins/driver:ffx_driver", |
| "//src/developer/ffx/plugins/efi:ffx_efi", |
| "//src/developer/ffx/plugins/emulator:ffx_emulator", |
| "//src/developer/ffx/plugins/flutter:ffx_flutter", |
| "//src/developer/ffx/plugins/input:ffx_input", |
| "//src/developer/ffx/plugins/fuzz:ffx_fuzz", |
| "//src/developer/ffx/plugins/inspect:ffx_inspect", |
| "//src/developer/ffx/plugins/log:ffx_log", |
| "//src/developer/ffx/plugins/overnet:ffx_overnet_plugin", |
| "//src/developer/ffx/plugins/package:ffx_package", |
| "//src/developer/ffx/plugins/platform:ffx_platform", |
| "//src/developer/ffx/plugins/power:ffx_power", |
| "//src/developer/ffx/plugins/process_explorer:ffx_process_explorer", |
| "//src/developer/ffx/plugins/product:ffx_product", |
| "//src/developer/ffx/plugins/product_bundle:ffx_product_bundle", |
| "//src/developer/ffx/plugins/profile:ffx_profile", |
| "//src/developer/ffx/plugins/repository:ffx_repository", |
| "//src/developer/ffx/plugins/scrutiny:ffx_scrutiny", |
| "//src/developer/ffx/plugins/sdk:ffx_sdk", |
| "//src/developer/ffx/plugins/self-test:ffx_selftest", |
| "//src/developer/ffx/plugins/session:ffx_session", |
| "//src/developer/ffx/plugins/setui:ffx_setui", |
| "//src/developer/ffx/plugins/sl4f:ffx_sl4f_plugin", |
| "//src/developer/ffx/plugins/trace:ffx_trace", |
| "//src/developer/ffx/plugins/profiler:ffx_profiler", |
| "//src/developer/ffx/plugins/triage:ffx_triage", |
| "//src/developer/ffx/plugins/wlan:ffx_wlan", |
| "//src/storage/ffx:ffx_storage", |
| "//src/virtualization/ffx:ffx_guest", |
| ] |
| |
| # The full set of plugins you'd expect in a 'large', fully integrated ffx |
| all_ffx_plugins = required_ffx_plugins + dual_mode_plugins |
| |
| # Config default files from tools listed above so they can be included in |
| # the build. |
| dual_mode_defaults = [ |
| "//src/developer/ffx/plugins/emulator/data/config.json", |
| "//src/developer/ffx/plugins/log/data/config.json", |
| "//src/developer/ffx/plugins/product/data/config.json", |
| "//src/developer/ffx/plugins/repository/data/config.json", |
| "//src/developer/ffx/plugins/sdk/data/config.json", |
| "//src/developer/ffx/plugins/trace/data/config.json", |
| ] |
| |
| # The same list as `dual_mode_plugins`, but with the normal suffix for plugins converted to |
| # subtools. |
| dual_mode_subtools = [] |
| dual_mode_subtool_bins = [] |
| dual_mode_subtool_tests = [] |
| dual_mode_subtool_test_data = [] |
| |
| foreach(plugin, dual_mode_plugins) { |
| dual_mode_subtools += [ plugin + "_tool_host_tool" ] |
| dual_mode_subtool_bins += [ plugin + "_tool_versioned" ] |
| dual_mode_subtool_tests += [ plugin + "_tests" ] |
| dual_mode_subtool_test_data += [ plugin + "_tool_test_data" ] |
| } |