1########################################################### 2## TableGen: Compile .td files to .inc. 3########################################################### 4ifeq ($(LOCAL_MODULE_CLASS),) 5 LOCAL_MODULE_CLASS := STATIC_LIBRARIES 6endif 7 8ifneq ($(strip $(TBLGEN_TABLES)),) 9 10intermediates := $(call local-intermediates-dir) 11 12ifneq ($(findstring AttrDump.inc,$(TBLGEN_TABLES)),) 13LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/AST/AttrDump.inc 14$(intermediates)/include/clang/AST/AttrDump.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) 15$(intermediates)/include/clang/AST/AttrDump.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Attr.td | $(CLANG_TBLGEN) 16 $(call transform-host-clang-td-to-out,clang-attr-dump) 17endif 18 19ifneq ($(findstring AttrImpl.inc,$(TBLGEN_TABLES)),) 20LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/AST/AttrImpl.inc 21$(intermediates)/include/clang/AST/AttrImpl.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) 22$(intermediates)/include/clang/AST/AttrImpl.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Attr.td | $(CLANG_TBLGEN) 23 $(call transform-host-clang-td-to-out,clang-attr-impl) 24endif 25 26ifneq ($(findstring AttrList.inc,$(TBLGEN_TABLES)),) 27LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/Basic/AttrList.inc 28$(intermediates)/include/clang/Basic/AttrList.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) 29$(intermediates)/include/clang/Basic/AttrList.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Attr.td | $(CLANG_TBLGEN) 30 $(call transform-host-clang-td-to-out,clang-attr-list) 31endif 32 33ifneq ($(findstring AttrSpellings.inc,$(TBLGEN_TABLES)),) 34LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/Lex/AttrSpellings.inc 35$(intermediates)/include/clang/Lex/AttrSpellings.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) 36$(intermediates)/include/clang/Lex/AttrSpellings.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Attr.td | $(CLANG_TBLGEN) 37 $(call transform-host-clang-td-to-out,clang-attr-spelling-list) 38endif 39 40ifneq ($(findstring AttrSpellingListIndex.inc,$(TBLGEN_TABLES)),) 41LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/Sema/AttrSpellingListIndex.inc 42$(intermediates)/include/clang/Sema/AttrSpellingListIndex.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) 43$(intermediates)/include/clang/Sema/AttrSpellingListIndex.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Attr.td | $(CLANG_TBLGEN) 44 $(call transform-host-clang-td-to-out,clang-attr-spelling-index) 45endif 46 47ifneq ($(findstring AttrPCHRead.inc,$(TBLGEN_TABLES)),) 48LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/Serialization/AttrPCHRead.inc 49$(intermediates)/include/clang/Serialization/AttrPCHRead.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) 50$(intermediates)/include/clang/Serialization/AttrPCHRead.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Attr.td | $(CLANG_TBLGEN) 51 $(call transform-host-clang-td-to-out,clang-attr-pch-read) 52endif 53 54ifneq ($(findstring AttrPCHWrite.inc,$(TBLGEN_TABLES)),) 55LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/Serialization/AttrPCHWrite.inc 56$(intermediates)/include/clang/Serialization/AttrPCHWrite.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) 57$(intermediates)/include/clang/Serialization/AttrPCHWrite.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Attr.td | $(CLANG_TBLGEN) 58 $(call transform-host-clang-td-to-out,clang-attr-pch-write) 59endif 60 61ifneq ($(findstring AttrExprArgs.inc,$(TBLGEN_TABLES)),) 62LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/Parse/AttrExprArgs.inc 63$(intermediates)/include/clang/Parse/AttrExprArgs.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) 64$(intermediates)/include/clang/Parse/AttrExprArgs.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Attr.td | $(CLANG_TBLGEN) 65 $(call transform-host-clang-td-to-out,clang-attr-expr-args-list) 66endif 67 68ifneq ($(findstring AttrLateParsed.inc,$(TBLGEN_TABLES)),) 69LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/Parse/AttrLateParsed.inc 70$(intermediates)/include/clang/Parse/AttrLateParsed.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) 71$(intermediates)/include/clang/Parse/AttrLateParsed.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Attr.td | $(CLANG_TBLGEN) 72 $(call transform-host-clang-td-to-out,clang-attr-late-parsed-list) 73endif 74 75ifneq ($(findstring Attrs.inc,$(TBLGEN_TABLES)),) 76LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/AST/Attrs.inc 77$(intermediates)/include/clang/AST/Attrs.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) 78$(intermediates)/include/clang/AST/Attrs.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Attr.td | $(CLANG_TBLGEN) 79 $(call transform-host-clang-td-to-out,clang-attr-classes) 80endif 81 82ifneq ($(findstring AttrParsedAttrKinds.inc,$(TBLGEN_TABLES)),) 83LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/Sema/AttrParsedAttrKinds.inc 84$(intermediates)/include/clang/Sema/AttrParsedAttrKinds.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) 85$(intermediates)/include/clang/Sema/AttrParsedAttrKinds.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Attr.td | $(CLANG_TBLGEN) 86 $(call transform-host-clang-td-to-out,clang-attr-parsed-attr-kinds) 87endif 88 89ifneq ($(findstring AttrParsedAttrList.inc,$(TBLGEN_TABLES)),) 90LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/Sema/AttrParsedAttrList.inc 91$(intermediates)/include/clang/Sema/AttrParsedAttrList.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) 92$(intermediates)/include/clang/Sema/AttrParsedAttrList.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Attr.td | $(CLANG_TBLGEN) 93 $(call transform-host-clang-td-to-out,clang-attr-parsed-attr-list) 94endif 95 96ifneq ($(findstring AttrTemplateInstantiate.inc,$(TBLGEN_TABLES)),) 97LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/Sema/AttrTemplateInstantiate.inc 98$(intermediates)/include/clang/Sema/AttrTemplateInstantiate.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) 99$(intermediates)/include/clang/Sema/AttrTemplateInstantiate.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Attr.td | $(CLANG_TBLGEN) 100 $(call transform-host-clang-td-to-out,clang-attr-template-instantiate) 101endif 102 103ifneq ($(findstring Checkers.inc,$(TBLGEN_TABLES)),) 104LOCAL_GENERATED_SOURCES += $(intermediates)/Checkers.inc 105$(intermediates)/Checkers.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) 106$(intermediates)/Checkers.inc: \ 107 $(CLANG_ROOT_PATH)/lib/StaticAnalyzer/Checkers/Checkers.td \ 108 $(CLANG_ROOT_PATH)/include/clang/StaticAnalyzer/Checkers/CheckerBase.td \ 109 | $(CLANG_TBLGEN) 110 $(call transform-host-clang-td-to-out,clang-sa-checkers) 111endif 112 113ifneq ($(findstring CommentCommandInfo.inc,$(TBLGEN_TABLES)),) 114LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/AST/CommentCommandInfo.inc 115$(intermediates)/include/clang/AST/CommentCommandInfo.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) 116$(intermediates)/include/clang/AST/CommentCommandInfo.inc: \ 117 $(CLANG_ROOT_PATH)/include/clang/AST/CommentCommands.td \ 118 | $(CLANG_TBLGEN) 119 $(call transform-host-clang-td-to-out,clang-comment-command-info) 120endif 121 122ifneq ($(findstring CommentCommandList.inc,$(TBLGEN_TABLES)),) 123LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/AST/CommentCommandList.inc 124$(intermediates)/include/clang/AST/CommentCommandList.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) 125$(intermediates)/include/clang/AST/CommentCommandList.inc: \ 126 $(CLANG_ROOT_PATH)/include/clang/AST/CommentCommands.td \ 127 | $(CLANG_TBLGEN) 128 $(call transform-host-clang-td-to-out,clang-comment-command-list) 129endif 130 131ifneq ($(findstring CommentHTMLNamedCharacterReferences.inc,$(TBLGEN_TABLES)),) 132LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/AST/CommentHTMLNamedCharacterReferences.inc 133$(intermediates)/include/clang/AST/CommentHTMLNamedCharacterReferences.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) 134$(intermediates)/include/clang/AST/CommentHTMLNamedCharacterReferences.inc: \ 135 $(CLANG_ROOT_PATH)/include/clang/AST/CommentHTMLNamedCharacterReferences.td \ 136 | $(CLANG_TBLGEN) 137 $(call transform-host-clang-td-to-out,clang-comment-html-named-character-references) 138endif 139 140ifneq ($(findstring CommentHTMLTagsProperties.inc,$(TBLGEN_TABLES)),) 141LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/AST/CommentHTMLTagsProperties.inc 142$(intermediates)/include/clang/AST/CommentHTMLTagsProperties.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) 143$(intermediates)/include/clang/AST/CommentHTMLTagsProperties.inc: \ 144 $(CLANG_ROOT_PATH)/include/clang/AST/CommentHTMLTags.td \ 145 | $(CLANG_TBLGEN) 146 $(call transform-host-clang-td-to-out,clang-comment-html-tags-properties) 147endif 148 149ifneq ($(findstring CommentHTMLTags.inc,$(TBLGEN_TABLES)),) 150LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/AST/CommentHTMLTags.inc 151$(intermediates)/include/clang/AST/CommentHTMLTags.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) 152$(intermediates)/include/clang/AST/CommentHTMLTags.inc: \ 153 $(CLANG_ROOT_PATH)/include/clang/AST/CommentHTMLTags.td \ 154 | $(CLANG_TBLGEN) 155 $(call transform-host-clang-td-to-out,clang-comment-html-tags) 156endif 157 158ifneq ($(findstring CommentNodes.inc,$(TBLGEN_TABLES)),) 159LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/AST/CommentNodes.inc 160$(intermediates)/include/clang/AST/CommentNodes.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) 161$(intermediates)/include/clang/AST/CommentNodes.inc: \ 162 $(CLANG_ROOT_PATH)/include/clang/Basic/CommentNodes.td \ 163 | $(CLANG_TBLGEN) 164 $(call transform-host-clang-td-to-out,clang-comment-nodes) 165endif 166 167ifneq ($(filter Diagnostic%Kinds.inc,$(TBLGEN_TABLES)),) 168LOCAL_GENERATED_SOURCES += $(addprefix $(intermediates)/include/clang/Basic/,$(filter Diagnostic%Kinds.inc,$(TBLGEN_TABLES))) 169$(intermediates)/include/clang/Basic/Diagnostic%Kinds.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) 170$(intermediates)/include/clang/Basic/Diagnostic%Kinds.inc: \ 171 $(CLANG_ROOT_PATH)/include/clang/Basic/Diagnostic.td \ 172 $(CLANG_ROOT_PATH)/include/clang/Basic/Diagnostic%Kinds.td \ 173 | $(CLANG_TBLGEN) 174 $(call transform-host-clang-td-to-out,clang-diags-defs -clang-component=$(patsubst Diagnostic%Kinds.inc,%,$(@F))) 175endif 176 177ifneq ($(findstring DiagnosticGroups.inc,$(TBLGEN_TABLES)),) 178LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/Basic/DiagnosticGroups.inc 179$(intermediates)/include/clang/Basic/DiagnosticGroups.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) 180$(intermediates)/include/clang/Basic/DiagnosticGroups.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Diagnostic.td $(CLANG_ROOT_PATH)/include/clang/Basic/DiagnosticGroups.td | $(CLANG_TBLGEN) 181 $(call transform-host-clang-td-to-out,clang-diag-groups) 182endif 183 184ifneq ($(findstring DiagnosticIndexName.inc,$(TBLGEN_TABLES)),) 185LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/Basic/DiagnosticIndexName.inc 186$(intermediates)/include/clang/Basic/DiagnosticIndexName.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) 187$(intermediates)/include/clang/Basic/DiagnosticIndexName.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/Diagnostic.td | $(CLANG_TBLGEN) 188 $(call transform-host-clang-td-to-out,clang-diag-groups) 189endif 190 191ifneq ($(findstring DeclNodes.inc,$(TBLGEN_TABLES)),) 192LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/AST/DeclNodes.inc 193$(intermediates)/include/clang/AST/DeclNodes.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) 194$(intermediates)/include/clang/AST/DeclNodes.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/DeclNodes.td | $(CLANG_TBLGEN) 195 $(call transform-host-clang-td-to-out,clang-decl-nodes) 196endif 197 198ifneq ($(findstring StmtNodes.inc,$(TBLGEN_TABLES)),) 199LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/AST/StmtNodes.inc 200$(intermediates)/include/clang/AST/StmtNodes.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) 201$(intermediates)/include/clang/AST/StmtNodes.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/StmtNodes.td | $(CLANG_TBLGEN) 202 $(call transform-host-clang-td-to-out,clang-stmt-nodes) 203endif 204 205ifneq ($(findstring arm_neon.inc,$(TBLGEN_TABLES)),) 206LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/Basic/arm_neon.inc 207$(intermediates)/include/clang/Basic/arm_neon.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) 208$(intermediates)/include/clang/Basic/arm_neon.inc: $(CLANG_ROOT_PATH)/include/clang/Basic/arm_neon.td | $(CLANG_TBLGEN) 209 $(call transform-host-clang-td-to-out,arm-neon-sema) 210endif 211 212ifneq ($(findstring Options.inc,$(TBLGEN_TABLES)),) 213LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/Driver/Options.inc 214$(intermediates)/include/clang/Driver/Options.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) 215$(intermediates)/include/clang/Driver/Options.inc: $(CLANG_ROOT_PATH)/include/clang/Driver/Options.td $(LLVM_ROOT_PATH)/include/llvm/Option/OptParser.td $(CLANG_ROOT_PATH)/include/clang/Driver/CC1Options.td \ 216 | $(CLANG_TBLGEN) $(TBLGEN) 217 $(call transform-host-td-to-out,opt-parser-defs) 218endif 219 220ifneq ($(findstring CC1AsOptions.inc,$(TBLGEN_TABLES)),) 221LOCAL_GENERATED_SOURCES += $(intermediates)/include/clang/Driver/CC1AsOptions.inc 222$(intermediates)/include/clang/Driver/CC1AsOptions.inc: TBLGEN_LOCAL_MODULE := $(LOCAL_MODULE) 223$(intermediates)/include/clang/Driver/CC1AsOptions.inc: $(CLANG_ROOT_PATH)/include/clang/Driver/CC1AsOptions.td $(LLVM_ROOT_PATH)/include/llvm/Option/OptParser.td \ 224 | $(CLANG_TBLGEN) $(TBLGEN) 225 $(call transform-host-td-to-out,opt-parser-defs) 226endif 227 228LOCAL_C_INCLUDES += $(intermediates)/include 229 230endif 231