| # 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") | |
| import("//src/developer/ffx/config.gni") | |
| assert(is_host, "ffx_isolate is for use with the host toolchain only") | |
| # We pass the paths to the host tools and test data directories into the rust | |
| # build as environment variables so that for unit-test situations, they can | |
| # be used to find tools from the build root. | |
| _subtool_search_test_data = | |
| rebase_path(ffx_test_host_tools_out_dir, root_build_dir) | |
| _subtool_search_host_tools = rebase_path(host_tools_dir, root_build_dir) | |
| group("isolate") { | |
| testonly = true | |
| deps = [ ":lib" ] | |
| } | |
| ## BAZEL2GN SENTINEL - DO NOT EDIT BELOW THIS LINE ## | |
| # | |
| # ________ _________ ________ ________ | |
| # |\ ____\|\___ ___\\ __ \|\ __ \ | |
| # \ \ \___|\|___ \ \_\ \ \|\ \ \ \|\ \ | |
| # \ \_____ \ \ \ \ \ \ \\\ \ \ ____\ | |
| # \|____|\ \ \ \ \ \ \ \\\ \ \ \___| | |
| # ____\_\ \ \ \__\ \ \_______\ \__\ | |
| # |\_________\ \|__| \|_______|\|__| | |
| # \|_________| | |
| # | |
| # | |
| # AUTO-GENERATED - DO NOT EDIT | |
| # | |
| # The targets below are auto-generated based on the targets defined in the | |
| # BUILD.bazel file from the same directory. If you made changes to targets in | |
| # Bazel, instead of editing this file manually, run: | |
| # | |
| # > fx bazel2gn | |
| # | |
| # Please do NOT edit this file directly. Instead, edit the BUILD.bazel file and | |
| # rerun bazel2gn. | |
| import("//build/tools/bazel2gn/bazel_migration.gni") | |
| if (is_host) { | |
| rustc_library("lib") { | |
| sources = [ "src/lib.rs" ] | |
| crate_name = "ffx_isolate" | |
| edition = "2024" | |
| rustenv = [ | |
| "SUBTOOL_SEARCH_HOST_TOOLS=${_subtool_search_host_tools}", | |
| "SUBTOOL_SEARCH_TEST_DATA=${_subtool_search_test_data}", | |
| ] | |
| test_deps = [ "//src/lib/fuchsia" ] | |
| version = "0.1.0" | |
| visibility = [ | |
| ":*", | |
| "//src/developer/ffx/*", | |
| ] | |
| with_unit_tests = true | |
| deps = [ | |
| "//src/developer/ffx/config:lib", | |
| "//src/developer/ffx/lib/executor:lib", | |
| "//src/developer/ffx/lib/sdk:lib", | |
| "//third_party/rust_crates:serde", | |
| "//third_party/rust_crates:serde_json", | |
| "//third_party/rust_crates:tempfile", | |
| "//third_party/rust_crates:thiserror", | |
| ] | |
| } | |
| } |