blob: 2f96271b48193f862a5ebfb49e68d4f88389a56e [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")
import("//build/host.gni")
import("//build/testing/host_test_data.gni")
go_library("gopkg") {
name = "go.fuchsia.dev/fuchsia/tools/fidl/fidlgen_llcpp/..."
deps = [
"//garnet/go/src/fidl/compiler/backend/cpp",
"//garnet/go/src/fidl/compiler/backend/types",
]
}
go_binary("fidlgen_llcpp") {
gopackage = "go.fuchsia.dev/fuchsia/tools/fidl/fidlgen_llcpp"
deps = [ ":gopkg" ]
}
install_host_tools("host") {
deps = [ ":fidlgen_llcpp" ]
outputs = [ "fidlgen_llcpp" ]
}
if (is_host) {
go_test("fidlgen_llcpp_test") {
gopackages = [ "go.fuchsia.dev/fuchsia/tools/fidl/fidlgen_llcpp/codegen" ]
args = [
"--test_data_dir",
rebase_path("$root_out_dir/test_data/fidlgen", root_build_dir),
"--clang-format",
rebase_path("$root_out_dir/test_data/fidlgen_llcpp", root_build_dir),
]
deps = [
":gopkg",
"//garnet/go/src/fidl/compiler/backend/typestest",
]
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_llcpp/{{source_file_part}}" ]
}
}