blob: 792b232f115fdd48ebb3fe9881dd0e4d635c0a46 [file] [log] [blame]
# Copyright 2024 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.
load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
load("@platforms//host:constraints.bzl", "HOST_CONSTRAINTS")
package(default_visibility = ["//visibility:public"])
go_library(
name = "fidlgen",
srcs = [
"formatter.go",
"generator.go",
"identifiers.go",
"names.go",
"reserved_names.go",
"strings.go",
"struct.go",
"templates.go",
"types.go",
"write_file_if_changed.go",
],
importpath = "go.fuchsia.dev/fuchsia/tools/fidl/lib/fidlgen",
target_compatible_with = HOST_CONSTRAINTS,
)
go_test(
name = "fidlgen_lib_test",
srcs = [
"identifiers_test.go",
"names_test.go",
"strings_test.go",
"struct_test.go",
"types_test.go",
],
embed = [
":fidlgen",
],
target_compatible_with = HOST_CONSTRAINTS,
deps = [
"//third_party/golibs:github.com/google/go-cmp/cmp",
"//third_party/golibs:github.com/google/go-cmp/cmp/cmpopts",
],
)