Revert "Ensure .inc files are regenerated when llvm/clang tblgen binaries change"

This reverts commit ab80f0b21f. The intent
of this change was to avoid possible compilation errors when certain
.inc files were not regenerated, but the method turns out to cause way
more rebuilds than anticipated. Another method will have to be found,
and in the mean time, WITH_CLEAN is the solution that always works.

Fixes:		ab80f0b21f
This commit is contained in:
Dimitry Andric 2023-03-29 20:37:02 +02:00
parent d8ed7fa3d5
commit 4dc3b1fa1b
18 changed files with 7 additions and 48 deletions

View File

@ -5,4 +5,3 @@
CLANG_SRCS= ${LLVM_BASE}/clang CLANG_SRCS= ${LLVM_BASE}/clang
CLANG_TBLGEN?= clang-tblgen CLANG_TBLGEN?= clang-tblgen
CLANG_TBLGEN_BIN!= which ${CLANG_TBLGEN}

View File

@ -214,8 +214,6 @@ riscv_${hdr:H}.h: ${CLANG_SRCS}/include/clang/Basic/riscv_${hdr:H}.td
GENINCS+= riscv_${hdr:H}.h GENINCS+= riscv_${hdr:H}.h
.endfor .endfor
${GENINCS}: ${CLANG_TBLGEN_BIN}
CLEANFILES= ${GENINCS} ${GENINCS:C/$/.d/} CLEANFILES= ${GENINCS} ${GENINCS:C/$/.d/}
.include <bsd.prog.mk> .include <bsd.prog.mk>

View File

@ -1037,6 +1037,13 @@ clang/Basic/riscv_vector_builtin_sema.inc: \
-o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/riscv_vector.td -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/riscv_vector.td
TGHDRS+= clang/Basic/riscv_vector_builtin_sema.inc TGHDRS+= clang/Basic/riscv_vector_builtin_sema.inc
clang/Driver/Options.inc: ${CLANG_SRCS}/include/clang/Driver/Options.td
${LLVM_TBLGEN} -gen-opt-parser-defs \
-I ${LLVM_SRCS}/include -I ${CLANG_SRCS}/include/clang/Driver \
-d ${.TARGET:C/$/.d/} -o ${.TARGET} \
${CLANG_SRCS}/include/clang/Driver/Options.td
TGHDRS+= clang/Driver/Options.inc
clang/Parse/AttrParserStringSwitches.inc: \ clang/Parse/AttrParserStringSwitches.inc: \
${CLANG_SRCS}/include/clang/Basic/Attr.td ${CLANG_SRCS}/include/clang/Basic/Attr.td
${CLANG_TBLGEN} -gen-clang-attr-parser-string-switches \ ${CLANG_TBLGEN} -gen-clang-attr-parser-string-switches \
@ -1114,25 +1121,10 @@ OpenCLBuiltins.inc: ${CLANG_SRCS}/lib/Sema/OpenCLBuiltins.td
${CLANG_SRCS}/lib/Sema/OpenCLBuiltins.td ${CLANG_SRCS}/lib/Sema/OpenCLBuiltins.td
TGHDRS+= OpenCLBuiltins.inc TGHDRS+= OpenCLBuiltins.inc
${TGHDRS}: ${CLANG_TBLGEN_BIN}
DEPENDFILES+= ${TGHDRS:C/$/.d/} DEPENDFILES+= ${TGHDRS:C/$/.d/}
DPSRCS+= ${TGHDRS} DPSRCS+= ${TGHDRS}
CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/}
clang/Driver/Options.inc: ${CLANG_SRCS}/include/clang/Driver/Options.td
${LLVM_TBLGEN} -gen-opt-parser-defs \
-I ${LLVM_SRCS}/include -I ${CLANG_SRCS}/include/clang/Driver \
-d ${.TARGET:C/$/.d/} -o ${.TARGET} \
${CLANG_SRCS}/include/clang/Driver/Options.td
LTGHDRS+= clang/Driver/Options.inc
${LTGHDRS}: ${LLVM_TBLGEN_BIN}
DEPENDFILES+= ${LTGHDRS:C/$/.d/}
DPSRCS+= ${LTGHDRS}
CLEANFILES+= ${LTGHDRS} ${LTGHDRS:C/$/.d/}
.include "../clang.build.mk" .include "../clang.build.mk"
INTERNALLIB= INTERNALLIB=

View File

