[gn build] Add template for running llvm-tblgen and use it to add build file for...
authorNico Weber <nicolasweber@gmx.de>
Thu, 29 Nov 2018 22:53:21 +0000 (22:53 +0000)
committerNico Weber <nicolasweber@gmx.de>
Thu, 29 Nov 2018 22:53:21 +0000 (22:53 +0000)
commit8a2454cab881dbf0ce908d4a6641100a2eb8030a
tree9c2cb31efb282e11039871b72c109c0369d9bade
parent55fcb4e90eab0777ced11e6607ee83ed724b4fd8
[gn build] Add template for running llvm-tblgen and use it to add build file for llvm/lib/IR.

Also adds a boring build file for llvm/lib/BinaryFormat (needed by llvm/lib/IR).

lib/IR marks Attributes and IntrinsicsEnum as public_deps (because IR's public
headers include the generated .inc files), so projects depending on lib/IR will
implicitly depend on them being generated. As a consequence, most targets won't
have to explicitly list a dependency on these tablegen steps (contrast with
intrinsics_gen in the cmake build).

This doesn't yet have the optimization where tablegen's output is only updated
if it's changed.

Differential Revision: https://reviews.llvm.org/D55028#inline-486755

llvm-svn: 347927
llvm/utils/gn/build/run_tablegen.py [new file with mode: 0644]
llvm/utils/gn/secondary/BUILD.gn
llvm/utils/gn/secondary/llvm/include/llvm/IR/BUILD.gn [new file with mode: 0644]
llvm/utils/gn/secondary/llvm/lib/BinaryFormat/BUILD.gn [new file with mode: 0644]
llvm/utils/gn/secondary/llvm/lib/IR/BUILD.gn [new file with mode: 0644]
llvm/utils/gn/secondary/llvm/utils/TableGen/tablegen.gni [new file with mode: 0644]