blob: 0c4d522a67332e445884c3b4e835c0f026068194 [file] [log] [blame]
# Copyright 2023 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/rust/rustc_binary.gni")
rustc_binary("network_unified_binary") {
edition = "2021"
deps = [
"//src/connectivity/network/dhcpv4/client/bindings:dhcp_client_gub_lib",
"//src/connectivity/network/dhcpv4/server:bin_gub_lib",
"//src/connectivity/network/dhcpv6/client:dhcpv6_client_gub_lib",
"//src/connectivity/network/dns:bin_gub_lib",
"//src/connectivity/network/netstack-proxy:bin_gub_lib",
"//src/connectivity/network/netstack3:bin_gub_lib",
"//src/connectivity/network/stack-migration:bin_gub_lib",
"//src/connectivity/policy/http-client:http_client_gub_lib",
"//src/connectivity/policy/netcfg:bin-basic_gub_lib",
"//src/connectivity/policy/reachability:bin_gub_lib",
]
sources = [ "src/main.rs" ]
configs -= [ "//build/config/rust/lints:allow_unused_results" ]
# This is a known massive target.
# "racing" mode will make this more resilient to remote timeouts
# at the expense of using local resources, while still allowing
# warm-up of the remote cache.
configs += [ "//build/config/rust:rbe_strategy_racing" ]
configs += [ ":config" ]
}
config("config") {
if (!is_debug) {
# Add thinlto config if lto variants are not used.
if (!is_lto_variant) {
# Allow cross-crate optimization since each binary that is unified here is a
# different crate.
configs = [ "//build/config/lto:thinlto" ]
}
}
visibility = [ ":*" ]
}