@ -701,7 +701,6 @@ SRCS+= Utility/XcodeSDK.cpp
SRCS+= Version/Version.cpp SRCS+= Version/Version.cpp
LLDB_TBLGEN?= lldb-tblgen LLDB_TBLGEN?= lldb-tblgen
LLDB_TBLGEN_BIN!= which ${LLDB_TBLGEN}
CommandOptions.inc: ${LLDB_SRCS}/source/Commands/Options.td CommandOptions.inc: ${LLDB_SRCS}/source/Commands/Options.td
${LLDB_TBLGEN} -gen-lldb-option-defs \ ${LLDB_TBLGEN} -gen-lldb-option-defs \
@ -729,8 +728,6 @@ ${path:T}PropertiesEnum.inc: ${LLDB_SRCS}/source/${path}Properties.td
TGHDRS+= ${path:T}PropertiesEnum.inc TGHDRS+= ${path:T}PropertiesEnum.inc
.endfor .endfor
${TGHDRS}: ${LLDB_TBLGEN_BIN}
DPSRCS+= ${TGHDRS} DPSRCS+= ${TGHDRS}
CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/}

View File

@ -2128,8 +2128,6 @@ TGHDRS+= X86GenRegisterInfo.inc
TGHDRS+= X86GenSubtargetInfo.inc TGHDRS+= X86GenSubtargetInfo.inc
.endif # MK_LLVM_TARGET_X86 .endif # MK_LLVM_TARGET_X86
${TGHDRS}: ${LLVM_TBLGEN_BIN}
DEPENDFILES+= ${TGHDRS:C/$/.d/} DEPENDFILES+= ${TGHDRS:C/$/.d/}
DPSRCS+= ${TGHDRS} DPSRCS+= ${TGHDRS}
CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/}

View File

@ -5,4 +5,3 @@ LLVM_BASE= ${SRCTOP}/contrib/llvm-project
LLVM_SRCS= ${LLVM_BASE}/llvm LLVM_SRCS= ${LLVM_BASE}/llvm
LLVM_TBLGEN?= llvm-tblgen LLVM_TBLGEN?= llvm-tblgen
LLVM_TBLGEN_BIN!= which ${LLVM_TBLGEN}

View File

@ -95,8 +95,6 @@ ${INCFILE}: ${TDFILE}
-o ${.TARGET} ${TDFILE} -o ${.TARGET} ${TDFILE}
TGHDRS+= ${INCFILE} TGHDRS+= ${INCFILE}
${TGHDRS}: ${LLVM_TBLGEN_BIN}
DEPENDFILES+= ${TGHDRS:C/$/.d/} DEPENDFILES+= ${TGHDRS:C/$/.d/}
DPSRCS+= ${TGHDRS} DPSRCS+= ${TGHDRS}
CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/}

View File

@ -37,8 +37,6 @@ ${INCFILE}: ${TDFILE}
-o ${.TARGET} ${TDFILE} -o ${.TARGET} ${TDFILE}
TGHDRS+= ${INCFILE} TGHDRS+= ${INCFILE}
${TGHDRS}: ${LLVM_TBLGEN_BIN}
DEPENDFILES+= ${TGHDRS:C/$/.d/} DEPENDFILES+= ${TGHDRS:C/$/.d/}
DPSRCS+= ${TGHDRS} DPSRCS+= ${TGHDRS}
CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/}

View File

@ -30,8 +30,6 @@ ${INCFILE}: ${TDFILE}
-o ${.TARGET} ${TDFILE} -o ${.TARGET} ${TDFILE}
TGHDRS+= ${INCFILE} TGHDRS+= ${INCFILE}
${TGHDRS}: ${LLVM_TBLGEN_BIN}
DEPENDFILES+= ${TGHDRS:C/$/.d/} DEPENDFILES+= ${TGHDRS:C/$/.d/}
DPSRCS+= ${TGHDRS} DPSRCS+= ${TGHDRS}
CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/}

View File

@ -21,8 +21,6 @@ ${INCFILE}: ${TDFILE}
-o ${.TARGET} ${TDFILE} -o ${.TARGET} ${TDFILE}
TGHDRS+= ${INCFILE} TGHDRS+= ${INCFILE}
${TGHDRS}: ${LLVM_TBLGEN_BIN}
DEPENDFILES+= ${TGHDRS:C/$/.d/} DEPENDFILES+= ${TGHDRS:C/$/.d/}
DPSRCS+= ${TGHDRS} DPSRCS+= ${TGHDRS}
CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/}

View File

