[libc++] Don't re-export new/delete from libc++abi when they are defined in libc++

This is a temporary workaround until the new/delete situation is made
better (i.e. we don't include new/delete in both libc++ and libc++abi
by default).

GitOrigin-RevId: 8654a0f8bbf3e28eb210c75c8c70c739de637226
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index fc9fc0e..0e68193 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -212,6 +212,11 @@
       "-Wl,-reexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/libc++abi.v${LIBCXX_LIBCPPABI_VERSION}.exp"
       "-Wl,-force_symbols_not_weak_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/notweak.exp"
       "-Wl,-force_symbols_weak_list,${CMAKE_CURRENT_SOURCE_DIR}/../lib/weak.exp")
+
+    if (NOT LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS)
+      target_link_libraries(cxx_shared PRIVATE
+        "-Wl,-reexported_symbols_list,${CMAKE_CURRENT_SOURCE_DIR}/../../libcxxabi/lib/new-delete.exp")
+    endif()
   endif()
 
   # Generate a linker script in place of a libc++.so symlink.