git: 0c3af23961e1 - main - Add missing sources to libclang_rt Makefiles, clean up unneeded ones

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Wed, 20 Dec 2023 16:13:09 UTC
The branch main has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=0c3af23961e170538f375c392b043903c1397780

commit 0c3af23961e170538f375c392b043903c1397780
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2023-12-20 16:08:26 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2023-12-20 16:08:26 +0000

    Add missing sources to libclang_rt Makefiles, clean up unneeded ones
    
    During the llvm-17 merge, a few new source files were not added to the
    libclang_rt Makefiles, in particular sanitizer_thread_arg_retval.cpp
    which is now required for AddressSanitizer and MemorySanitizer. Also,
    MemorySanitizer now requires msan_dl.cpp.
    
    While here, clean out a number of source files that compile into nothing
    (because they only contain non-FreeBSD parts). Also, remove a duplicated
    instance of tsan_new_delete.cpp from libclang_rt.tsan, since it is only
    supposed to live in libclang_rt.tsan_cxx.
    
    PR:             275854
    Reported by:    jbeich
    MFC after:      1 month
---
 lib/libclang_rt/asan/Makefile             | 3 +--
 lib/libclang_rt/asan_dynamic/Makefile     | 3 +--
 lib/libclang_rt/cfi/Makefile              | 2 +-
 lib/libclang_rt/cfi_diag/Makefile         | 2 +-
 lib/libclang_rt/dd/Makefile               | 2 +-
 lib/libclang_rt/msan/Makefile             | 3 ++-
 lib/libclang_rt/safestack/Makefile        | 1 -
 lib/libclang_rt/stats/Makefile            | 1 +
 lib/libclang_rt/tsan/Makefile             | 3 ---
 lib/libclang_rt/ubsan_standalone/Makefile | 2 +-
 lib/libclang_rt/xray/Makefile             | 1 +
 11 files changed, 10 insertions(+), 13 deletions(-)

diff --git a/lib/libclang_rt/asan/Makefile b/lib/libclang_rt/asan/Makefile
index 02b5471afc91..6156371241da 100644
--- a/lib/libclang_rt/asan/Makefile
+++ b/lib/libclang_rt/asan/Makefile
@@ -19,7 +19,6 @@ SRCS+=		asan/asan_memory_profile.cpp
 SRCS+=		asan/asan_poisoning.cpp
 SRCS+=		asan/asan_posix.cpp
 SRCS+=		asan/asan_preinit.cpp
-SRCS+=		asan/asan_premap_shadow.cpp
 SRCS+=		asan/asan_report.cpp
 SRCS+=		asan/asan_rtl.cpp
 SRCS+=		asan/asan_shadow_setup.cpp
@@ -28,7 +27,6 @@ SRCS+=		asan/asan_stats.cpp
 SRCS+=		asan/asan_suppressions.cpp
 SRCS+=		asan/asan_thread.cpp
 SRCS+=		interception/interception_linux.cpp
-SRCS+=		interception/interception_type_test.cpp
 SRCS+=		sanitizer_common/sancov_flags.cpp
 SRCS+=		sanitizer_common/sanitizer_allocator.cpp
 SRCS+=		sanitizer_common/sanitizer_allocator_checks.cpp
@@ -66,6 +64,7 @@ SRCS+=		sanitizer_common/sanitizer_symbolizer_libcdep.cpp
 SRCS+=		sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp
 SRCS+=		sanitizer_common/sanitizer_symbolizer_report.cpp
 SRCS+=		sanitizer_common/sanitizer_termination.cpp
+SRCS+=		sanitizer_common/sanitizer_thread_arg_retval.cpp
 SRCS+=		sanitizer_common/sanitizer_thread_registry.cpp
 SRCS+=		sanitizer_common/sanitizer_tls_get_addr.cpp
 SRCS+=		sanitizer_common/sanitizer_type_traits.cpp
diff --git a/lib/libclang_rt/asan_dynamic/Makefile b/lib/libclang_rt/asan_dynamic/Makefile
index 81b68d883ecc..1ba9840946b6 100644
--- a/lib/libclang_rt/asan_dynamic/Makefile
+++ b/lib/libclang_rt/asan_dynamic/Makefile
@@ -22,7 +22,6 @@ SRCS+=		asan/asan_memory_profile.cpp
 SRCS+=		asan/asan_poisoning.cpp
 SRCS+=		asan/asan_posix.cpp
 SRCS+=		asan/asan_preinit.cpp