@ -18,8 +18,6 @@ ${INCFILE}: ${TDFILE}
-o ${.TARGET} ${TDFILE} -o ${.TARGET} ${TDFILE}
TGHDRS+= ${INCFILE} TGHDRS+= ${INCFILE}
${TGHDRS}: ${LLVM_TBLGEN_BIN}
DEPENDFILES+= ${TGHDRS:C/$/.d/} DEPENDFILES+= ${TGHDRS:C/$/.d/}
DPSRCS+= ${TGHDRS} DPSRCS+= ${TGHDRS}
CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/}

View File

@ -19,8 +19,6 @@ ${INCFILE}: ${TDFILE}
-o ${.TARGET} ${TDFILE} -o ${.TARGET} ${TDFILE}
TGHDRS+= ${INCFILE} TGHDRS+= ${INCFILE}
${TGHDRS}: ${LLVM_TBLGEN_BIN}
DEPENDFILES+= ${TGHDRS:C/$/.d/} DEPENDFILES+= ${TGHDRS:C/$/.d/}
DPSRCS+= ${TGHDRS} DPSRCS+= ${TGHDRS}
CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/}

View File

@ -23,8 +23,6 @@ ${hdr}.inc: ${LLVM_BASE}/${SRCDIR}/${hdr}.td
TGHDRS+= ${hdr}.inc TGHDRS+= ${hdr}.inc
.endfor .endfor
${TGHDRS}: ${LLVM_TBLGEN_BIN}
DEPENDFILES+= ${TGHDRS:C/$/.d/} DEPENDFILES+= ${TGHDRS:C/$/.d/}
DPSRCS+= ${TGHDRS} DPSRCS+= ${TGHDRS}
CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/}

View File

@ -26,8 +26,6 @@ ${hdr}.inc: ${LLVM_BASE}/${SRCDIR}/${hdr}.td
TGHDRS+= ${hdr}.inc TGHDRS+= ${hdr}.inc
.endfor .endfor
${TGHDRS}: ${LLVM_TBLGEN_BIN}
DEPENDFILES+= ${TGHDRS:C/$/.d/} DEPENDFILES+= ${TGHDRS:C/$/.d/}
DPSRCS+= ${TGHDRS} DPSRCS+= ${TGHDRS}
CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/}

View File

@ -30,8 +30,6 @@ ${INCFILE}: ${TDFILE}
-o ${.TARGET} ${TDFILE} -o ${.TARGET} ${TDFILE}
TGHDRS+= ${INCFILE} TGHDRS+= ${INCFILE}
${TGHDRS}: ${LLVM_TBLGEN_BIN}
DEPENDFILES+= ${TGHDRS:C/$/.d/} DEPENDFILES+= ${TGHDRS:C/$/.d/}
DPSRCS+= ${TGHDRS} DPSRCS+= ${TGHDRS}
CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/}

View File

@ -19,8 +19,6 @@ ${INCFILE}: ${TDFILE}
-o ${.TARGET} ${TDFILE} -o ${.TARGET} ${TDFILE}
TGHDRS+= ${INCFILE} TGHDRS+= ${INCFILE}
${TGHDRS}: ${LLVM_TBLGEN_BIN}
DEPENDFILES+= ${TGHDRS:C/$/.d/} DEPENDFILES+= ${TGHDRS:C/$/.d/}
DPSRCS+= ${TGHDRS} DPSRCS+= ${TGHDRS}
CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/}

View File

@ -17,8 +17,6 @@ ${INCFILE}: ${TDFILE}
-o ${.TARGET} ${TDFILE} -o ${.TARGET} ${TDFILE}
TGHDRS+= ${INCFILE} TGHDRS+= ${INCFILE}
${TGHDRS}: ${LLVM_TBLGEN_BIN}
DEPENDFILES+= ${TGHDRS:C/$/.d/} DEPENDFILES+= ${TGHDRS:C/$/.d/}
DPSRCS+= ${TGHDRS} DPSRCS+= ${TGHDRS}
CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/}

View File

@ -20,8 +20,6 @@ ${INCFILE}: ${TDFILE}
-o ${.TARGET} ${TDFILE} -o ${.TARGET} ${TDFILE}
TGHDRS+= ${INCFILE} TGHDRS+= ${INCFILE}
${TGHDRS}: ${LLVM_TBLGEN_BIN}
DEPENDFILES+= ${TGHDRS:C/$/.d/} DEPENDFILES+= ${TGHDRS:C/$/.d/}
DPSRCS+= ${TGHDRS} DPSRCS+= ${TGHDRS}
CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/}