diff --git a/tensorflow/cc/BUILD b/tensorflow/cc/BUILD index 26362ffdc6e..0dfacecbad2 100644 --- a/tensorflow/cc/BUILD +++ b/tensorflow/cc/BUILD @@ -317,6 +317,15 @@ tf_gen_op_wrappers_cc( pkg = "//tensorflow/core", ) +tf_gen_op_wrappers_cc( + name = "function_ops", + op_lib_names = [ + "function_ops", + ], + pkg = "//tensorflow/core", + visibility = ["//tensorflow:internal"], +) + cc_library( name = "cc_op_gen_main", srcs = [ diff --git a/tensorflow/tensorflow.bzl b/tensorflow/tensorflow.bzl index 70fb6455c85..4a13cd87547 100644 --- a/tensorflow/tensorflow.bzl +++ b/tensorflow/tensorflow.bzl @@ -185,7 +185,7 @@ def tf_gen_op_wrapper_cc(name, out_ops_file, pkg="", ) # Run the op generator. - if name == "sendrecv_ops": + if name == "sendrecv_ops" or name == "function_ops": include_internal = "1" else: include_internal = "0" @@ -224,7 +224,8 @@ def tf_gen_op_wrappers_cc(name, "//tensorflow/cc:scope", "//tensorflow/cc:const_op", ], - op_gen="//tensorflow/cc:cc_op_gen_main"): + op_gen="//tensorflow/cc:cc_op_gen_main", + visibility=None): subsrcs = other_srcs subhdrs = other_hdrs for n in op_lib_names: @@ -242,7 +243,8 @@ def tf_gen_op_wrappers_cc(name, "//tensorflow/core:protos_all_cc", ], copts=tf_copts(), - alwayslink=1,) + alwayslink=1, + visibility=visibility) # Invoke this rule in .../tensorflow/python to build the wrapper library. def tf_gen_op_wrapper_py(name, out=None, hidden=None, visibility=None, deps=[],