Clang-side build system infrastructure for multiple tblgens.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141267 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Makefile b/Makefile
index 50dcf8c..7a98388 100644
--- a/Makefile
+++ b/Makefile
@@ -60,6 +60,16 @@
# We can revisit this when LLVM/Clang support it.
CXX.Flags += -fno-strict-aliasing
+# Set up Clang's tblgen.
+ifndef CLANG_TBLGEN
+ ifeq ($(LLVM_CROSS_COMPILING),1)
+ CLANG_TBLGEN := $(BuildLLVMToolDir)/llvm-tblgen$(BUILD_EXEEXT)
+ else
+ CLANG_TBLGEN := $(LLVMToolDir)/llvm-tblgen$(EXEEXT)
+ endif
+endif
+ClangTableGen = $(CLANG_TBLGEN) $(TableGen.Flags)
+
###
# Clang Top Level specific stuff.