-SRCS+=		asan/asan_premap_shadow.cpp
 SRCS+=		asan/asan_report.cpp
 SRCS+=		asan/asan_rtl.cpp
 SRCS+=		asan/asan_shadow_setup.cpp
@@ -31,7 +30,6 @@ SRCS+=		asan/asan_stats.cpp
 SRCS+=		asan/asan_suppressions.cpp
 SRCS+=		asan/asan_thread.cpp
 SRCS+=		interception/interception_linux.cpp
-SRCS+=		interception/interception_type_test.cpp
 SRCS+=		sanitizer_common/sancov_flags.cpp
 SRCS+=		sanitizer_common/sanitizer_allocator.cpp
 SRCS+=		sanitizer_common/sanitizer_allocator_checks.cpp
@@ -69,6 +67,7 @@ SRCS+=		sanitizer_common/sanitizer_symbolizer_libcdep.cpp
 SRCS+=		sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp
 SRCS+=		sanitizer_common/sanitizer_symbolizer_report.cpp
 SRCS+=		sanitizer_common/sanitizer_termination.cpp
+SRCS+=		sanitizer_common/sanitizer_thread_arg_retval.cpp
 SRCS+=		sanitizer_common/sanitizer_thread_registry.cpp
 SRCS+=		sanitizer_common/sanitizer_tls_get_addr.cpp
 SRCS+=		sanitizer_common/sanitizer_type_traits.cpp
diff --git a/lib/libclang_rt/cfi/Makefile b/lib/libclang_rt/cfi/Makefile
index 85db642fdab8..604c3cd9a593 100644
--- a/lib/libclang_rt/cfi/Makefile
+++ b/lib/libclang_rt/cfi/Makefile
@@ -5,7 +5,6 @@ LIB=		clang_rt.cfi-${CRTARCH}
 
 SRCS+=		cfi/cfi.cpp
 SRCS+=		interception/interception_linux.cpp
-SRCS+=		interception/interception_type_test.cpp
 SRCS+=		sanitizer_common/sanitizer_allocator.cpp
 SRCS+=		sanitizer_common/sanitizer_allocator_checks.cpp
 SRCS+=		sanitizer_common/sanitizer_common.cpp
@@ -29,6 +28,7 @@ SRCS+=		sanitizer_common/sanitizer_procmaps_bsd.cpp
 SRCS+=		sanitizer_common/sanitizer_procmaps_common.cpp
 SRCS+=		sanitizer_common/sanitizer_suppressions.cpp
 SRCS+=		sanitizer_common/sanitizer_termination.cpp
+SRCS+=		sanitizer_common/sanitizer_thread_arg_retval.cpp
 SRCS+=		sanitizer_common/sanitizer_thread_registry.cpp
 SRCS+=		sanitizer_common/sanitizer_tls_get_addr.cpp
 SRCS+=		sanitizer_common/sanitizer_type_traits.cpp
diff --git a/lib/libclang_rt/cfi_diag/Makefile b/lib/libclang_rt/cfi_diag/Makefile
index b2a0b5b7a38f..4f4bb9472bb7 100644
--- a/lib/libclang_rt/cfi_diag/Makefile
+++ b/lib/libclang_rt/cfi_diag/Makefile
@@ -5,7 +5,6 @@ LIB=		clang_rt.cfi_diag-${CRTARCH}
 
 SRCS+=		cfi/cfi.cpp
 SRCS+=		interception/interception_linux.cpp
-SRCS+=		interception/interception_type_test.cpp
 SRCS+=		sanitizer_common/sancov_flags.cpp
 SRCS+=		sanitizer_common/sanitizer_allocator.cpp
 SRCS+=		sanitizer_common/sanitizer_allocator_checks.cpp
@@ -43,6 +42,7 @@ SRCS+=		sanitizer_common/sanitizer_symbolizer_libcdep.cpp
 SRCS+=		sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp
 SRCS+=		sanitizer_common/sanitizer_symbolizer_report.cpp
 SRCS+=		sanitizer_common/sanitizer_termination.cpp
+SRCS+=		sanitizer_common/sanitizer_thread_arg_retval.cpp
 SRCS+=		sanitizer_common/sanitizer_thread_registry.cpp
 SRCS+=		sanitizer_common/sanitizer_tls_get_addr.cpp
 SRCS+=		sanitizer_common/sanitizer_type_traits.cpp
