blob: bfd7d5d45f7c49b48688f40a66bf607ece3154b2 [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" ]
if (is_asan) {
# This is a known massive target.
# Remote build on a worker with more memory.
configs += [ "//build/config:big_rbe_machine" ]
}
configs += [ ":config" ]
}
config("config") {
# 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 = [ ":*" ]
}