blob: d77077ccd31b2a679bde61f76db2a8115d286b0d [file] [log] [blame]
# 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/config.gni")
import("//build/images/filesystem_limits.gni")
import("//build/rust/rustc_binary.gni")
# Define a Rust binary with optimizations used by the Archivist.
#
# This template should be used for the Archivist itself as well as any
# benchmarks building on top of the Archivist library.
#
# Has the same properties as rustc_binary.
template("archivist_optimized_binary") {
rustc_binary(target_name) {
forward_variables_from(invoker, "*", [ "configs" ])
if (defined(invoker.configs)) {
configs += invoker.configs
}
configs += [ "//build/config/rust:bootfs" ]
# Can't dynamically link libstd and libtest for ZBI binaries
configs += [ "//build/config/fuchsia:dynamic_rust_standard_library" ]
configs -= [ "//build/config/fuchsia:dynamic_rust_standard_library" ]
}
}