blob: ed6b85395838ea8f010531ec0b81269c75ed4911 [file] [log] [blame]
# Copyright 2024 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/bazel/bazel_inputs.gni")
import("//build/compiled_action.gni")
import("//build/rust/rustc_binary.gni")
# the binary expects a single arg which is the path of the output file
rustc_binary("generate_format_costs_intel") {
edition = "2021"
configs -= [ "//build/config/rust/lints:allow_unused_results" ]
sources = [ "src/main.rs" ]
deps = [
"//sdk/fidl/fuchsia.images2:fuchsia.images2_rust",
"//sdk/fidl/fuchsia.sysmem2:fuchsia.sysmem2_rust",
"//src/lib/fidl/rust/fidl",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:argh",
"//third_party/rust_crates:camino",
]
visibility = [ ":*" ]
}
# these format_costs are not strictly required to be included via assembly tool,
# but the sysmem tests rely on these or similar format costs for the tests to
# pass
compiled_action("intel") {
tool = ":generate_format_costs_intel"
_output = "${target_out_dir}/${target_name}.format_costs_persistent_fidl"
args = [
"--output",
rebase_path(_output, root_build_dir),
]
outputs = [ _output ]
}
bazel_input_file("format_costs") {
generator = ":intel"
}