[C++, Go, Bazel]: Fix up Bazel support (#4672)

* Add Bazel support for Go library

* Make flatc compile again.

Was missing java_generator, which is now referenced from source.
This commit is contained in:
Andreas Bergmeier
2018-03-15 20:31:16 +01:00
committed by Wouter van Oortmerssen
parent 08cf50c54a
commit c0a6e5120d
2 changed files with 19 additions and 0 deletions

2
BUILD
View File

@@ -81,6 +81,8 @@ cc_binary(
"grpc/src/compiler/cpp_generator.h",
"grpc/src/compiler/go_generator.cc",
"grpc/src/compiler/go_generator.h",
"grpc/src/compiler/java_generator.cc",
"grpc/src/compiler/java_generator.h",
"grpc/src/compiler/schema_interface.h",
"src/flatc_main.cpp",
"src/idl_gen_cpp.cpp",

17
go/BUILD.bazel Normal file
View File

@@ -0,0 +1,17 @@
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go",
srcs = [
"builder.go",
"doc.go",
"encode.go",
"grpc.go",
"lib.go",
"sizes.go",
"struct.go",
"table.go",
],
importpath = "github.com/google/flatbuffers/go",
visibility = ["//visibility:public"],
)