Skip to content

Commit 0389462

Browse files
committed
[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
1 parent f9096b8 commit 0389462

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

libcxx/cmake/Modules/HandleLibCXXABI.cmake

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ include(GNUInstallDirs)
1515
# libc++ build tree for the build. These files will be copied
1616
# twice: once into include/, so the libc++ build itself can find
1717
# them, and once into include/c++/v1, so that a clang built into
18-
# the same build area will find them. These files will also be
19-
# installed alongside the libc++ headers.
18+
# the same build area will find them.
2019
# abidirs : A list of relative paths to create under an include directory
2120
# in the libc++ build directory.
2221
#
@@ -61,14 +60,6 @@ macro(setup_abi_lib abidefines abishared abistatic abifiles abidirs)
6160
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
6261
COMMENT "Copying C++ ABI header ${fpath}...")
6362
list(APPEND abilib_headers "${dst}")
64-
65-
if (LIBCXX_INSTALL_HEADERS)
66-
install(FILES "${LIBCXX_BINARY_INCLUDE_DIR}/${fpath}"
67-
DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/c++/v1/${dstdir}"
68-
COMPONENT cxx-headers
69-
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
70-
)
71-
endif()
7263
else()
7364
message(STATUS "Looking for ${fpath} in ${incpath} - not found")
7465
endif()

libcxx/docs/ReleaseNotes.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,3 +98,11 @@ Build System Changes
9898
library should set ``LIBCXXABI_HERMETIC_STATIC_LIBRARY=ON`` when configuring CMake. The current
9999
behavior, which tries to guess the correct dll-export semantics based on whether we're building
100100
the libc++ shared library, will be removed in LLVM 16.
101+
102+
- Previously, the C++ ABI library headers would be installed inside ``<prefix>/include/c++/v1``
103+
alongside the libc++ headers as part of building libc++. This is not the case anymore -- the
104+
ABI library is expected to install its headers where it wants them as part of its own build.
105+
Note that no action is required for most users, who build libc++ against libc++abi, since
106+
libc++abi already installs its headers in the right location. However, vendors building
107+
libc++ against alternate ABI libraries should make sure that their ABI library installs
108+
its own headers.

0 commit comments

Comments
 (0)