aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party
diff options
context:
space:
mode:
authorGravatar Gunhan Gulsoy <gunan@google.com>2016-12-23 20:57:51 -0800
committerGravatar Gunhan Gulsoy <gunan@google.com>2016-12-23 20:57:51 -0800
commit9bffde4980cbe1a9a77d6ab6962ec89293e7f5b6 (patch)
treef871d709c244abdbfe33326ca239b2087f2b7b9e /third_party
parent72f1ba04dda9202ab44aaaf2cda2bbba44107d8b (diff)
Rename the expand_header_template template_rule.
Diffstat (limited to 'third_party')
-rw-r--r--third_party/common.bzl10
-rw-r--r--third_party/jpeg/jpeg.BUILD12
-rw-r--r--third_party/llvm/llvm.BUILD10
3 files changed, 16 insertions, 16 deletions
diff --git a/third_party/common.bzl b/third_party/common.bzl
index d2b1422227..db981a5e31 100644
--- a/third_party/common.bzl
+++ b/third_party/common.bzl
@@ -3,8 +3,8 @@
# and replaces them with the corresponding values.
#
# Typical usage:
-# load("/tools/build_rules/expand_header_template", "expand_header_template")
-# expand_header_template(
+# load("/tools/build_rules/template_rule", "expand_header_template")
+# template_rule(
# name = "ExpandMyTemplate",
# src = "my.template",
# out = "my.txt",
@@ -20,14 +20,14 @@
# out: The destination of the expanded file
# substitutions: A dictionary mapping strings to their substitutions
-def expand_header_template_impl(ctx):
+def template_rule_impl(ctx):
ctx.template_action(
template = ctx.file.src,
output = ctx.outputs.out,
substitutions = ctx.attr.substitutions,
)
-expand_header_template = rule(
+template_rule = rule(
attrs = {
"src": attr.label(
mandatory = True,
@@ -39,5 +39,5 @@ expand_header_template = rule(
},
# output_to_genfiles is required for header files.
output_to_genfiles = True,
- implementation = expand_header_template_impl,
+ implementation = template_rule_impl,
)
diff --git a/third_party/jpeg/jpeg.BUILD b/third_party/jpeg/jpeg.BUILD
index 186024d3cf..37401b41d0 100644
--- a/third_party/jpeg/jpeg.BUILD
+++ b/third_party/jpeg/jpeg.BUILD
@@ -5,7 +5,7 @@ licenses(["notice"]) # custom notice-style license, see LICENSE.md
exports_files(["LICENSE.md"])
-load("@//third_party:common.bzl", "expand_header_template")
+load("@//third_party:common.bzl", "template_rule")
libjpegturbo_nocopts = "-[W]error"
@@ -276,7 +276,7 @@ cc_library(
nocopts = libjpegturbo_nocopts,
)
-expand_header_template(
+template_rule(
name = "jconfig_win",
src = "win/jconfig.h.in",
out = "jconfig_win.h",
@@ -289,7 +289,7 @@ expand_header_template(
},
)
-expand_header_template(
+template_rule(
name = "jconfigint_win",
src = "win/jconfigint.h.in",
out = "jconfigint_win.h",
@@ -328,21 +328,21 @@ JCONFIG_NOWIN_NOSIMD_SUBSTITUTIONS = JCONFIG_NOWIN_COMMON_SUBSTITUTIONS + {
"#undef WITH_SIMD": "",
}
-expand_header_template(
+template_rule(
name = "jconfig_nowin_nosimd",
src = "jconfig.h.in",
out = "jconfig_nowin_nosimd.h",
substitutions = JCONFIG_NOWIN_NOSIMD_SUBSTITUTIONS,
)
-expand_header_template(
+template_rule(
name = "jconfig_nowin_simd",
src = "jconfig.h.in",
out = "jconfig_nowin_simd.h",
substitutions = JCONFIG_NOWIN_SIMD_SUBSTITUTIONS,
)
-expand_header_template(
+template_rule(
name = "jconfigint_nowin",
src = "jconfigint.h.in",
out = "jconfigint_nowin.h",
diff --git a/third_party/llvm/llvm.BUILD b/third_party/llvm/llvm.BUILD
index 5251a05a36..c6ed697013 100644
--- a/third_party/llvm/llvm.BUILD
+++ b/third_party/llvm/llvm.BUILD
@@ -15,7 +15,7 @@ load(
)
load(
"@//third_party:common.bzl",
- "expand_header_template",
+ "template_rule",
)
package(default_visibility = ["@//tensorflow/compiler/xla:internal"])
@@ -179,7 +179,7 @@ expand_cmake_vars(
)
# Performs macro expansions on .def.in files
-expand_header_template(
+template_rule(
name = "targets_def_gen",
src = "include/llvm/Config/Targets.def.in",
out = "include/llvm/Config/Targets.def",
@@ -190,7 +190,7 @@ expand_header_template(
},
)
-expand_header_template(
+template_rule(
name = "asm_parsers_def_gen",
src = "include/llvm/Config/AsmParsers.def.in",
out = "include/llvm/Config/AsmParsers.def",
@@ -201,7 +201,7 @@ expand_header_template(
},
)
-expand_header_template(
+template_rule(
name = "asm_printers_def_gen",
src = "include/llvm/Config/AsmPrinters.def.in",
out = "include/llvm/Config/AsmPrinters.def",
@@ -212,7 +212,7 @@ expand_header_template(
},
)
-expand_header_template(
+template_rule(
name = "disassemblers_def_gen",
src = "include/llvm/Config/Disassemblers.def.in",
out = "include/llvm/Config/Disassemblers.def",