[compiler-rt] [asan] add the new/delete code back to RTAsan_dynamic (PR #108329)

Charlie Barto via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 11 21:42:57 PDT 2024


https://github.com/barcharcraz created https://github.com/llvm/llvm-project/pull/108329

the new/delete code was removed from RTAsan_dynamic in https://github.com/llvm/llvm-project/pull/107899, but that broke things on macos. This reverts the offending change.

>From 5f649ddc9c3bb180b4753b2de7100104907255db Mon Sep 17 00:00:00 2001
From: Charlie Barto <chbarto at microsoft.com>
Date: Wed, 11 Sep 2024 21:36:26 -0700
Subject: [PATCH] add the new/delete code back to RTAsan_dynamic

---
 compiler-rt/lib/asan/CMakeLists.txt | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/compiler-rt/lib/asan/CMakeLists.txt b/compiler-rt/lib/asan/CMakeLists.txt
index c700fcd74edc05..fb3d74283a61e0 100644
--- a/compiler-rt/lib/asan/CMakeLists.txt
+++ b/compiler-rt/lib/asan/CMakeLists.txt
@@ -160,7 +160,7 @@ append_list_if(MINGW "${MINGW_LIBRARIES}" ASAN_DYNAMIC_LIBS)
 add_compiler_rt_object_libraries(RTAsan_dynamic
   OS ${SANITIZER_COMMON_SUPPORTED_OS}
   ARCHS ${ASAN_SUPPORTED_ARCH}
-  SOURCES ${ASAN_SOURCES}
+  SOURCES ${ASAN_SOURCES} ${ASAN_CXX_SOURCES}
   ADDITIONAL_HEADERS ${ASAN_HEADERS}
   CFLAGS ${ASAN_DYNAMIC_CFLAGS}
   DEFS ${ASAN_DYNAMIC_DEFINITIONS})
@@ -312,7 +312,6 @@ else()
       SHARED
       ARCHS ${arch}
       OBJECT_LIBS ${ASAN_COMMON_RUNTIME_OBJECT_LIBS}
-              RTAsan_cxx
               RTAsan_dynamic
               # The only purpose of RTAsan_dynamic_version_script_dummy is to
               # carry a dependency of the shared runtime on the version script.



More information about the llvm-commits mailing list