onnx-mlir/third_party/onnx.BUILD

82 lines
1.7 KiB
Plaintext

package(default_visibility = ["//visibility:public"])
load("@rules_cc//cc:defs.bzl", "cc_library")
load("@rules_proto//proto:defs.bzl", "proto_library")
filegroup(
name = "all",
srcs = glob(["**"]),
)
# load("@org_tensorflow//tensorflow/core/platform:build_config.bzl", "tf_proto_library_cc")
# load("@protobuf_archive//:protobuf.bzl", "proto_gen")
# load("@//third_party:build_config.bzl", "tf_proto_library_cc")
# proto_gen(
# name = "onnx_proto_genproto",
# srcs = ["onnx/onnx.proto"],
# outs = ["onnx/onnx.pb.cc","onnx/onnx.pb.h"],
# gen_cc = 1,
# includes = [],
# plugin = None,
# plugin_language = "grpc",
# plugin_options = None,
# protoc = "@protobuf_archive//:protoc",
# visibility = ["//visibility:public"],
# # deps = [s + "_genproto" for s in deps],
# )
cc_proto_library(
name = "onnx_proto_cc",
deps = [":onnx_proto"],
)
proto_library(
name = "onnx_proto",
srcs = ["onnx/onnx.proto"],
)
cc_proto_library(
name = "onnx_operators_proto_cc",
deps = [":onnx_proto"],
)
proto_library(
name = "onnx_operators_proto",
srcs = ["onnx/onnx-operators.proto"],
)
# tf_proto_library_cc(
# name = "onnx_proto",
# srcs = ["onnx/onnx-operators.proto"],
# cc_api_version = 2,
# )
# tf_proto_library_cc(
# name = "onnx_operators_proto",
# srcs = ["onnx/onnx-operators.proto"],
# cc_api_version = 2,
# protodeps = [":onnx_proto"],
# )
cc_library(
name = "onnx",
srcs = glob([
"*.c",
"*.cc",
"common/**/*.c",
"common/**/*.cc",
]),
hdrs = glob([
"**/*.h",
"**/*.hpp",
]),
deps = [
# ":onnx_proto_genproto",
":onnx_operators_proto_cc",
":onnx_proto_cc",
],
)