blob: a5ea24607798f9fb287469eb3da77435a90f439d [file] [log] [blame]
# Copyright 2020 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/go/go_binary.gni")
import("//build/go/go_library.gni")
import("//build/go/go_test.gni")
go_library("fvd_lib") {
sources = [
"main.go",
"main_test.go",
]
deps = [
"//third_party/golibs:github.com/golang/protobuf",
"//third_party/golibs:github.com/google/go-cmp",
"//third_party/golibs:google.golang.org/protobuf",
"//tools/virtual_device/proto",
]
}
go_test("fvd_test") {
output_name = "fvd_test"
gopackages = [ "go.fuchsia.dev/fuchsia/tools/virtual_device/cmd/fvd" ]
deps = [ ":fvd_lib" ]
}
group("tests") {
testonly = true
deps = [ ":fvd_test" ]
}
go_binary("fvd") {
gopackage = "go.fuchsia.dev/fuchsia/tools/virtual_device/cmd/fvd"
deps = [ ":fvd_lib" ]
}
# Generates $root_build_dir/default.fvd.
action("default") {
script = "$host_out_dir/fvd"
outputs = [ "$root_build_dir/default.fvd" ]
args = [
# images.json is built before this target even though it is not a dep.
"--images_json",
rebase_path("$root_build_dir/images.json", root_build_dir),
"--output",
rebase_path(outputs[0], root_build_dir),
"--name",
"default",
]
deps = [ ":fvd($host_toolchain)" ]
}