blob: 3b686ac15a775f6e8d96c38e47bba34dd839b033 [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("//build/go/go_binary.gni")
import("//build/go/go_library.gni")
import("//build/go/go_test.gni")
go_library("codecoverage_api") {
source_dir = "api/third_party/codecoverage"
sources = [ "code_coverage.pb.go" ]
deps = [ "//third_party/golibs:google.golang.org/protobuf" ]
non_go_deps = [ "api/third_party/codecoverage:proto" ]
}
go_library("llvm_api") {
source_dir = "api/llvm"
sources = [
"doc.go",
"llvm.go",
]
}
go_library("covargs_lib") {
sources = [
"report.go",
"report_test.go",
]
deps = [
":codecoverage_api",
":llvm_api",
"//third_party/golibs:golang.org/x/sync",
"//third_party/golibs:google.golang.org/protobuf",
"//tools/debug/symbolize:symbolize_lib",
"//tools/lib/logger",
"//tools/testing/runtests",
]
}
go_library("main") {
source_dir = "cmd"
sources = [
"main.go",
"main_test.go",
]
deps = [
":covargs_lib",
"//tools/lib/cache",
"//tools/lib/color",
"//tools/lib/flagmisc",
]
}
go_binary("covargs") {
library = ":main"
cgo = false
}
go_test("covargs_lib_tests") {
library = ":covargs_lib"
}
go_test("covargs_tests") {
library = ":main"
}
group("tests") {
testonly = true
deps = [
":covargs_lib_tests($host_toolchain)",
":covargs_tests($host_toolchain)",
]
}