diff --git a/lib/libclang_rt/dd/Makefile b/lib/libclang_rt/dd/Makefile
index 80ae9037cfe6..80ed7e497797 100644
--- a/lib/libclang_rt/dd/Makefile
+++ b/lib/libclang_rt/dd/Makefile
@@ -4,7 +4,6 @@
 LIB=		clang_rt.dd-${CRTARCH}
 
 SRCS+=		interception/interception_linux.cpp
-SRCS+=		interception/interception_type_test.cpp
 SRCS+=		sanitizer_common/sanitizer_allocator.cpp
 SRCS+=		sanitizer_common/sanitizer_allocator_checks.cpp
 SRCS+=		sanitizer_common/sanitizer_common.cpp
@@ -28,6 +27,7 @@ SRCS+=		sanitizer_common/sanitizer_procmaps_bsd.cpp
 SRCS+=		sanitizer_common/sanitizer_procmaps_common.cpp
 SRCS+=		sanitizer_common/sanitizer_suppressions.cpp
 SRCS+=		sanitizer_common/sanitizer_termination.cpp
+SRCS+=		sanitizer_common/sanitizer_thread_arg_retval.cpp
 SRCS+=		sanitizer_common/sanitizer_thread_registry.cpp
 SRCS+=		sanitizer_common/sanitizer_tls_get_addr.cpp
 SRCS+=		sanitizer_common/sanitizer_type_traits.cpp
diff --git a/lib/libclang_rt/msan/Makefile b/lib/libclang_rt/msan/Makefile
index 2771ac578bc3..474b08a640a7 100644
--- a/lib/libclang_rt/msan/Makefile
+++ b/lib/libclang_rt/msan/Makefile
@@ -4,10 +4,10 @@
 LIB=		clang_rt.msan-${CRTARCH}
 
 SRCS+=		interception/interception_linux.cpp
-SRCS+=		interception/interception_type_test.cpp
 SRCS+=		msan/msan.cpp
 SRCS+=		msan/msan_allocator.cpp
 SRCS+=		msan/msan_chained_origin_depot.cpp
+SRCS+=		msan/msan_dl.cpp
 SRCS+=		msan/msan_interceptors.cpp
 SRCS+=		msan/msan_linux.cpp
 SRCS+=		msan/msan_poisoning.cpp
@@ -50,6 +50,7 @@ SRCS+=		sanitizer_common/sanitizer_symbolizer_libcdep.cpp
 SRCS+=		sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp
 SRCS+=		sanitizer_common/sanitizer_symbolizer_report.cpp
 SRCS+=		sanitizer_common/sanitizer_termination.cpp
+SRCS+=		sanitizer_common/sanitizer_thread_arg_retval.cpp
 SRCS+=		sanitizer_common/sanitizer_thread_registry.cpp
 SRCS+=		sanitizer_common/sanitizer_tls_get_addr.cpp
 SRCS+=		sanitizer_common/sanitizer_type_traits.cpp
diff --git a/lib/libclang_rt/safestack/Makefile b/lib/libclang_rt/safestack/Makefile
index 75246a1295c6..bbf4a665c37f 100644
--- a/lib/libclang_rt/safestack/Makefile
+++ b/lib/libclang_rt/safestack/Makefile
@@ -4,7 +4,6 @@
 LIB=		clang_rt.safestack-${CRTARCH}
 
 SRCS+=		interception/interception_linux.cpp
-SRCS+=		interception/interception_type_test.cpp
 SRCS+=		safestack/safestack.cpp
 
 .include <bsd.lib.mk>
diff --git a/lib/libclang_rt/stats/Makefile b/lib/libclang_rt/stats/Makefile
index b2ba12ce0b6d..2fd929575123 100644
--- a/lib/libclang_rt/stats/Makefile
+++ b/lib/libclang_rt/stats/Makefile
@@ -38,6 +38,7 @@ SRCS+=		sanitizer_common/sanitizer_symbolizer_libcdep.cpp
 SRCS+=		sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp
 SRCS+=		sanitizer_common/sanitizer_symbolizer_report.cpp
 SRCS+=		sanitizer_common/sanitizer_termination.cpp
+SRCS+=		sanitizer_common/sanitizer_thread_arg_retval.cpp
 SRCS+=		sanitizer_common/sanitizer_thread_registry.cpp
 SRCS+=		sanitizer_common/sanitizer_tls_get_addr.cpp
 SRCS+=		sanitizer_common/sanitizer_type_traits.cpp
