blob: 69dc115a4a95cea99f6ed321841fc7bbc467de92 [file] [log] [blame]
# Copyright 2019 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("$zx/public/gn/config/standard.gni")
import("$zx/public/gn/toolchain/environment_redirect.gni")
# Build the native host tools intended for developer use.
environment_redirect("tools-${host_os}-${host_cpu}") {
testonly = true
environment_label = "$zx/public/gn/toolchain:host"
cpu = host_cpu
os = host_os
deps = [
"$zx/system/host:tools",
]
}
if (current_toolchain == default_toolchain) {
# Install the host developer tools for the running host platform in the
# "$root_build_dir/tools/" directory.
tools_rspfile = "$target_gen_dir/tools.rsp"
generated_file("tools._rsp") {
testonly = true
visibility = [ ":tools" ]
outputs = [
tools_rspfile,
]
deps = [
":tools-${host_os}-${host_cpu}",
]
output_conversion = "list lines"
data_keys = [ "tool_executables" ]
}
action("tools") {
testonly = true
deps = [
":tools._rsp",
]
script = "$zx/scripts/copy-files"
depfile = "$target_out_dir/$target_name.d"
outputs = [
depfile,
]
sources = [
tools_rspfile,
]
args = [
"tools",
rebase_path(depfile, root_build_dir),
rebase_path(tools_rspfile, root_build_dir),
]
}
}
group("default") {
testonly = true
deps = [
":tools",
]
}