git: 176dbfa36090 - stable/12 - Update OptionalObsoleteFiles.inc after 021385aba562

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Sat, 25 Dec 2021 11:55:58 UTC
The branch stable/12 has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=176dbfa3609021804e1c8b53aebb39f1a476277f

commit 176dbfa3609021804e1c8b53aebb39f1a476277f
Author:     Alex Richardson <arichardson@FreeBSD.org>
AuthorDate: 2021-10-11 10:46:30 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2021-12-25 11:51:27 +0000

    Update OptionalObsoleteFiles.inc after 021385aba562
    
    I forgot to update this file so make delete-old would incorrectly remove
    the newly-installed LLVM binutils. While touching the file also update
    for 8e1c989abbd1 since ObsoleteFiles.inc now inludes the tablegen binaries.
    
    Reported by:    Herbert J. Skuhra <herbert@gojira.at>
    Reviewed By:    emaste, imp
    
    Differential Revision: https://reviews.freebsd.org/D32022
    
    (cherry picked from commit 88c027338f182e2af56d0dbabd4a94fbca6f091a)
---
 ObsoleteFiles.inc                        |  1 +
 tools/build/mk/OptionalObsoleteFiles.inc | 36 ++++++++++++++++----------------
 2 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
index a6c2b78e3663..c9203fd9eb3b 100644
--- a/ObsoleteFiles.inc
+++ b/ObsoleteFiles.inc
@@ -42,6 +42,7 @@
 OLD_FILES+=usr/bin/llvm-tblgen
 OLD_FILES+=usr/bin/clang-tblgen
 OLD_FILES+=usr/bin/lldb-tblgen
+OLD_FILES+=usr/share/man/man1/llvm-tblgen.1.gz
 
 # 20211222: new clang import which bumps version from 12.0.0 to 12.0.1.
 OLD_FILES+=usr/lib/clang/12.0.0/include/cuda_wrappers/algorithm
diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc
index 4cb51c504d26..a07b12919aac 100644
--- a/tools/build/mk/OptionalObsoleteFiles.inc
+++ b/tools/build/mk/OptionalObsoleteFiles.inc
@@ -1443,18 +1443,30 @@ OLD_FILES+=usr/share/man/man8/zfsloader.8.gz
 OLD_FILES+=usr/share/man/man8/zpool.8.gz
 .endif
 
-.if ${MK_CLANG} == no
-OLD_FILES+=usr/bin/clang
-OLD_FILES+=usr/bin/clang++
-OLD_FILES+=usr/bin/clang-cpp
-OLD_FILES+=usr/bin/clang-tblgen
+.if ${MK_CLANG} == no && ${MK_LLVM_BINUTILS} == no
 OLD_FILES+=usr/bin/llvm-addr2line
 OLD_FILES+=usr/bin/llvm-ar
 OLD_FILES+=usr/bin/llvm-nm
+OLD_FILES+=usr/bin/llvm-objcopy
 OLD_FILES+=usr/bin/llvm-objdump
 OLD_FILES+=usr/bin/llvm-ranlib
+OLD_FILES+=usr/bin/llvm-size
+OLD_FILES+=usr/bin/llvm-strings
 OLD_FILES+=usr/bin/llvm-symbolizer
-OLD_FILES+=usr/bin/llvm-tblgen
+OLD_FILES+=usr/share/man/man1/llvm-addr2line.1.gz
+OLD_FILES+=usr/share/man/man1/llvm-ar.1.gz
+OLD_FILES+=usr/share/man/man1/llvm-nm.1.gz
+OLD_FILES+=usr/share/man/man1/llvm-objcopy.1.gz
+OLD_FILES+=usr/share/man/man1/llvm-ranlib.1.gz
+OLD_FILES+=usr/share/man/man1/llvm-size.1.gz
+OLD_FILES+=usr/share/man/man1/llvm-strings.1.gz
+OLD_FILES+=usr/share/man/man1/llvm-symbolizer.1.gz
+.endif
+
+.if ${MK_CLANG} == no
+OLD_FILES+=usr/bin/clang
+OLD_FILES+=usr/bin/clang++
+OLD_FILES+=usr/bin/clang-cpp
 OLD_FILES+=usr/lib/clang/12.0.1/include/cuda_wrappers/algorithm
 OLD_FILES+=usr/lib/clang/12.0.1/include/cuda_wrappers/complex
 OLD_FILES+=usr/lib/clang/12.0.1/include/cuda_wrappers/new
@@ -1753,12 +1765,6 @@ OLD_DIRS+=usr/share/doc/llvm
 OLD_FILES+=usr/share/man/man1/clang.1.gz
 OLD_FILES+=usr/share/man/man1/clang++.1.gz
 OLD_FILES+=usr/share/man/man1/clang-cpp.1.gz
-OLD_FILES+=usr/share/man/man1/llvm-addr2line.1.gz
-OLD_FILES+=usr/share/man/man1/llvm-ar.1.gz
-OLD_FILES+=usr/share/man/man1/llvm-nm.1.gz
-OLD_FILES+=usr/share/man/man1/llvm-ranlib.1.gz
-OLD_FILES+=usr/share/man/man1/llvm-symbolizer.1.gz
-OLD_FILES+=usr/share/man/man1/llvm-tblgen.1.gz
 .endif
 
 .if ${MK_CLANG_EXTRAS} == no
@@ -1779,11 +1785,8 @@ OLD_FILES+=usr/bin/llvm-lto2
 OLD_FILES+=usr/bin/llvm-mc
 OLD_FILES+=usr/bin/llvm-mca
 OLD_FILES+=usr/bin/llvm-modextract
-OLD_FILES+=usr/bin/llvm-objcopy
 OLD_FILES+=usr/bin/llvm-pdbutil
 OLD_FILES+=usr/bin/llvm-rtdyld
-OLD_FILES+=usr/bin/llvm-size
-OLD_FILES+=usr/bin/llvm-strings
 OLD_FILES+=usr/bin/llvm-xray
 OLD_FILES+=usr/bin/opt
 OLD_FILES+=usr/share/man/man1/bugpoint.1.gz
@@ -1796,10 +1799,7 @@ OLD_FILES+=usr/share/man/man1/llvm-dis.1.gz
 OLD_FILES+=usr/share/man/man1/llvm-dwarfdump.1
 OLD_FILES+=usr/share/man/man1/llvm-extract.1.gz
 OLD_FILES+=usr/share/man/man1/llvm-link.1.gz
-OLD_FILES+=usr/share/man/man1/llvm-objcopy.1.gz
 OLD_FILES+=usr/share/man/man1/llvm-pdbutil.1.gz
-OLD_FILES+=usr/share/man/man1/llvm-size.1.gz
-OLD_FILES+=usr/share/man/man1/llvm-strings.1.gz
 OLD_FILES+=usr/share/man/man1/opt.1.gz
 .endif