aboutsummaryrefslogtreecommitdiffhomepage
path: root/third_party/llvm/llvm.bzl
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2017-01-02 22:19:48 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-01-02 22:27:38 -0800
commit46d2c286045f4d2616d348cbaaea7fd52fadfe8b (patch)
treef8c1b4cd1ea1f17e7a80b6f969555ee3b0b65837 /third_party/llvm/llvm.bzl
parent143556267343e8f3f352b0ddba5272fc30b80078 (diff)
Merge changes from github.
Change: 143412147
Diffstat (limited to 'third_party/llvm/llvm.bzl')
-rw-r--r--third_party/llvm/llvm.bzl42
1 files changed, 0 insertions, 42 deletions
diff --git a/third_party/llvm/llvm.bzl b/third_party/llvm/llvm.bzl
index 1d6bf1c706..4a0814fb7f 100644
--- a/third_party/llvm/llvm.bzl
+++ b/third_party/llvm/llvm.bzl
@@ -46,48 +46,6 @@ def gentbl(name, tblgen, td_file, td_srcs, tbl_outs, library = True, **kwargs):
native.cc_library(name=name, textual_hdrs=[f for (_, f) in tbl_outs],
includes=includes, **kwargs)
-
-# Rule for simple expansion of template files. This performs a simple
-# search over the template file for the keys in substitutions,
-# and replaces them with the corresponding values.
-#
-# Typical usage:
-# load("/tools/build_rules/expand_header_template", "expand_header_template")
-# expand_header_template(
-# name = "ExpandMyTemplate",
-# template = "my.template",
-# out = "my.txt",
-# substitutions = {
-# "$VAR1": "foo",
-# "$VAR2": "bar",
-# }
-# )
-#
-# Args:
-# name: The name of the rule.
-# template: The template file to expand
-# out: The destination of the expanded file
-# substitutions: A dictionary mapping strings to their substitutions
-
-def expand_header_template_impl(ctx):
- ctx.template_action(
- template = ctx.file.template,
- output = ctx.outputs.out,
- substitutions = ctx.attr.substitutions,
- )
-
-expand_header_template = rule(
- implementation = expand_header_template_impl,
- attrs = {
- "template": attr.label(mandatory=True, allow_files=True, single_file=True),
- "substitutions": attr.string_dict(mandatory=True),
- "out": attr.output(mandatory=True),
- },
- # output_to_genfiles is required for header files.
- output_to_genfiles = True,
-)
-
-
def llvm_target_cmake_vars(native_arch, target_triple):
return {
"LLVM_HOST_TRIPLE": target_triple,