diff --git a/lib/libclang_rt/tsan/Makefile b/lib/libclang_rt/tsan/Makefile
index d97d6592cfb6..f3f5bd41668c 100644
--- a/lib/libclang_rt/tsan/Makefile
+++ b/lib/libclang_rt/tsan/Makefile
@@ -4,7 +4,6 @@
 LIB=		clang_rt.tsan-${CRTARCH}
 
 SRCS+=		interception/interception_linux.cpp
-SRCS+=		interception/interception_type_test.cpp
 SRCS+=		sanitizer_common/sancov_flags.cpp
 SRCS+=		sanitizer_common/sanitizer_allocator.cpp
 SRCS+=		sanitizer_common/sanitizer_allocator_checks.cpp
@@ -30,7 +29,6 @@ SRCS+=		sanitizer_common/sanitizer_posix_libcdep.cpp
 SRCS+=		sanitizer_common/sanitizer_printf.cpp
 SRCS+=		sanitizer_common/sanitizer_procmaps_bsd.cpp
 SRCS+=		sanitizer_common/sanitizer_procmaps_common.cpp
-SRCS+=		sanitizer_common/sanitizer_range.cpp
 SRCS+=		sanitizer_common/sanitizer_stack_store.cpp
 SRCS+=		sanitizer_common/sanitizer_stackdepot.cpp
 SRCS+=		sanitizer_common/sanitizer_stacktrace.cpp
@@ -62,7 +60,6 @@ SRCS+=		tsan/rtl/tsan_interface_java.cpp
 SRCS+=		tsan/rtl/tsan_md5.cpp
 SRCS+=		tsan/rtl/tsan_mman.cpp
 SRCS+=		tsan/rtl/tsan_mutexset.cpp
-SRCS+=		tsan/rtl/tsan_new_delete.cpp
 SRCS+=		tsan/rtl/tsan_platform_linux.cpp
 SRCS+=		tsan/rtl/tsan_platform_posix.cpp
 SRCS+=		tsan/rtl/tsan_preinit.cpp
diff --git a/lib/libclang_rt/ubsan_standalone/Makefile b/lib/libclang_rt/ubsan_standalone/Makefile
index 584a32ca3d45..95d1c0405e2d 100644
--- a/lib/libclang_rt/ubsan_standalone/Makefile
+++ b/lib/libclang_rt/ubsan_standalone/Makefile
@@ -4,7 +4,6 @@
 LIB=		clang_rt.ubsan_standalone-${CRTARCH}
 
 SRCS+=		interception/interception_linux.cpp
-SRCS+=		interception/interception_type_test.cpp
 SRCS+=		sanitizer_common/sancov_flags.cpp
 SRCS+=		sanitizer_common/sanitizer_allocator.cpp
 SRCS+=		sanitizer_common/sanitizer_allocator_checks.cpp
@@ -42,6 +41,7 @@ SRCS+=		sanitizer_common/sanitizer_symbolizer_libcdep.cpp
 SRCS+=		sanitizer_common/sanitizer_symbolizer_posix_libcdep.cpp
 SRCS+=		sanitizer_common/sanitizer_symbolizer_report.cpp
 SRCS+=		sanitizer_common/sanitizer_termination.cpp
+SRCS+=		sanitizer_common/sanitizer_thread_arg_retval.cpp
 SRCS+=		sanitizer_common/sanitizer_thread_registry.cpp
 SRCS+=		sanitizer_common/sanitizer_tls_get_addr.cpp
 SRCS+=		sanitizer_common/sanitizer_type_traits.cpp
diff --git a/lib/libclang_rt/xray/Makefile b/lib/libclang_rt/xray/Makefile
index fabaabca9646..91abbb743667 100644
--- a/lib/libclang_rt/xray/Makefile
+++ b/lib/libclang_rt/xray/Makefile
@@ -28,6 +28,7 @@ SRCS+=		sanitizer_common/sanitizer_procmaps_bsd.cpp
 SRCS+=		sanitizer_common/sanitizer_procmaps_common.cpp
 SRCS+=		sanitizer_common/sanitizer_suppressions.cpp
 SRCS+=		sanitizer_common/sanitizer_termination.cpp
+SRCS+=		sanitizer_common/sanitizer_thread_arg_retval.cpp
 SRCS+=		sanitizer_common/sanitizer_thread_registry.cpp
 SRCS+=		sanitizer_common/sanitizer_tls_get_addr.cpp
 SRCS+=		sanitizer_common/sanitizer_type_traits.cpp