blob: e43e021979fde060ec94f2935b7c05236736be0a [file] [log] [blame]
# Copyright 2018 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")
import("//build/host.gni")
import("//build/testing/host_test_data.gni")
go_library("fidl_lib") {
name = "fidl"
deps = [ "//third_party/golibs:github.com/google/go-cmp" ]
}
go_binary("fidlgen_llcpp") {
gopackage = "fidl/compiler/llcpp_backend"
sdk_category = "partner"
deps = [ ":fidl_lib" ]
}
install_host_tools("fidl") {
deps = [ ":fidlgen_llcpp" ]
outputs = [ "fidlgen_llcpp" ]
}
if (is_host) {
go_library("fidlgen_test_lib") {
testonly = true
deps = [ ":fidl_lib" ]
non_go_deps = [ "compiler/backend/goldens" ]
}
go_test("fidlgen_llcpp_test") {
gopackages = [ "fidl/compiler/llcpp_backend/codegen" ]
deps = [ ":fidlgen_test_lib" ]
non_go_deps = [ ":clang_format" ]
}
host_test_data("clang_format") {
sources = [ "//prebuilt/third_party/clang/$host_platform/bin/clang-format" ]
outputs = [ "$root_out_dir/test_data/fidlgen/clang-format" ]
}
go_test("fidlgen_common_test") {
gopackages = [ "fidl/compiler/backend/common" ]
deps = [ ":fidlgen_test_lib" ]
}
go_test("fidlgen_types_test") {
gopackages = [ "fidl/compiler/backend/types" ]
deps = [ ":fidlgen_test_lib" ]
}
}