| # 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: TODO(b/287779902) | |
| ffx_build_dual_mode_plugins_as_subtools = true | |
| } | |
| # The path within the build where test host tools live | |
| ffx_test_host_tools_out_dir = "${host_tools_dir}" | |
| # LINT.IfChange | |
| # 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/developer/ffx/plugins/component:ffx_component", | |
| "//src/developer/ffx/plugins/debug:ffx_debug_plugin", | |
| "//src/developer/ffx/plugins/emulator:ffx_emulator", | |
| "//src/developer/ffx/plugins/repository:ffx_repository", | |
| "//src/developer/ffx/plugins/product_bundle:ffx_product_bundle", | |
| ] | |
| # 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/product/data/config.json", | |
| "//src/developer/ffx/plugins/repository/data/config.json", | |
| ] | |
| # LINT.ThenChange(//src/developer/ffx/BUILD.bazel) | |
| # 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" ] | |
| } |