git: ad81b9ee3db9 - stable/13 - Revert "Ensure .inc files are regenerated when llvm/clang tblgen binaries change"
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 09 Apr 2023 14:42:35 UTC
The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=ad81b9ee3db95f874bc6bfec91fc8eff2404a39f commit ad81b9ee3db95f874bc6bfec91fc8eff2404a39f Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2023-03-29 18:37:02 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2023-04-09 14:40:09 +0000 Revert "Ensure .inc files are regenerated when llvm/clang tblgen binaries change" This reverts commit ab80f0b21fbb9c44d40e6f7a99090188f4ed2f71. 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: ab80f0b21fbb (cherry picked from commit 4dc3b1fa1bbcf20f7713d94776a1604964ada32b) --- lib/clang/clang.pre.mk | 1 - lib/clang/headers/Makefile | 2 -- lib/clang/libclang/Makefile | 22 +++++++--------------- lib/clang/liblldb/Makefile | 3 --- lib/clang/libllvm/Makefile | 2 -- lib/clang/llvm.pre.mk | 1 - usr.bin/clang/lld/Makefile | 2 -- usr.bin/clang/lldb-server/Makefile | 2 -- usr.bin/clang/lldb/Makefile | 2 -- usr.bin/clang/llvm-cxxfilt/Makefile | 2 -- usr.bin/clang/llvm-nm/Makefile | 2 -- usr.bin/clang/llvm-objcopy/Makefile | 2 -- usr.bin/clang/llvm-objdump/Makefile | 2 -- usr.bin/clang/llvm-readobj/Makefile | 2 -- usr.bin/clang/llvm-size/Makefile | 2 -- usr.bin/clang/llvm-strings/Makefile | 2 -- usr.bin/clang/llvm-symbolizer/Makefile | 2 -- 17 files changed, 7 insertions(+), 46 deletions(-) diff --git a/lib/clang/clang.pre.mk b/lib/clang/clang.pre.mk index 9ef401645f14..520a9300e6ce 100644 --- a/lib/clang/clang.pre.mk +++ b/lib/clang/clang.pre.mk @@ -5,4 +5,3 @@ CLANG_SRCS= ${LLVM_BASE}/clang CLANG_TBLGEN?= clang-tblgen -CLANG_TBLGEN_BIN!= which ${CLANG_TBLGEN} diff --git a/lib/clang/headers/Makefile b/lib/clang/headers/Makefile index c4643e9353e6..80a1250f6366 100644 --- a/lib/clang/headers/Makefile +++ b/lib/clang/headers/Makefile @@ -200,8 +200,6 @@ riscv_${hdr:H}.h: ${CLANG_SRCS}/include/clang/Basic/riscv_${hdr:H}.td GENINCS+= riscv_${hdr:H}.h .endfor -${GENINCS}: ${CLANG_TBLGEN_BIN} - CLEANFILES= ${GENINCS} ${GENINCS:C/$/.d/} .include <bsd.prog.mk> diff --git a/lib/clang/libclang/Makefile b/lib/clang/libclang/Makefile index cdffedfe3d36..a2612bc9d894 100644 --- a/lib/clang/libclang/Makefile +++ b/lib/clang/libclang/Makefile @@ -1010,6 +1010,13 @@ clang/Basic/riscv_vector_builtin_cg.inc: \ -o ${.TARGET} ${CLANG_SRCS}/include/clang/Basic/riscv_vector.td TGHDRS+= clang/Basic/riscv_vector_builtin_cg.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_SRCS}/include/clang/Basic/Attr.td ${CLANG_TBLGEN} -gen-clang-attr-parser-string-switches \ @@ -1087,25 +1094,10 @@ OpenCLBuiltins.inc: ${CLANG_SRCS}/lib/Sema/OpenCLBuiltins.td ${CLANG_SRCS}/lib/Sema/OpenCLBuiltins.td TGHDRS+= OpenCLBuiltins.inc -${TGHDRS}: ${CLANG_TBLGEN_BIN} - DEPENDFILES+= ${TGHDRS:C/$/.d/} DPSRCS+= ${TGHDRS} 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" INTERNALLIB= diff --git a/lib/clang/liblldb/Makefile b/lib/clang/liblldb/Makefile index dbf9c6d696e7..28778cb04c57 100644 --- a/lib/clang/liblldb/Makefile +++ b/lib/clang/liblldb/Makefile @@ -693,7 +693,6 @@ SRCS+= Utility/VMRange.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} -gen-lldb-option-defs \ @@ -721,8 +720,6 @@ ${path:T}PropertiesEnum.inc: ${LLDB_SRCS}/source/${path}Properties.td TGHDRS+= ${path:T}PropertiesEnum.inc .endfor -${TGHDRS}: ${LLDB_TBLGEN_BIN} - DPSRCS+= ${TGHDRS} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} diff --git a/lib/clang/libllvm/Makefile b/lib/clang/libllvm/Makefile index ef9d87dd7d2f..868f9aa48964 100644 --- a/lib/clang/libllvm/Makefile +++ b/lib/clang/libllvm/Makefile @@ -2026,8 +2026,6 @@ TGHDRS+= X86GenRegisterInfo.inc TGHDRS+= X86GenSubtargetInfo.inc .endif # MK_LLVM_TARGET_X86 -${TGHDRS}: ${LLVM_TBLGEN_BIN} - DEPENDFILES+= ${TGHDRS:C/$/.d/} DPSRCS+= ${TGHDRS} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} diff --git a/lib/clang/llvm.pre.mk b/lib/clang/llvm.pre.mk index 92124a7bf092..774d7d47ea37 100644 --- a/lib/clang/llvm.pre.mk +++ b/lib/clang/llvm.pre.mk @@ -5,4 +5,3 @@ LLVM_BASE= ${SRCTOP}/contrib/llvm-project LLVM_SRCS= ${LLVM_BASE}/llvm 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 1113072e4e9d..9f114dbb81bf 100644 --- a/usr.bin/clang/lld/Makefile +++ b/usr.bin/clang/lld/Makefile @@ -95,8 +95,6 @@ ${INCFILE}: ${TDFILE} -o ${.TARGET} ${TDFILE} TGHDRS+= ${INCFILE} -${TGHDRS}: ${LLVM_TBLGEN_BIN} - DEPENDFILES+= ${TGHDRS:C/$/.d/} DPSRCS+= ${TGHDRS} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} diff --git a/usr.bin/clang/lldb-server/Makefile b/usr.bin/clang/lldb-server/Makefile index efe8529f3611..9c3883984618 100644 --- a/usr.bin/clang/lldb-server/Makefile +++ b/usr.bin/clang/lldb-server/Makefile @@ -37,8 +37,6 @@ ${INCFILE}: ${TDFILE} -o ${.TARGET} ${TDFILE} TGHDRS+= ${INCFILE} -${TGHDRS}: ${LLVM_TBLGEN_BIN} - DEPENDFILES+= ${TGHDRS:C/$/.d/} DPSRCS+= ${TGHDRS} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} diff --git a/usr.bin/clang/lldb/Makefile b/usr.bin/clang/lldb/Makefile index 8e160b18eaa5..10ffd3b90057 100644 --- a/usr.bin/clang/lldb/Makefile +++ b/usr.bin/clang/lldb/Makefile @@ -30,8 +30,6 @@ ${INCFILE}: ${TDFILE} -o ${.TARGET} ${TDFILE} TGHDRS+= ${INCFILE} -${TGHDRS}: ${LLVM_TBLGEN_BIN} - DEPENDFILES+= ${TGHDRS:C/$/.d/} DPSRCS+= ${TGHDRS} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} diff --git a/usr.bin/clang/llvm-cxxfilt/Makefile b/usr.bin/clang/llvm-cxxfilt/Makefile index 073316b7b4a7..a61e32db9aa7 100644 --- a/usr.bin/clang/llvm-cxxfilt/Makefile +++ b/usr.bin/clang/llvm-cxxfilt/Makefile @@ -19,8 +19,6 @@ ${INCFILE}: ${TDFILE} -o ${.TARGET} ${TDFILE} TGHDRS+= ${INCFILE} -${TGHDRS}: ${LLVM_TBLGEN_BIN} - DEPENDFILES+= ${TGHDRS:C/$/.d/} DPSRCS+= ${TGHDRS} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} diff --git a/usr.bin/clang/llvm-nm/Makefile b/usr.bin/clang/llvm-nm/Makefile index d3099e5a75be..0df48744632d 100644 --- a/usr.bin/clang/llvm-nm/Makefile +++ b/usr.bin/clang/llvm-nm/Makefile @@ -19,8 +19,6 @@ ${INCFILE}: ${TDFILE} -o ${.TARGET} ${TDFILE} TGHDRS+= ${INCFILE} -${TGHDRS}: ${LLVM_TBLGEN_BIN} - DEPENDFILES+= ${TGHDRS:C/$/.d/} DPSRCS+= ${TGHDRS} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} diff --git a/usr.bin/clang/llvm-objcopy/Makefile b/usr.bin/clang/llvm-objcopy/Makefile index 995a8b461344..80aa29949edf 100644 --- a/usr.bin/clang/llvm-objcopy/Makefile +++ b/usr.bin/clang/llvm-objcopy/Makefile @@ -36,8 +36,6 @@ ${hdr}.inc: ${LLVM_BASE}/${SRCDIR}/${hdr}.td TGHDRS+= ${hdr}.inc .endfor -${TGHDRS}: ${LLVM_TBLGEN_BIN} - DEPENDFILES+= ${TGHDRS:C/$/.d/} DPSRCS+= ${TGHDRS} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} diff --git a/usr.bin/clang/llvm-objdump/Makefile b/usr.bin/clang/llvm-objdump/Makefile index fc81304ddb1a..44d8c7f82e33 100644 --- a/usr.bin/clang/llvm-objdump/Makefile +++ b/usr.bin/clang/llvm-objdump/Makefile @@ -25,8 +25,6 @@ ${hdr}.inc: ${LLVM_BASE}/${SRCDIR}/${hdr}.td TGHDRS+= ${hdr}.inc .endfor -${TGHDRS}: ${LLVM_TBLGEN_BIN} - DEPENDFILES+= ${TGHDRS:C/$/.d/} DPSRCS+= ${TGHDRS} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} diff --git a/usr.bin/clang/llvm-readobj/Makefile b/usr.bin/clang/llvm-readobj/Makefile index 8926eb03bdbf..4b547d81c583 100644 --- a/usr.bin/clang/llvm-readobj/Makefile +++ b/usr.bin/clang/llvm-readobj/Makefile @@ -30,8 +30,6 @@ ${INCFILE}: ${TDFILE} -o ${.TARGET} ${TDFILE} TGHDRS+= ${INCFILE} -${TGHDRS}: ${LLVM_TBLGEN_BIN} - DEPENDFILES+= ${TGHDRS:C/$/.d/} DPSRCS+= ${TGHDRS} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} diff --git a/usr.bin/clang/llvm-size/Makefile b/usr.bin/clang/llvm-size/Makefile index f39e5db6f872..20bd5de61192 100644 --- a/usr.bin/clang/llvm-size/Makefile +++ b/usr.bin/clang/llvm-size/Makefile @@ -19,8 +19,6 @@ ${INCFILE}: ${TDFILE} -o ${.TARGET} ${TDFILE} TGHDRS+= ${INCFILE} -${TGHDRS}: ${LLVM_TBLGEN_BIN} - DEPENDFILES+= ${TGHDRS:C/$/.d/} DPSRCS+= ${TGHDRS} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} diff --git a/usr.bin/clang/llvm-strings/Makefile b/usr.bin/clang/llvm-strings/Makefile index 253766ba084d..1438aa847997 100644 --- a/usr.bin/clang/llvm-strings/Makefile +++ b/usr.bin/clang/llvm-strings/Makefile @@ -17,8 +17,6 @@ ${INCFILE}: ${TDFILE} -o ${.TARGET} ${TDFILE} TGHDRS+= ${INCFILE} -${TGHDRS}: ${LLVM_TBLGEN_BIN} - DEPENDFILES+= ${TGHDRS:C/$/.d/} DPSRCS+= ${TGHDRS} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/} diff --git a/usr.bin/clang/llvm-symbolizer/Makefile b/usr.bin/clang/llvm-symbolizer/Makefile index ae417356df6b..c4677169f912 100644 --- a/usr.bin/clang/llvm-symbolizer/Makefile +++ b/usr.bin/clang/llvm-symbolizer/Makefile @@ -20,8 +20,6 @@ ${INCFILE}: ${TDFILE} -o ${.TARGET} ${TDFILE} TGHDRS+= ${INCFILE} -${TGHDRS}: ${LLVM_TBLGEN_BIN} - DEPENDFILES+= ${TGHDRS:C/$/.d/} DPSRCS+= ${TGHDRS} CLEANFILES+= ${TGHDRS} ${TGHDRS:C/$/.d/}