[libcxx-commits] [libcxx] 0389462 - [libc++] Do not install the C++ ABI library's headers as part of libc++'s build

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Wed Mar 16 05:53:52 PDT 2022


Author: Louis Dionne
Date: 2022-03-16T08:53:47-04:00
New Revision: 0389462587f8b89d6e724ccc4ff32d86963bfc22

URL: https://github.com/llvm/llvm-project/commit/0389462587f8b89d6e724ccc4ff32d86963bfc22
DIFF: https://github.com/llvm/llvm-project/commit/0389462587f8b89d6e724ccc4ff32d86963bfc22.diff

LOG: [libc++] Do not install the C++ ABI library's headers as part of libc++'s build

It's the role of the C++ ABI library to install its own headers, not libc++.
This fixes an existing issue causing spurious CI failures where both libc++
and libc++abi would try to install <cxxabi.h> & friends in the same location,
leading to failures during the installation step.

Differential Revision: https://reviews.llvm.org/D121706

Added: 
    

Modified: 
    libcxx/cmake/Modules/HandleLibCXXABI.cmake
    libcxx/docs/ReleaseNotes.rst

Removed: 
    


################################################################################
diff  --git a/libcxx/cmake/Modules/HandleLibCXXABI.cmake b/libcxx/cmake/Modules/HandleLibCXXABI.cmake
index 9b5df6e015b35..f6f4a2e12d626 100644
--- a/libcxx/cmake/Modules/HandleLibCXXABI.cmake
+++ b/libcxx/cmake/Modules/HandleLibCXXABI.cmake
@@ -15,8 +15,7 @@ include(GNUInstallDirs)
 #               libc++ build tree for the build.  These files will be copied
 #               twice: once into include/, so the libc++ build itself can find
 #               them, and once into include/c++/v1, so that a clang built into
-#               the same build area will find them.  These files will also be
-#               installed alongside the libc++ headers.
+#               the same build area will find them.
 #   abidirs   : A list of relative paths to create under an include directory
 #               in the libc++ build directory.
 #
@@ -61,14 +60,6 @@ macro(setup_abi_lib abidefines abishared abistatic abifiles abidirs)
             COMMAND ${CMAKE_COMMAND} -E copy_if_
diff erent ${src} ${dst}
             COMMENT "Copying C++ ABI header ${fpath}...")
         list(APPEND abilib_headers "${dst}")
-
-        if (LIBCXX_INSTALL_HEADERS)
-          install(FILES "${LIBCXX_BINARY_INCLUDE_DIR}/${fpath}"
-            DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/c++/v1/${dstdir}"
-            COMPONENT cxx-headers
-            PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
-            )
-        endif()
       else()
         message(STATUS "Looking for ${fpath} in ${incpath} - not found")
       endif()

diff  --git a/libcxx/docs/ReleaseNotes.rst b/libcxx/docs/ReleaseNotes.rst
index d78549edb10cf..ce35d572a2e44 100644
--- a/libcxx/docs/ReleaseNotes.rst
+++ b/libcxx/docs/ReleaseNotes.rst
@@ -98,3 +98,11 @@ Build System Changes
   library should set ``LIBCXXABI_HERMETIC_STATIC_LIBRARY=ON`` when configuring CMake. The current
   behavior, which tries to guess the correct dll-export semantics based on whether we're building
   the libc++ shared library, will be removed in LLVM 16.
+
+- Previously, the C++ ABI library headers would be installed inside ``<prefix>/include/c++/v1``
+  alongside the libc++ headers as part of building libc++. This is not the case anymore -- the
+  ABI library is expected to install its headers where it wants them as part of its own build.
+  Note that no action is required for most users, who build libc++ against libc++abi, since
+  libc++abi already installs its headers in the right location. However, vendors building
+  libc++ against alternate ABI libraries should make sure that their ABI library installs
+  its own headers.


        


More information about the libcxx-commits mailing list