Use exec_tools
rather than tools
in tensorflow.bzl to allow transitive dependencies to use python3 tools and deps in genrules
PiperOrigin-RevId: 299023196 Change-Id: I99981272330b060e9581c5c2a2f3992d524ae287
This commit is contained in:
parent
3006330ea0
commit
f827c02390
@ -767,7 +767,7 @@ def tf_gen_op_wrapper_cc(
|
||||
out_ops_file + "_internal.cc",
|
||||
],
|
||||
srcs = srcs,
|
||||
tools = [":" + tool] + tf_binary_additional_srcs(),
|
||||
exec_tools = [":" + tool] + tf_binary_additional_srcs(),
|
||||
cmd = ("$(location :" + tool + ") $(location :" + out_ops_file + ".h) " +
|
||||
"$(location :" + out_ops_file + ".cc) " +
|
||||
str(include_internal_ops) + " " + api_def_args_str),
|
||||
@ -969,7 +969,7 @@ def tf_gen_op_wrapper_py(
|
||||
name = name + "_pygenrule",
|
||||
outs = [out],
|
||||
srcs = api_def_srcs + [hidden_file],
|
||||
tools = [tool_name] + tf_binary_additional_srcs(),
|
||||
exec_tools = [tool_name] + tf_binary_additional_srcs(),
|
||||
cmd = ("$(location " + tool_name + ") " + api_def_args_str +
|
||||
" @$(location " + hidden_file + ") > $@"),
|
||||
)
|
||||
@ -978,7 +978,7 @@ def tf_gen_op_wrapper_py(
|
||||
name = name + "_pygenrule",
|
||||
outs = [out],
|
||||
srcs = api_def_srcs,
|
||||
tools = [tool_name] + tf_binary_additional_srcs(),
|
||||
exec_tools = [tool_name] + tf_binary_additional_srcs(),
|
||||
cmd = ("$(location " + tool_name + ") " + api_def_args_str + " " +
|
||||
op_list_arg + " " +
|
||||
("1" if op_list_is_whitelist else "0") + " > $@"),
|
||||
@ -2430,7 +2430,7 @@ def tf_generate_proto_text_sources(name, srcs_relative_dir, srcs, protodeps = []
|
||||
cmd =
|
||||
"$(location //tensorflow/tools/proto_text:gen_proto_text_functions) " +
|
||||
"$(@D) " + srcs_relative_dir + " $(SRCS)",
|
||||
tools = [
|
||||
exec_tools = [
|
||||
clean_dep("//tensorflow/tools/proto_text:gen_proto_text_functions"),
|
||||
],
|
||||
)
|
||||
@ -2466,7 +2466,7 @@ def tf_version_info_genrule(name, out):
|
||||
cmd =
|
||||
"$(location //tensorflow/tools/git:gen_git_source) --generate $(SRCS) \"$@\" --git_tag_override=$${GIT_TAG_OVERRIDE:-}",
|
||||
local = 1,
|
||||
tools = [clean_dep("//tensorflow/tools/git:gen_git_source")],
|
||||
exec_tools = [clean_dep("//tensorflow/tools/git:gen_git_source")],
|
||||
)
|
||||
|
||||
def tf_py_build_info_genrule(name, out, **kwargs):
|
||||
@ -2486,7 +2486,7 @@ def tf_py_build_info_genrule(name, out, **kwargs):
|
||||
"cudnn_dll_name=cudnn64_$${TF_CUDNN_VERSION:-}.dll",
|
||||
]), ""),
|
||||
local = 1,
|
||||
tools = [clean_dep("//tensorflow/tools/build_info:gen_build_info")],
|
||||
exec_tools = [clean_dep("//tensorflow/tools/build_info:gen_build_info")],
|
||||
**kwargs
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user