[libcxx-commits] [PATCH] D152971: [libc++] Don't automatically define LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS with libcxxrt

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jun 14 15:26:40 PDT 2023


ldionne created this revision.
ldionne added a reviewer: emaste.
Herald added subscribers: krytarowski, arichardson.
Herald added a project: All.
ldionne requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.

libcxxrt is only used on FreeBSD and the FreeBSD CMake cache already
sets LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS to ON, as it should. This
avoids defining LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS redundantly in
a place where it doesn't belong.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D152971

Files:
  libcxx/cmake/Modules/HandleLibCXXABI.cmake


Index: libcxx/cmake/Modules/HandleLibCXXABI.cmake
===================================================================
--- libcxx/cmake/Modules/HandleLibCXXABI.cmake
+++ libcxx/cmake/Modules/HandleLibCXXABI.cmake
@@ -143,10 +143,6 @@
 
 # Link against a system-provided libcxxrt
 elseif ("${LIBCXX_CXX_ABI}" STREQUAL "libcxxrt")
-  # libcxxrt does not provide aligned new and delete operators
-  # TODO: We're keeping this for backwards compatibility, but this doesn't belong here.
-  set(LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS ON)
-
   if(NOT LIBCXX_CXX_ABI_INCLUDE_PATHS)
     message(STATUS "LIBCXX_CXX_ABI_INCLUDE_PATHS not set, using /usr/include/c++/v1")
     set(LIBCXX_CXX_ABI_INCLUDE_PATHS "/usr/include/c++/v1")


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152971.531545.patch
Type: text/x-patch
Size: 719 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230614/6f3ca9ce/attachment-0001.bin>


More information about the libcxx-commits mailing list