| # Copyright 2021 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/sdk/sdk_atom.gni") | |
| import("//src/developer/ffx/build/ffx_tool.gni") | |
| assert(is_host, "bazel_ffx_tool() can only be called in a host toolchain.") | |
| # LINT.IfChange | |
| bazel_ffx_tool("ffx_assembly_tool") { | |
| output_name = "ffx-assembly" | |
| sdk_category = "partner" | |
| } | |
| # LINT.ThenChange(BUILD.bazel) | |
| group("assembly") { | |
| public_deps = [ ":ffx_assembly_tool_host_tool" ] | |
| } | |
| group("bin") { | |
| public_deps = [ ":ffx_assembly_tool_versioned" ] | |
| } | |
| # TODO(https://fxbug.dev/438572714): Remove once the IDK uses the Bazel atom. | |
| _idk_path = "tools/$current_cpu/ffx_tools/ffx-assembly" | |
| sdk_atom("sdk") { | |
| category = "partner" | |
| sdk_area = "Developer" | |
| id = "sdk://$_idk_path" | |
| idk_name = "ffx-assembly" | |
| meta = { | |
| dest = "$_idk_path-meta.json" | |
| type = "ffx_tool" | |
| source_prebuild_info = { | |
| arch = current_cpu | |
| file_base = "tools" | |
| } | |
| } | |
| files = [ | |
| { | |
| source = "$root_out_dir/ffx-assembly" | |
| dest = _idk_path | |
| }, | |
| { | |
| source = "$root_out_dir/ffx-assembly.json" | |
| dest = "$_idk_path.json" | |
| }, | |
| ] | |
| non_sdk_deps = [ ":ffx_assembly_tool_versioned" ] | |
| } |