[libcxx-commits] [PATCH] D96720: Summary:Always turn on LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS, if libcxxrt is usedas the C++ ABI library, since libcxxrt does not provide the full set ofnew and delete operators. In particular, the aligned versions of theseoperators are...

Dimitry Andric via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Mon Feb 15 09:25:59 PST 2021


dim created this revision.
dim added reviewers: emaste, ldionne, mclow.lists, arichardson.
Herald added subscribers: krytarowski, mgorny.
dim requested review of this revision.
Herald added a project: libc++.
Herald added a reviewer: libc++.

...completely missing. This primarily addresses builds on
FreeBSD, as this platform uses libcxxrt by default.

Also, attempt to provide a FreeBSD.cmake cache file, with hopefully sane
settings, partially copied from the Apple.cmake cache file. This needs
more work, probably some additions to ci build scripts (although I am
not aware of any 'official' FreeBSD build bots).


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D96720

Files:
  libcxx/cmake/Modules/HandleLibCXXABI.cmake
  libcxx/cmake/caches/FreeBSD.cmake


Index: libcxx/cmake/caches/FreeBSD.cmake
===================================================================
--- /dev/null
+++ libcxx/cmake/caches/FreeBSD.cmake
@@ -0,0 +1,9 @@
+set(CMAKE_BUILD_TYPE Release CACHE STRING "")
+set(CMAKE_POSITION_INDEPENDENT_CODE ON CACHE BOOL "")
+
+set(LIBCXX_ENABLE_ASSERTIONS OFF CACHE BOOL "")
+set(LIBCXX_ABI_VERSION "1" CACHE STRING "")
+set(LIBCXX_ENABLE_STATIC ON CACHE BOOL "")
+set(LIBCXX_ENABLE_SHARED ON CACHE BOOL "")
+set(LIBCXX_CXX_ABI libcxxrt CACHE STRING "")
+set(LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS ON CACHE BOOL "")
Index: libcxx/cmake/Modules/HandleLibCXXABI.cmake
===================================================================
--- libcxx/cmake/Modules/HandleLibCXXABI.cmake
+++ libcxx/cmake/Modules/HandleLibCXXABI.cmake
@@ -121,6 +121,8 @@
   if(NOT LIBCXX_CXX_ABI_INCLUDE_PATHS)
     set(LIBCXX_CXX_ABI_INCLUDE_PATHS "/usr/include/c++/v1")
   endif()
+  # libcxxrt does not provide aligned new and delete operators
+  set(LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS ON)
   setup_abi_lib(
     "-DLIBCXXRT"
     "cxxrt" "cxxrt" "cxxabi.h;unwind.h;unwind-arm.h;unwind-itanium.h" ""


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D96720.323782.patch
Type: text/x-patch
Size: 1135 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20210215/9f24c49b/attachment.bin>


More information about the libcxx-commits mailing list