git: d8ed7fa3d55d - main - Revert "Rework {clang,lldb,llvm}-tblgen invocations to add --write-if-changed"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 29 Mar 2023 18:31:49 UTC
The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=d8ed7fa3d55d57f3bb3c2eeb8826e3e0a63ccdc3 commit d8ed7fa3d55d57f3bb3c2eeb8826e3e0a63ccdc3 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2023-03-29 18:29:48 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2023-03-29 18:31:33 +0000 Revert "Rework {clang,lldb,llvm}-tblgen invocations to add --write-if-changed" This reverts commit 8f391d9098083044793ff036dff8c96930fb1553. There are still a bunch of problems, and apparently ${.ALLSRC} does not work as I expected. Fixes: 8f391d909808 --- lib/clang/clang.pre.mk | 7 +- lib/clang/headers/Makefile | 12 +- lib/clang/libclang/Makefile | 370 +++++++++++++++++---------------- lib/clang/liblldb/Makefile | 21 +- lib/clang/libllvm/Makefile | 58 +++--- lib/clang/lldb.pre.mk | 6 +- lib/clang/llvm.pre.mk | 9 +- usr.bin/clang/lld/Makefile | 11 +- usr.bin/clang/lldb-server/Makefile | 11 +- usr.bin/clang/lldb/Makefile | 11 +- usr.bin/clang/llvm-cxxfilt/Makefile | 11 +- usr.bin/clang/llvm-dwarfutil/Makefile | 11 +- usr.bin/clang/llvm-nm/Makefile | 11 +- usr.bin/clang/llvm-objcopy/Makefile | 4 +- usr.bin/clang/llvm-objdump/Makefile | 4 +- usr.bin/clang/llvm-readobj/Makefile | 11 +- usr.bin/clang/llvm-size/Makefile | 11 +- usr.bin/clang/llvm-strings/Makefile | 11 +- usr.bin/clang/llvm-symbolizer/Makefile | 11 +- 19 files changed, 328 insertions(+), 273 deletions(-) diff --git a/lib/clang/clang.pre.mk b/lib/clang/clang.pre.mk index 41071681851e..9ef401645f14 100644 --- a/lib/clang/clang.pre.mk +++ b/lib/clang/clang.pre.mk @@ -2,8 +2,7 @@ .include "llvm.pre.mk" -CLANG_SRCS= ${LLVM_BASE}/clang +CLANG_SRCS= ${LLVM_BASE}/clang -CLANG_TBLGEN?= clang-tblgen -CLANG_TBLGEN_BIN!= which ${CLANG_TBLGEN} || echo __nonexistent_clang_tblgen__ -CLANG_TBLGEN_OPTS?= --write-if-changed +CLANG_TBLGEN?= clang-tblgen +CLANG_TBLGEN_BIN!= which ${CLANG_TBLGEN} diff --git a/lib/clang/headers/Makefile b/lib/clang/headers/Makefile index 8a4a778f43e2..df53b7dc7ea0 100644 --- a/lib/clang/headers/Makefile +++ b/lib/clang/headers/Makefile @@ -200,17 +200,17 @@ PPC+= ppc_wrappers/xmmintrin.h .for hdr in bf16/bf16 cde/cde-header fp16/fp16 mve/mve-header neon/neon \ sve/sve-header arm_${hdr:H}.h: ${CLANG_SRCS}/include/clang/Basic/arm_${hdr:H}.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-arm-${hdr:T} \ - -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET}.d \ - -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-arm-${hdr:T} \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/arm_${hdr:H}.td GENINCS+= arm_${hdr:H}.h .endfor .for hdr in vector/vector-header riscv_${hdr:H}.h: ${CLANG_SRCS}/include/clang/Basic/riscv_${hdr:H}.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-riscv-${hdr:T} \ - -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET}.d \ - -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-riscv-${hdr:T} \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/riscv_${hdr:H}.td GENINCS+= riscv_${hdr:H}.h .endfor diff --git a/lib/clang/libclang/Makefile b/lib/clang/libclang/Makefile index 5e493e3509c9..ac85db06ed58 100644 --- a/lib/clang/libclang/Makefile +++ b/lib/clang/libclang/Makefile @@ -760,339 +760,358 @@ SRCS_ALL+= ${SRCS_LDB} SRCS+= ${SRCS_ALL:O} clang/AST/AbstractBasicReader.inc: \ - ${CLANG_SRCS}/include/clang/AST/PropertiesBase.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-clang-basic-reader \ - -I ${CLANG_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_SRCS}/include/clang/AST/PropertiesBase.td + ${CLANG_TBLGEN} -gen-clang-basic-reader \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/AST/PropertiesBase.td TGHDRS+= clang/AST/AbstractBasicReader.inc clang/AST/AbstractBasicWriter.inc: \ - ${CLANG_SRCS}/include/clang/AST/PropertiesBase.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-clang-basic-writer \ - -I ${CLANG_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_SRCS}/include/clang/AST/PropertiesBase.td + ${CLANG_TBLGEN} -gen-clang-basic-writer \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/AST/PropertiesBase.td TGHDRS+= clang/AST/AbstractBasicWriter.inc clang/AST/AbstractTypeReader.inc: \ - ${CLANG_SRCS}/include/clang/AST/TypeProperties.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-clang-type-reader \ - -I ${CLANG_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_SRCS}/include/clang/AST/TypeProperties.td + ${CLANG_TBLGEN} -gen-clang-type-reader \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/AST/TypeProperties.td TGHDRS+= clang/AST/AbstractTypeReader.inc clang/AST/AbstractTypeWriter.inc: \ - ${CLANG_SRCS}/include/clang/AST/TypeProperties.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-clang-type-writer \ - -I ${CLANG_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_SRCS}/include/clang/AST/TypeProperties.td + ${CLANG_TBLGEN} -gen-clang-type-writer \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/AST/TypeProperties.td TGHDRS+= clang/AST/AbstractTypeWriter.inc clang/AST/AttrImpl.inc: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-clang-attr-impl \ - -I ${CLANG_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-impl \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/Attr.td TGHDRS+= clang/AST/AttrImpl.inc clang/AST/AttrNodeTraverse.inc: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-clang-attr-node-traverse \ - -I ${CLANG_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-node-traverse \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/Attr.td TGHDRS+= clang/AST/AttrNodeTraverse.inc clang/AST/AttrTextNodeDump.inc: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-clang-attr-text-node-dump \ - -I ${CLANG_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-text-node-dump \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/Attr.td TGHDRS+= clang/AST/AttrTextNodeDump.inc clang/AST/AttrVisitor.inc: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-clang-attr-ast-visitor \ - -I ${CLANG_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-ast-visitor \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/Attr.td TGHDRS+= clang/AST/AttrVisitor.inc clang/AST/Attrs.inc: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-clang-attr-classes \ - -I ${CLANG_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-classes \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/Attr.td TGHDRS+= clang/AST/Attrs.inc clang/AST/CommentCommandInfo.inc: \ - ${CLANG_SRCS}/include/clang/AST/CommentCommands.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-clang-comment-command-info \ - -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_SRCS}/include/clang/AST/CommentCommands.td + ${CLANG_TBLGEN} -gen-clang-comment-command-info \ + -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/AST/CommentCommands.td TGHDRS+= clang/AST/CommentCommandInfo.inc clang/AST/CommentCommandList.inc: \ - ${CLANG_SRCS}/include/clang/AST/CommentCommands.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-clang-comment-command-list \ - -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_SRCS}/include/clang/AST/CommentCommands.td + ${CLANG_TBLGEN} -gen-clang-comment-command-list \ + -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/AST/CommentCommands.td TGHDRS+= clang/AST/CommentCommandList.inc clang/AST/CommentHTMLNamedCharacterReferences.inc: \ - ${CLANG_SRCS}/include/clang/AST/CommentHTMLNamedCharacterReferences.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} \ - --gen-clang-comment-html-named-character-references \ - -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_SRCS}/include/clang/AST/CommentHTMLNamedCharacterReferences.td + ${CLANG_TBLGEN} -gen-clang-comment-html-named-character-references \ + -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/AST/CommentHTMLNamedCharacterReferences.td TGHDRS+= clang/AST/CommentHTMLNamedCharacterReferences.inc clang/AST/CommentHTMLTags.inc: \ - ${CLANG_SRCS}/include/clang/AST/CommentHTMLTags.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-clang-comment-html-tags \ - -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_SRCS}/include/clang/AST/CommentHTMLTags.td + ${CLANG_TBLGEN} -gen-clang-comment-html-tags \ + -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/AST/CommentHTMLTags.td TGHDRS+= clang/AST/CommentHTMLTags.inc clang/AST/CommentHTMLTagsProperties.inc: \ - ${CLANG_SRCS}/include/clang/AST/CommentHTMLTags.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} \ - --gen-clang-comment-html-tags-properties -d ${.TARGET}.d \ - -o ${.TARGET} ${.ALLSRC} + ${CLANG_SRCS}/include/clang/AST/CommentHTMLTags.td + ${CLANG_TBLGEN} -gen-clang-comment-html-tags-properties \ + -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/AST/CommentHTMLTags.td TGHDRS+= clang/AST/CommentHTMLTagsProperties.inc clang/AST/CommentNodes.inc: ${CLANG_SRCS}/include/clang/Basic/CommentNodes.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-clang-comment-nodes \ - -I ${CLANG_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-comment-nodes \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/CommentNodes.td TGHDRS+= clang/AST/CommentNodes.inc clang/AST/DeclNodes.inc: ${CLANG_SRCS}/include/clang/Basic/DeclNodes.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-clang-decl-nodes \ - -I ${CLANG_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-decl-nodes \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/DeclNodes.td TGHDRS+= clang/AST/DeclNodes.inc clang/AST/StmtDataCollectors.inc: \ - ${CLANG_SRCS}/include/clang/AST/StmtDataCollectors.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-clang-data-collectors \ - -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_SRCS}/include/clang/AST/StmtDataCollectors.td + ${CLANG_TBLGEN} -gen-clang-data-collectors \ + -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/AST/StmtDataCollectors.td TGHDRS+= clang/AST/StmtDataCollectors.inc clang/AST/StmtNodes.inc: ${CLANG_SRCS}/include/clang/Basic/StmtNodes.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-clang-stmt-nodes \ - -I ${CLANG_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-stmt-nodes \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/StmtNodes.td TGHDRS+= clang/AST/StmtNodes.inc clang/AST/TypeNodes.inc: ${CLANG_SRCS}/include/clang/Basic/TypeNodes.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-clang-type-nodes \ - -I ${CLANG_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-type-nodes \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/TypeNodes.td TGHDRS+= clang/AST/TypeNodes.inc clang/Basic/AttrHasAttributeImpl.inc: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} \ - --gen-clang-attr-has-attribute-impl -I ${CLANG_SRCS}/include \ - -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-has-attribute-impl \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/Attr.td TGHDRS+= clang/Basic/AttrHasAttributeImpl.inc clang/Basic/AttrList.inc: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-clang-attr-list \ - -I ${CLANG_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-list \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/Attr.td TGHDRS+= clang/Basic/AttrList.inc -clang/Basic/AttrSubMatchRulesList.inc: \ - ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} \ - --gen-clang-attr-subject-match-rule-list -I ${CLANG_SRCS}/include \ - -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} +clang/Basic/AttrSubMatchRulesList.inc: ${CLANG_SRCS}/include/clang/Basic/Attr.td + ${CLANG_TBLGEN} -gen-clang-attr-subject-match-rule-list \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/Attr.td TGHDRS+= clang/Basic/AttrSubMatchRulesList.inc .for hdr in \ AST Analysis Comment Common CrossTU Driver Frontend Lex Parse \ Refactoring Sema Serialization SemaSerialization clang/Basic/Diagnostic${hdr}Kinds.inc: \ - ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-clang-diags-defs \ - -clang-component=${hdr} -I ${CLANG_SRCS}/include/clang/Basic \ - -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td + ${CLANG_TBLGEN} -gen-clang-diags-defs -clang-component=${hdr} \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td TGHDRS+= clang/Basic/Diagnostic${hdr}Kinds.inc .endfor clang/Basic/DiagnosticGroups.inc: \ - ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-clang-diag-groups \ - -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET}.d \ - -o ${.TARGET} ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td + ${CLANG_TBLGEN} -gen-clang-diag-groups \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td TGHDRS+= clang/Basic/DiagnosticGroups.inc clang/Basic/DiagnosticIndexName.inc: \ - ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-clang-diags-index-name \ - -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET}.d \ - -o ${.TARGET} ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td + ${CLANG_TBLGEN} -gen-clang-diags-index-name \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/Diagnostic.td TGHDRS+= clang/Basic/DiagnosticIndexName.inc clang/Basic/arm_fp16.inc: ${CLANG_SRCS}/include/clang/Basic/arm_fp16.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-arm-neon-sema \ - -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET}.d \ - -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-arm-neon-sema \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/arm_fp16.td TGHDRS+= clang/Basic/arm_fp16.inc clang/Basic/arm_neon.inc: ${CLANG_SRCS}/include/clang/Basic/arm_neon.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-arm-neon-sema \ - -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET}.d \ - -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-arm-neon-sema \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/arm_neon.td TGHDRS+= clang/Basic/arm_neon.inc clang/Basic/arm_cde_builtins.inc: ${CLANG_SRCS}/include/clang/Basic/arm_cde.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-arm-cde-builtin-def \ - -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET}.d \ - -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-arm-cde-builtin-def \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/arm_cde.td TGHDRS+= clang/Basic/arm_cde_builtins.inc clang/Basic/arm_cde_builtin_aliases.inc: \ - ${CLANG_SRCS}/include/clang/Basic/arm_cde.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-arm-cde-builtin-aliases \ - -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET}.d \ - -o ${.TARGET} ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/arm_cde.td + ${CLANG_TBLGEN} -gen-arm-cde-builtin-aliases \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/arm_cde.td TGHDRS+= clang/Basic/arm_cde_builtin_aliases.inc -clang/Basic/arm_cde_builtin_cg.inc: \ - ${CLANG_SRCS}/include/clang/Basic/arm_cde.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-arm-cde-builtin-codegen \ - -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET}.d \ - -o ${.TARGET} ${.ALLSRC} +clang/Basic/arm_cde_builtin_cg.inc: ${CLANG_SRCS}/include/clang/Basic/arm_cde.td + ${CLANG_TBLGEN} -gen-arm-cde-builtin-codegen \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/arm_cde.td TGHDRS+= clang/Basic/arm_cde_builtin_cg.inc clang/Basic/arm_cde_builtin_sema.inc: \ - ${CLANG_SRCS}/include/clang/Basic/arm_cde.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-arm-cde-builtin-sema \ - -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET}.d \ - -o ${.TARGET} ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/arm_cde.td + ${CLANG_TBLGEN} -gen-arm-cde-builtin-sema \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/arm_cde.td TGHDRS+= clang/Basic/arm_cde_builtin_sema.inc clang/Basic/arm_mve_builtins.inc: ${CLANG_SRCS}/include/clang/Basic/arm_mve.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-arm-mve-builtin-def \ - -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET}.d \ - -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-arm-mve-builtin-def \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/arm_mve.td TGHDRS+= clang/Basic/arm_mve_builtins.inc clang/Basic/arm_mve_builtin_aliases.inc: \ - ${CLANG_SRCS}/include/clang/Basic/arm_mve.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-arm-mve-builtin-aliases \ - -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET}.d \ - -o ${.TARGET} ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/arm_mve.td + ${CLANG_TBLGEN} -gen-arm-mve-builtin-aliases \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/arm_mve.td TGHDRS+= clang/Basic/arm_mve_builtin_aliases.inc -clang/Basic/arm_mve_builtin_cg.inc: \ - ${CLANG_SRCS}/include/clang/Basic/arm_mve.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-arm-mve-builtin-codegen \ - -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET}.d \ - -o ${.TARGET} ${.ALLSRC} +clang/Basic/arm_mve_builtin_cg.inc: ${CLANG_SRCS}/include/clang/Basic/arm_mve.td + ${CLANG_TBLGEN} -gen-arm-mve-builtin-codegen \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/arm_mve.td TGHDRS+= clang/Basic/arm_mve_builtin_cg.inc clang/Basic/arm_mve_builtin_sema.inc: \ - ${CLANG_SRCS}/include/clang/Basic/arm_mve.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-arm-mve-builtin-sema \ - -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET}.d \ - -o ${.TARGET} ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/arm_mve.td + ${CLANG_TBLGEN} -gen-arm-mve-builtin-sema \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/arm_mve.td TGHDRS+= clang/Basic/arm_mve_builtin_sema.inc clang/Basic/arm_sve_builtins.inc: ${CLANG_SRCS}/include/clang/Basic/arm_sve.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-arm-sve-builtins \ - -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET}.d \ - -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-arm-sve-builtins \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/arm_sve.td TGHDRS+= clang/Basic/arm_sve_builtins.inc -clang/Basic/arm_sve_builtin_cg.inc: \ - ${CLANG_SRCS}/include/clang/Basic/arm_sve.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-arm-sve-builtin-codegen \ - -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET}.d \ - -o ${.TARGET} ${.ALLSRC} +clang/Basic/arm_sve_builtin_cg.inc: ${CLANG_SRCS}/include/clang/Basic/arm_sve.td + ${CLANG_TBLGEN} -gen-arm-sve-builtin-codegen \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/arm_sve.td TGHDRS+= clang/Basic/arm_sve_builtin_cg.inc clang/Basic/arm_sve_sema_rangechecks.inc: \ - ${CLANG_SRCS}/include/clang/Basic/arm_sve.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-arm-sve-sema-rangechecks \ - -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET}.d \ - -o ${.TARGET} ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/arm_sve.td + ${CLANG_TBLGEN} -gen-arm-sve-sema-rangechecks \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/arm_sve.td TGHDRS+= clang/Basic/arm_sve_sema_rangechecks.inc clang/Basic/arm_sve_typeflags.inc: \ - ${CLANG_SRCS}/include/clang/Basic/arm_sve.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-arm-sve-typeflags \ - -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET}.d \ - -o ${.TARGET} ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/arm_sve.td + ${CLANG_TBLGEN} -gen-arm-sve-typeflags \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/arm_sve.td TGHDRS+= clang/Basic/arm_sve_typeflags.inc clang/Basic/riscv_vector_builtins.inc: \ - ${CLANG_SRCS}/include/clang/Basic/riscv_vector.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-riscv-vector-builtins \ - -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET}.d \ - -o ${.TARGET} ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/riscv_vector.td + ${CLANG_TBLGEN} -gen-riscv-vector-builtins \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/riscv_vector.td TGHDRS+= clang/Basic/riscv_vector_builtins.inc clang/Basic/riscv_vector_builtin_cg.inc: \ - ${CLANG_SRCS}/include/clang/Basic/riscv_vector.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} \ - --gen-riscv-vector-builtin-codegen \ - -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET}.d \ - -o ${.TARGET} ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/riscv_vector.td + ${CLANG_TBLGEN} -gen-riscv-vector-builtin-codegen \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/riscv_vector.td TGHDRS+= clang/Basic/riscv_vector_builtin_cg.inc clang/Basic/riscv_vector_builtin_sema.inc: \ - ${CLANG_SRCS}/include/clang/Basic/riscv_vector.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-riscv-vector-builtin-sema \ - -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET}.d \ - -o ${.TARGET} ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/riscv_vector.td + ${CLANG_TBLGEN} -gen-riscv-vector-builtin-sema \ + -I ${CLANG_SRCS}/include/clang/Basic -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/riscv_vector.td TGHDRS+= clang/Basic/riscv_vector_builtin_sema.inc clang/Parse/AttrParserStringSwitches.inc: \ - ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} \ - --gen-clang-attr-parser-string-switches -I ${CLANG_SRCS}/include \ - -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td + ${CLANG_TBLGEN} -gen-clang-attr-parser-string-switches \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/Attr.td TGHDRS+= clang/Parse/AttrParserStringSwitches.inc clang/Parse/AttrSubMatchRulesParserStringSwitches.inc: \ - ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} \ - --gen-clang-attr-subject-match-rules-parser-string-switches \ - -I ${CLANG_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td + ${CLANG_TBLGEN} -gen-clang-attr-subject-match-rules-parser-string-switches \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/Attr.td TGHDRS+= clang/Parse/AttrSubMatchRulesParserStringSwitches.inc clang/Sema/AttrParsedAttrImpl.inc: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} \ - --gen-clang-attr-parsed-attr-impl -I ${CLANG_SRCS}/include \ - -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-parsed-attr-impl \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/Attr.td TGHDRS+= clang/Sema/AttrParsedAttrImpl.inc clang/Sema/AttrParsedAttrKinds.inc: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} \ - --gen-clang-attr-parsed-attr-kinds -I ${CLANG_SRCS}/include \ - -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-parsed-attr-kinds \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/Attr.td TGHDRS+= clang/Sema/AttrParsedAttrKinds.inc clang/Sema/AttrParsedAttrList.inc: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} \ - --gen-clang-attr-parsed-attr-list -I ${CLANG_SRCS}/include \ - -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-parsed-attr-list \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/Attr.td TGHDRS+= clang/Sema/AttrParsedAttrList.inc clang/Sema/AttrSpellingListIndex.inc: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-clang-attr-spelling-index \ - -I ${CLANG_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-spelling-index \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/Attr.td TGHDRS+= clang/Sema/AttrSpellingListIndex.inc clang/Sema/AttrTemplateInstantiate.inc: \ - ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} \ - --gen-clang-attr-template-instantiate -I ${CLANG_SRCS}/include \ - -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_SRCS}/include/clang/Basic/Attr.td + ${CLANG_TBLGEN} -gen-clang-attr-template-instantiate \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/Attr.td TGHDRS+= clang/Sema/AttrTemplateInstantiate.inc clang/Serialization/AttrPCHRead.inc: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-clang-attr-pch-read \ - -I ${CLANG_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-pch-read \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/Attr.td TGHDRS+= clang/Serialization/AttrPCHRead.inc clang/Serialization/AttrPCHWrite.inc: ${CLANG_SRCS}/include/clang/Basic/Attr.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-clang-attr-pch-write \ - -I ${CLANG_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-attr-pch-write \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Basic/Attr.td TGHDRS+= clang/Serialization/AttrPCHWrite.inc clang/StaticAnalyzer/Checkers/Checkers.inc: \ - ${CLANG_SRCS}/include/clang/StaticAnalyzer/Checkers/Checkers.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-clang-sa-checkers \ + ${CLANG_SRCS}/include/clang/StaticAnalyzer/Checkers/Checkers.td + ${CLANG_TBLGEN} -gen-clang-sa-checkers \ -I ${CLANG_SRCS}/include/clang/StaticAnalyzer/Checkers \ - -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/StaticAnalyzer/Checkers/Checkers.td TGHDRS+= clang/StaticAnalyzer/Checkers/Checkers.inc Opcodes.inc: ${CLANG_SRCS}/lib/AST/Interp/Opcodes.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-clang-opcodes \ - -I ${CLANG_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-opcodes \ + -I ${CLANG_SRCS}/include -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/lib/AST/Interp/Opcodes.td TGHDRS+= Opcodes.inc OpenCLBuiltins.inc: ${CLANG_SRCS}/lib/Sema/OpenCLBuiltins.td - ${CLANG_TBLGEN} ${CLANG_TBLGEN_OPTS} --gen-clang-opencl-builtins \ - -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${CLANG_TBLGEN} -gen-clang-opencl-builtins \ + -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/lib/Sema/OpenCLBuiltins.td TGHDRS+= OpenCLBuiltins.inc ${TGHDRS}: ${CLANG_TBLGEN_BIN} @@ -1102,9 +1121,10 @@ DPSRCS+= ${TGHDRS} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} clang/Driver/Options.inc: ${CLANG_SRCS}/include/clang/Driver/Options.td - ${LLVM_TBLGEN} ${LLVM_TBLGEN_OPTS} --gen-opt-parser-defs \ + ${LLVM_TBLGEN} -gen-opt-parser-defs \ -I ${LLVM_SRCS}/include -I ${CLANG_SRCS}/include/clang/Driver \ - -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + -d ${.TARGET:C/$/.d/} -o ${.TARGET} \ + ${CLANG_SRCS}/include/clang/Driver/Options.td LTGHDRS+= clang/Driver/Options.inc ${LTGHDRS}: ${LLVM_TBLGEN_BIN} diff --git a/lib/clang/liblldb/Makefile b/lib/clang/liblldb/Makefile index 2dfb585ee731..1a1494fd2bfb 100644 --- a/lib/clang/liblldb/Makefile +++ b/lib/clang/liblldb/Makefile @@ -700,10 +700,13 @@ SRCS+= Utility/VMRange.cpp SRCS+= Utility/XcodeSDK.cpp SRCS+= Version/Version.cpp +LLDB_TBLGEN?= lldb-tblgen +LLDB_TBLGEN_BIN!= which ${LLDB_TBLGEN} + CommandOptions.inc: ${LLDB_SRCS}/source/Commands/Options.td - ${LLDB_TBLGEN} ${LLDB_TBLGEN_OPTS} --gen-lldb-option-defs \ - -I ${LLDB_SRCS}/source/Commands -d ${.TARGET}.d -o ${.TARGET} \ - ${.ALLSRC} + ${LLDB_TBLGEN} -gen-lldb-option-defs \ + -I ${LLDB_SRCS}/source/Commands -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${LLDB_SRCS}/source/Commands/Options.td TGHDRS+= CommandOptions.inc .for path in \ @@ -714,15 +717,15 @@ TGHDRS+= CommandOptions.inc Plugins/SymbolFile/DWARF/SymbolFileDWARF \ Target/Target ${path:T}Properties.inc: ${LLDB_SRCS}/source/${path}Properties.td - ${LLDB_TBLGEN} ${LLDB_TBLGEN_OPTS} --gen-lldb-property-defs \ - -I ${LLDB_SRCS}/source/${path:H} -d ${.TARGET}.d -o ${.TARGET} \ - ${.ALLSRC} + ${LLDB_TBLGEN} -gen-lldb-property-defs \ + -I ${LLDB_SRCS}/source/${path:H} -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${LLDB_SRCS}/source/${path}Properties.td TGHDRS+= ${path:T}Properties.inc ${path:T}PropertiesEnum.inc: ${LLDB_SRCS}/source/${path}Properties.td - ${LLDB_TBLGEN} ${LLDB_TBLGEN_OPTS} --gen-lldb-property-enum-defs \ - -I ${LLDB_SRCS}/source/${path:H} -d ${.TARGET}.d -o ${.TARGET} \ - ${.ALLSRC} + ${LLDB_TBLGEN} -gen-lldb-property-enum-defs \ + -I ${LLDB_SRCS}/source/${path:H} -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${LLDB_SRCS}/source/${path}Properties.td TGHDRS+= ${path:T}PropertiesEnum.inc .endfor diff --git a/lib/clang/libllvm/Makefile b/lib/clang/libllvm/Makefile index 63b95219735c..1cfd75f509c0 100644 --- a/lib/clang/libllvm/Makefile +++ b/lib/clang/libllvm/Makefile @@ -1907,57 +1907,64 @@ SRCS_ALL+= ${SRCS_XDW} SRCS+= ${GENSRCS} SRCS+= ${SRCS_ALL:O} -llvm/Frontend/OpenMP/OMP.h.inc: \ - ${LLVM_SRCS}/include/llvm/Frontend/OpenMP/OMP.td - ${LLVM_TBLGEN} ${LLVM_TBLGEN_OPTS} --gen-directive-decl \ - -I ${LLVM_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} +llvm/Frontend/OpenMP/OMP.h.inc: ${LLVM_SRCS}/include/llvm/Frontend/OpenMP/OMP.td + ${LLVM_TBLGEN} --gen-directive-decl \ + -I ${LLVM_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} \ + ${LLVM_SRCS}/include/llvm/Frontend/OpenMP/OMP.td TGHDRS+= llvm/Frontend/OpenMP/OMP.h.inc llvm/Frontend/OpenMP/OMP.inc: ${LLVM_SRCS}/include/llvm/Frontend/OpenMP/OMP.td - ${LLVM_TBLGEN} ${LLVM_TBLGEN_OPTS} --gen-directive-impl \ - -I ${LLVM_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${LLVM_TBLGEN} --gen-directive-impl \ + -I ${LLVM_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} \ + ${LLVM_SRCS}/include/llvm/Frontend/OpenMP/OMP.td TGHDRS+= llvm/Frontend/OpenMP/OMP.inc OMP.cpp: ${LLVM_SRCS}/include/llvm/Frontend/OpenMP/OMP.td - ${LLVM_TBLGEN} ${LLVM_TBLGEN_OPTS} --gen-directive-impl \ - -I ${LLVM_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${LLVM_TBLGEN} --gen-directive-impl \ + -I ${LLVM_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} \ + ${LLVM_SRCS}/include/llvm/Frontend/OpenMP/OMP.td GENSRCS+= OMP.cpp llvm/IR/Attributes.inc: ${LLVM_SRCS}/include/llvm/IR/Attributes.td - ${LLVM_TBLGEN} ${LLVM_TBLGEN_OPTS} --gen-attrs \ - -I ${LLVM_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${LLVM_TBLGEN} -gen-attrs \ + -I ${LLVM_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} \ + ${LLVM_SRCS}/include/llvm/IR/Attributes.td TGHDRS+= llvm/IR/Attributes.inc llvm/IR/IntrinsicEnums.inc: ${LLVM_SRCS}/include/llvm/IR/Intrinsics.td - ${LLVM_TBLGEN} ${LLVM_TBLGEN_OPTS} --gen-intrinsic-enums \ - -I ${LLVM_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${LLVM_TBLGEN} -gen-intrinsic-enums \ + -I ${LLVM_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} \ + ${LLVM_SRCS}/include/llvm/IR/Intrinsics.td TGHDRS+= llvm/IR/IntrinsicEnums.inc llvm/IR/IntrinsicImpl.inc: ${LLVM_SRCS}/include/llvm/IR/Intrinsics.td - ${LLVM_TBLGEN} ${LLVM_TBLGEN_OPTS} --gen-intrinsic-impl \ - -I ${LLVM_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${LLVM_TBLGEN} -gen-intrinsic-impl \ + -I ${LLVM_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} \ + ${LLVM_SRCS}/include/llvm/IR/Intrinsics.td TGHDRS+= llvm/IR/IntrinsicImpl.inc .for arch in \ AArch64/aarch64 AMDGPU/amdgcn ARM/arm BPF/bpf DirectX/dx \ - Hexagon/hexagon Mips/mips NVPTX/nvvm PowerPC/ppc R600/r600 \ - RISCV/riscv S390/s390 VE/ve WebAssembly/wasm X86/x86 XCore/xcore + Hexagon/hexagon Mips/mips NVPTX/nvvm PowerPC/ppc R600/r600 RISCV/riscv \ + S390/s390 VE/ve WebAssembly/wasm X86/x86 XCore/xcore llvm/IR/Intrinsics${arch:H}.h: ${LLVM_SRCS}/include/llvm/IR/Intrinsics.td - ${LLVM_TBLGEN} ${LLVM_TBLGEN_OPTS} \ - --gen-intrinsic-enums -intrinsic-prefix=${arch:T} \ - -I ${LLVM_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${LLVM_TBLGEN} -gen-intrinsic-enums -intrinsic-prefix=${arch:T} \ + -I ${LLVM_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} \ + ${LLVM_SRCS}/include/llvm/IR/Intrinsics.td TGHDRS+= llvm/IR/Intrinsics${arch:H}.h .endfor llvm-lib/Options.inc: ${LLVM_SRCS}/lib/ToolDrivers/llvm-lib/Options.td - ${LLVM_TBLGEN} ${LLVM_TBLGEN_OPTS} --gen-opt-parser-defs \ - -I ${LLVM_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${LLVM_TBLGEN} -gen-opt-parser-defs \ + -I ${LLVM_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} \ + ${LLVM_SRCS}/lib/ToolDrivers/llvm-lib/Options.td TGHDRS+= llvm-lib/Options.inc CFLAGS.LibDriver.cpp+= -I${.OBJDIR}/llvm-lib llvm-dlltool/Options.inc: ${LLVM_SRCS}/lib/ToolDrivers/llvm-dlltool/Options.td - ${LLVM_TBLGEN} ${LLVM_TBLGEN_OPTS} --gen-opt-parser-defs \ - -I ${LLVM_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + ${LLVM_TBLGEN} -gen-opt-parser-defs \ + -I ${LLVM_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} \ + ${LLVM_SRCS}/lib/ToolDrivers/llvm-dlltool/Options.td TGHDRS+= llvm-dlltool/Options.inc CFLAGS.DlltoolDriver.cpp+= -I${.OBJDIR}/llvm-dlltool @@ -2002,9 +2009,10 @@ beforebuild: SystemOperands/-gen-searchable-tables \ SystemRegister/-gen-searchable-tables ${arch:T}Gen${hdr:H}.inc: ${LLVM_SRCS}/lib/Target/${arch:H}/${arch:T}.td - ${LLVM_TBLGEN} ${LLVM_TBLGEN_OPTS} ${hdr:T:C/,/ /g} \ + ${LLVM_TBLGEN} ${hdr:T:C/,/ /g} \ -I ${LLVM_SRCS}/include -I ${LLVM_SRCS}/lib/Target/${arch:H} \ - -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + -d ${.TARGET}.d -o ${.TARGET} \ + ${LLVM_SRCS}/lib/Target/${arch:H}/${arch:T}.td . endfor .endfor .if ${MK_LLVM_TARGET_AARCH64} != "no" diff --git a/lib/clang/lldb.pre.mk b/lib/clang/lldb.pre.mk index b0fb73925989..dbbfa1dba049 100644 --- a/lib/clang/lldb.pre.mk +++ b/lib/clang/lldb.pre.mk @@ -2,8 +2,4 @@ .include "clang.pre.mk" -LLDB_SRCS= ${LLVM_BASE}/lldb - -LLDB_TBLGEN?= lldb-tblgen -LLDB_TBLGEN_BIN!= which ${LLDB_TBLGEN} || echo __nonexistent_lldb_tblgen__ -LLDB_TBLGEN_OPTS?= --write-if-changed +LLDB_SRCS= ${LLVM_BASE}/lldb diff --git a/lib/clang/llvm.pre.mk b/lib/clang/llvm.pre.mk index 834a258c20e8..92124a7bf092 100644 --- a/lib/clang/llvm.pre.mk +++ b/lib/clang/llvm.pre.mk @@ -1,9 +1,8 @@ # $FreeBSD$ -LLVM_BASE= ${SRCTOP}/contrib/llvm-project -LLVM_SRCS= ${LLVM_BASE}/llvm +LLVM_BASE= ${SRCTOP}/contrib/llvm-project +LLVM_SRCS= ${LLVM_BASE}/llvm -LLVM_TBLGEN?= llvm-tblgen -LLVM_TBLGEN_BIN!= which ${LLVM_TBLGEN} || echo __nonexistent_llvm_tblgen__ -LLVM_TBLGEN_OPTS?= --write-if-changed +LLVM_TBLGEN?= llvm-tblgen +LLVM_TBLGEN_BIN!= which ${LLVM_TBLGEN} diff --git a/usr.bin/clang/lld/Makefile b/usr.bin/clang/lld/Makefile index 954112a83aac..150f74b90984 100644 --- a/usr.bin/clang/lld/Makefile +++ b/usr.bin/clang/lld/Makefile @@ -87,10 +87,13 @@ DPADD+= ${OBJTOP}/lib/clang/lib${lib}/lib${lib}.a LDADD+= ${OBJTOP}/lib/clang/lib${lib}/lib${lib}.a .endfor -Options.inc: ${LLD_SRCS}/ELF/Options.td - ${LLVM_TBLGEN} ${LLVM_TBLGEN_OPTS} --gen-opt-parser-defs \ - -I ${LLVM_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} -TGHDRS+= Options.inc +INCFILE= Options.inc +TDFILE= ${LLD_SRCS}/ELF/Options.td +GENOPT= -gen-opt-parser-defs +${INCFILE}: ${TDFILE} + ${LLVM_TBLGEN} ${GENOPT} -I ${LLVM_SRCS}/include -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${TDFILE} +TGHDRS+= ${INCFILE} ${TGHDRS}: ${LLVM_TBLGEN_BIN} diff --git a/usr.bin/clang/lldb-server/Makefile b/usr.bin/clang/lldb-server/Makefile index 974b288406c8..b11fbfbbef33 100644 --- a/usr.bin/clang/lldb-server/Makefile +++ b/usr.bin/clang/lldb-server/Makefile @@ -29,10 +29,13 @@ DPADD+= ${OBJTOP}/lib/clang/lib${lib}/lib${lib}.a LDADD+= ${OBJTOP}/lib/clang/lib${lib}/lib${lib}.a .endfor -LLGSOptions.inc: ${LLDB_SRCS}/tools/lldb-server/LLGSOptions.td - ${LLVM_TBLGEN} ${LLVM_TBLGEN_OPTS} --gen-opt-parser-defs \ - -I ${LLVM_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} -TGHDRS+= LLGSOptions.inc +INCFILE= LLGSOptions.inc +TDFILE= ${LLDB_SRCS}/tools/lldb-server/LLGSOptions.td +GENOPT= -gen-opt-parser-defs +${INCFILE}: ${TDFILE} + ${LLVM_TBLGEN} ${GENOPT} -I ${LLVM_SRCS}/include -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${TDFILE} +TGHDRS+= ${INCFILE} ${TGHDRS}: ${LLVM_TBLGEN_BIN} diff --git a/usr.bin/clang/lldb/Makefile b/usr.bin/clang/lldb/Makefile index 8b6e22de5522..b6486756d882 100644 --- a/usr.bin/clang/lldb/Makefile +++ b/usr.bin/clang/lldb/Makefile @@ -22,10 +22,13 @@ DPADD+= ${OBJTOP}/lib/clang/lib${lib}/lib${lib}.a LDADD+= ${OBJTOP}/lib/clang/lib${lib}/lib${lib}.a .endfor -Options.inc: ${LLVM_BASE}/${SRCDIR}/Options.td - ${LLVM_TBLGEN} ${LLVM_TBLGEN_OPTS} --gen-opt-parser-defs \ - -I ${LLVM_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} -TGHDRS+= Options.inc +INCFILE= Options.inc +TDFILE= ${LLVM_BASE}/${SRCDIR}/Options.td +GENOPT= -gen-opt-parser-defs +${INCFILE}: ${TDFILE} + ${LLVM_TBLGEN} ${GENOPT} -I ${LLVM_SRCS}/include -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${TDFILE} +TGHDRS+= ${INCFILE} ${TGHDRS}: ${LLVM_TBLGEN_BIN} diff --git a/usr.bin/clang/llvm-cxxfilt/Makefile b/usr.bin/clang/llvm-cxxfilt/Makefile index 168ba219cfc5..0ce39d66f0f5 100644 --- a/usr.bin/clang/llvm-cxxfilt/Makefile +++ b/usr.bin/clang/llvm-cxxfilt/Makefile @@ -13,10 +13,13 @@ CFLAGS.llvm-cxxfilt.cpp+= -Dllvm_cxxfilt_main=main CFLAGS+= -I${.OBJDIR} -Opts.inc: ${LLVM_BASE}/${SRCDIR}/Opts.td - ${LLVM_TBLGEN} ${LLVM_TBLGEN_OPTS} --gen-opt-parser-defs \ - -I ${LLVM_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} -TGHDRS+= Opts.inc +INCFILE= Opts.inc +TDFILE= ${LLVM_BASE}/${SRCDIR}/Opts.td +GENOPT= -gen-opt-parser-defs +${INCFILE}: ${TDFILE} + ${LLVM_TBLGEN} ${GENOPT} -I ${LLVM_SRCS}/include -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${TDFILE} +TGHDRS+= ${INCFILE} ${TGHDRS}: ${LLVM_TBLGEN_BIN} diff --git a/usr.bin/clang/llvm-dwarfutil/Makefile b/usr.bin/clang/llvm-dwarfutil/Makefile index fca08efcce36..6dd9bd2d5259 100644 --- a/usr.bin/clang/llvm-dwarfutil/Makefile +++ b/usr.bin/clang/llvm-dwarfutil/Makefile @@ -10,10 +10,13 @@ SRCS+= llvm-dwarfutil.cpp CFLAGS+= -I${.OBJDIR} -Options.inc: ${LLVM_BASE}/${SRCDIR}/Options.td - ${LLVM_TBLGEN} ${LLVM_TBLGEN_OPTS} --gen-opt-parser-defs \ - -I ${LLVM_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} -TGHDRS+= Options.inc +INCFILE= Options.inc +TDFILE= ${LLVM_BASE}/${SRCDIR}/Options.td +GENOPT= -gen-opt-parser-defs +${INCFILE}: ${TDFILE} + ${LLVM_TBLGEN} ${GENOPT} -I ${LLVM_SRCS}/include -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${TDFILE} +TGHDRS+= ${INCFILE} ${TGHDRS}: ${LLVM_TBLGEN_BIN} diff --git a/usr.bin/clang/llvm-nm/Makefile b/usr.bin/clang/llvm-nm/Makefile index 702a31e7da59..d3099e5a75be 100644 --- a/usr.bin/clang/llvm-nm/Makefile +++ b/usr.bin/clang/llvm-nm/Makefile @@ -11,10 +11,13 @@ SRCS+= llvm-nm.cpp CFLAGS+= -I${.OBJDIR} -Opts.inc: ${LLVM_BASE}/${SRCDIR}/Opts.td - ${LLVM_TBLGEN} ${LLVM_TBLGEN_OPTS} --gen-opt-parser-defs \ - -I ${LLVM_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} -TGHDRS+= Opts.inc +INCFILE= Opts.inc +TDFILE= ${LLVM_BASE}/${SRCDIR}/Opts.td +GENOPT= -gen-opt-parser-defs +${INCFILE}: ${TDFILE} + ${LLVM_TBLGEN} ${GENOPT} -I ${LLVM_SRCS}/include -d ${.TARGET:C/$/.d/} \ + -o ${.TARGET} ${TDFILE} +TGHDRS+= ${INCFILE} ${TGHDRS}: ${LLVM_TBLGEN_BIN} diff --git a/usr.bin/clang/llvm-objcopy/Makefile b/usr.bin/clang/llvm-objcopy/Makefile index 9077cce53b8c..5cdbf5e32d2d 100644 --- a/usr.bin/clang/llvm-objcopy/Makefile +++ b/usr.bin/clang/llvm-objcopy/Makefile @@ -17,9 +17,9 @@ CFLAGS+= -I${LLVM_BASE}/${SRCDIR} .for hdr in BitcodeStripOpts InstallNameToolOpts ObjcopyOpts StripOpts ${hdr}.inc: ${LLVM_BASE}/${SRCDIR}/${hdr}.td - ${LLVM_TBLGEN} ${LLVM_TBLGEN_OPTS} --gen-opt-parser-defs \ + ${LLVM_TBLGEN} -gen-opt-parser-defs \ -I ${LLVM_SRCS}/tools/llvm-objcopy -I ${LLVM_SRCS}/include \ - -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + -d ${.TARGET}.d -o ${.TARGET} ${LLVM_BASE}/${SRCDIR}/${hdr}.td TGHDRS+= ${hdr}.inc .endfor diff --git a/usr.bin/clang/llvm-objdump/Makefile b/usr.bin/clang/llvm-objdump/Makefile index a56457396819..b4286ffec623 100644 --- a/usr.bin/clang/llvm-objdump/Makefile +++ b/usr.bin/clang/llvm-objdump/Makefile @@ -20,9 +20,9 @@ CFLAGS+= -I${.OBJDIR} .for hdr in ObjdumpOpts OtoolOpts ${hdr}.inc: ${LLVM_BASE}/${SRCDIR}/${hdr}.td - ${LLVM_TBLGEN} ${LLVM_TBLGEN_OPTS} --gen-opt-parser-defs \ + ${LLVM_TBLGEN} -gen-opt-parser-defs \ -I ${LLVM_SRCS}/tools/llvm-objcopy -I ${LLVM_SRCS}/include \ - -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} + -d ${.TARGET}.d -o ${.TARGET} ${LLVM_BASE}/${SRCDIR}/${hdr}.td TGHDRS+= ${hdr}.inc .endfor diff --git a/usr.bin/clang/llvm-readobj/Makefile b/usr.bin/clang/llvm-readobj/Makefile index 4d9611960063..8926eb03bdbf 100644 --- a/usr.bin/clang/llvm-readobj/Makefile +++ b/usr.bin/clang/llvm-readobj/Makefile @@ -22,10 +22,13 @@ SRCS+= XCOFFDumper.cpp CFLAGS+= -I${.OBJDIR} -Opts.inc: ${LLVM_BASE}/${SRCDIR}/Opts.td - ${LLVM_TBLGEN} ${LLVM_TBLGEN_OPTS} --gen-opt-parser-defs \ - -I ${LLVM_SRCS}/include -d ${.TARGET}.d -o ${.TARGET} ${.ALLSRC} *** 77 LINES SKIPPED ***