Skip to content

Commit

Permalink
Add missing sources to libclang_rt Makefiles, clean up unneeded ones
Browse files Browse the repository at this point in the history
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
  • Loading branch information
DimitryAndric committed Dec 20, 2023
1 parent fa826f6 commit 0c3af23
Show file tree
Hide file tree
Showing 11 changed files with 10 additions and 13 deletions.
3 changes: 1 addition & 2 deletions lib/libclang_rt/asan/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions lib/libclang_rt/asan_dynamic/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/libclang_rt/cfi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/libclang_rt/cfi_diag/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/libclang_rt/dd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion lib/libclang_rt/msan/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 0 additions & 1 deletion lib/libclang_rt/safestack/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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>
1 change: 1 addition & 0 deletions lib/libclang_rt/stats/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions lib/libclang_rt/tsan/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/libclang_rt/ubsan_standalone/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions lib/libclang_rt/xray/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 0c3af23

Please sign in to comment.