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