2018-06-12 03:10:02 +00:00
|
|
|
set(files
|
2020-11-04 20:01:25 +00:00
|
|
|
__availability
|
2018-06-12 03:10:02 +00:00
|
|
|
__bit_reference
|
2021-01-18 12:21:00 +00:00
|
|
|
__bits
|
2018-06-12 03:10:02 +00:00
|
|
|
__bsd_locale_defaults.h
|
|
|
|
__bsd_locale_fallbacks.h
|
2020-06-26 16:08:59 +00:00
|
|
|
__config
|
2018-06-12 03:10:02 +00:00
|
|
|
__debug
|
2020-11-04 16:43:47 +00:00
|
|
|
__errc
|
2018-06-12 03:10:02 +00:00
|
|
|
__functional_03
|
|
|
|
__functional_base
|
|
|
|
__functional_base_03
|
|
|
|
__hash_table
|
|
|
|
__libcpp_version
|
|
|
|
__locale
|
2021-04-14 17:59:03 +00:00
|
|
|
__memory/addressof.h
|
2021-04-14 18:00:48 +00:00
|
|
|
__memory/allocation_guard.h
|
2021-04-09 16:48:34 +00:00
|
|
|
__memory/allocator.h
|
2020-12-10 23:28:13 +00:00
|
|
|
__memory/allocator_traits.h
|
2021-04-09 16:44:26 +00:00
|
|
|
__memory/auto_ptr.h
|
2021-04-09 18:43:01 +00:00
|
|
|
__memory/compressed_pair.h
|
2021-04-14 17:59:03 +00:00
|
|
|
__memory/construct_at.h
|
2021-04-09 19:57:21 +00:00
|
|
|
__memory/pointer_safety.h
|
2020-12-10 23:28:13 +00:00
|
|
|
__memory/pointer_traits.h
|
2021-04-09 18:45:18 +00:00
|
|
|
__memory/raw_storage_iterator.h
|
2021-04-09 19:16:14 +00:00
|
|
|
__memory/shared_ptr.h
|
2021-04-09 16:58:00 +00:00
|
|
|
__memory/temporary_buffer.h
|
2021-04-09 18:47:46 +00:00
|
|
|
__memory/uninitialized_algorithms.h
|
2021-04-09 19:00:57 +00:00
|
|
|
__memory/unique_ptr.h
|
2018-06-12 03:10:02 +00:00
|
|
|
__mutex_base
|
2018-08-01 01:33:38 +00:00
|
|
|
__node_handle
|
2018-06-12 03:10:02 +00:00
|
|
|
__nullptr
|
|
|
|
__split_buffer
|
|
|
|
__sso_allocator
|
|
|
|
__std_stream
|
|
|
|
__string
|
|
|
|
__threading_support
|
|
|
|
__tree
|
|
|
|
__tuple
|
|
|
|
__undef_macros
|
|
|
|
algorithm
|
|
|
|
any
|
|
|
|
array
|
|
|
|
atomic
|
2020-02-18 14:58:34 +00:00
|
|
|
barrier
|
2018-08-17 16:07:48 +00:00
|
|
|
bit
|
2018-06-12 03:10:02 +00:00
|
|
|
bitset
|
|
|
|
cassert
|
|
|
|
ccomplex
|
|
|
|
cctype
|
|
|
|
cerrno
|
|
|
|
cfenv
|
|
|
|
cfloat
|
2018-08-01 02:38:30 +00:00
|
|
|
charconv
|
2018-06-12 03:10:02 +00:00
|
|
|
chrono
|
|
|
|
cinttypes
|
|
|
|
ciso646
|
|
|
|
climits
|
|
|
|
clocale
|
|
|
|
cmath
|
|
|
|
codecvt
|
|
|
|
compare
|
|
|
|
complex
|
|
|
|
complex.h
|
2020-04-08 22:00:13 +00:00
|
|
|
concepts
|
2018-06-12 03:10:02 +00:00
|
|
|
condition_variable
|
|
|
|
csetjmp
|
|
|
|
csignal
|
|
|
|
cstdarg
|
|
|
|
cstdbool
|
|
|
|
cstddef
|
|
|
|
cstdint
|
|
|
|
cstdio
|
|
|
|
cstdlib
|
|
|
|
cstring
|
|
|
|
ctgmath
|
|
|
|
ctime
|
|
|
|
ctype.h
|
|
|
|
cwchar
|
|
|
|
cwctype
|
|
|
|
deque
|
|
|
|
errno.h
|
|
|
|
exception
|
2019-08-05 18:29:14 +00:00
|
|
|
execution
|
2018-06-12 03:10:02 +00:00
|
|
|
experimental/__config
|
|
|
|
experimental/__memory
|
|
|
|
experimental/algorithm
|
|
|
|
experimental/coroutine
|
|
|
|
experimental/deque
|
|
|
|
experimental/filesystem
|
|
|
|
experimental/forward_list
|
|
|
|
experimental/functional
|
|
|
|
experimental/iterator
|
|
|
|
experimental/list
|
|
|
|
experimental/map
|
|
|
|
experimental/memory_resource
|
|
|
|
experimental/propagate_const
|
|
|
|
experimental/regex
|
|
|
|
experimental/set
|
|
|
|
experimental/simd
|
|
|
|
experimental/string
|
|
|
|
experimental/type_traits
|
|
|
|
experimental/unordered_map
|
|
|
|
experimental/unordered_set
|
|
|
|
experimental/utility
|
|
|
|
experimental/vector
|
|
|
|
ext/__hash
|
|
|
|
ext/hash_map
|
|
|
|
ext/hash_set
|
2019-02-11 23:47:19 +00:00
|
|
|
fenv.h
|
2018-07-27 03:42:58 +00:00
|
|
|
filesystem
|
2018-06-12 03:10:02 +00:00
|
|
|
float.h
|
2020-11-26 18:12:18 +00:00
|
|
|
format
|
2018-06-12 03:10:02 +00:00
|
|
|
forward_list
|
|
|
|
fstream
|
|
|
|
functional
|
|
|
|
future
|
|
|
|
initializer_list
|
|
|
|
inttypes.h
|
|
|
|
iomanip
|
|
|
|
ios
|
|
|
|
iosfwd
|
|
|
|
iostream
|
|
|
|
istream
|
|
|
|
iterator
|
2020-02-18 14:58:34 +00:00
|
|
|
latch
|
2018-06-12 03:10:02 +00:00
|
|
|
limits
|
|
|
|
limits.h
|
|
|
|
list
|
|
|
|
locale
|
|
|
|
locale.h
|
|
|
|
map
|
|
|
|
math.h
|
|
|
|
memory
|
|
|
|
module.modulemap
|
|
|
|
mutex
|
|
|
|
new
|
2020-06-19 07:13:33 +00:00
|
|
|
numbers
|
2018-06-12 03:10:02 +00:00
|
|
|
numeric
|
|
|
|
optional
|
|
|
|
ostream
|
|
|
|
queue
|
|
|
|
random
|
|
|
|
ratio
|
|
|
|
regex
|
|
|
|
scoped_allocator
|
2020-02-18 14:58:34 +00:00
|
|
|
semaphore
|
2018-06-12 03:10:02 +00:00
|
|
|
set
|
|
|
|
setjmp.h
|
|
|
|
shared_mutex
|
2018-07-24 03:01:02 +00:00
|
|
|
span
|
2018-06-12 03:10:02 +00:00
|
|
|
sstream
|
|
|
|
stack
|
|
|
|
stdbool.h
|
|
|
|
stddef.h
|
|
|
|
stdexcept
|
|
|
|
stdint.h
|
|
|
|
stdio.h
|
|
|
|
stdlib.h
|
|
|
|
streambuf
|
|
|
|
string
|
|
|
|
string.h
|
|
|
|
string_view
|
|
|
|
strstream
|
2021-02-02 21:58:38 +00:00
|
|
|
__support/android/locale_bionic.h
|
|
|
|
__support/fuchsia/xlocale.h
|
2021-02-12 18:36:15 +00:00
|
|
|
__support/ibm/gettod_zos.h
|
2021-02-02 21:58:38 +00:00
|
|
|
__support/ibm/limits.h
|
|
|
|
__support/ibm/locale_mgmt_aix.h
|
2021-03-08 19:20:22 +00:00
|
|
|
__support/ibm/locale_mgmt_zos.h
|
2021-02-02 21:58:38 +00:00
|
|
|
__support/ibm/nanosleep.h
|
|
|
|
__support/ibm/support.h
|
|
|
|
__support/ibm/xlocale.h
|
|
|
|
__support/musl/xlocale.h
|
|
|
|
__support/newlib/xlocale.h
|
|
|
|
__support/nuttx/xlocale.h
|
|
|
|
__support/openbsd/xlocale.h
|
|
|
|
__support/solaris/floatingpoint.h
|
|
|
|
__support/solaris/wchar.h
|
|
|
|
__support/solaris/xlocale.h
|
|
|
|
__support/win32/limits_msvc_win32.h
|
|
|
|
__support/win32/locale_win32.h
|
|
|
|
__support/xlocale/__nop_locale_mgmt.h
|
|
|
|
__support/xlocale/__posix_l_fallback.h
|
|
|
|
__support/xlocale/__strtonum_fallback.h
|
2018-06-12 03:10:02 +00:00
|
|
|
system_error
|
|
|
|
tgmath.h
|
|
|
|
thread
|
|
|
|
tuple
|
|
|
|
type_traits
|
|
|
|
typeindex
|
|
|
|
typeinfo
|
|
|
|
unordered_map
|
|
|
|
unordered_set
|
|
|
|
utility
|
|
|
|
valarray
|
|
|
|
variant
|
|
|
|
vector
|
|
|
|
version
|
|
|
|
wchar.h
|
|
|
|
wctype.h
|
|
|
|
)
|
|
|
|
|
2020-06-26 16:08:59 +00:00
|
|
|
configure_file("__config_site.in" "${LIBCXX_GENERATED_INCLUDE_DIR}/__config_site" @ONLY)
|
2018-06-12 03:10:02 +00:00
|
|
|
|
2020-06-26 16:08:59 +00:00
|
|
|
set(_all_includes "${LIBCXX_GENERATED_INCLUDE_DIR}/__config_site")
|
|
|
|
foreach(f ${files})
|
|
|
|
set(src "${CMAKE_CURRENT_SOURCE_DIR}/${f}")
|
|
|
|
set(dst "${LIBCXX_GENERATED_INCLUDE_DIR}/${f}")
|
2020-10-23 13:32:50 +00:00
|
|
|
add_custom_command(OUTPUT ${dst}
|
2020-06-26 16:08:59 +00:00
|
|
|
DEPENDS ${src}
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${src} ${dst}
|
|
|
|
COMMENT "Copying CXX header ${f}")
|
|
|
|
list(APPEND _all_includes "${dst}")
|
|
|
|
endforeach()
|
2018-06-12 03:10:02 +00:00
|
|
|
|
2021-04-02 13:19:31 +00:00
|
|
|
add_custom_target(generate-cxx-headers ALL DEPENDS ${_all_includes})
|
2020-10-23 13:32:50 +00:00
|
|
|
|
2020-06-26 16:08:59 +00:00
|
|
|
add_library(cxx-headers INTERFACE)
|
|
|
|
add_dependencies(cxx-headers generate-cxx-headers ${LIBCXX_CXX_ABI_HEADER_TARGET})
|
|
|
|
# TODO: Use target_include_directories once we figure out why that breaks the runtimes build
|
|
|
|
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC" OR "${CMAKE_CXX_SIMULATE_ID}" STREQUAL "MSVC")
|
|
|
|
target_compile_options(cxx-headers INTERFACE /I "${LIBCXX_GENERATED_INCLUDE_DIR}")
|
2018-06-12 03:10:02 +00:00
|
|
|
else()
|
2020-06-26 16:08:59 +00:00
|
|
|
target_compile_options(cxx-headers INTERFACE -I "${LIBCXX_GENERATED_INCLUDE_DIR}")
|
2016-08-30 16:51:34 +00:00
|
|
|
endif()
|
2014-10-23 16:51:12 +00:00
|
|
|
|
2014-12-12 22:52:58 +00:00
|
|
|
if (LIBCXX_INSTALL_HEADERS)
|
2018-06-12 03:10:02 +00:00
|
|
|
foreach(file ${files})
|
|
|
|
get_filename_component(dir ${file} DIRECTORY)
|
|
|
|
install(FILES ${file}
|
2021-04-01 00:34:05 +00:00
|
|
|
DESTINATION include/c++/v1/${dir}
|
2020-09-28 23:12:48 +00:00
|
|
|
COMPONENT cxx-headers
|
2018-06-12 03:10:02 +00:00
|
|
|
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
|
|
|
)
|
|
|
|
endforeach()
|
[libcxx] Capture configuration information when installing the libc++ headers
Summary:
Hi all,
This patch is a successor to D11963. However it has changed dramatically and I felt it would be best to start a new review thread.
Please read the design documentation added in this patch for a description of how it works.
Reviewers: mclow.lists, danalbert, jroelofs, EricWF
Subscribers: vkalintiris, rnk, ed, espositofulvio, asl, eugenis, cfe-commits
Differential Revision: http://reviews.llvm.org/D13407
llvm-svn: 250235
2015-10-13 22:12:02 +00:00
|
|
|
|
2020-06-26 16:08:59 +00:00
|
|
|
# Install the generated __config_site.
|
|
|
|
install(FILES ${LIBCXX_GENERATED_INCLUDE_DIR}/__config_site
|
2021-04-01 00:34:05 +00:00
|
|
|
DESTINATION include/c++/v1
|
[libc++] Always generate a __config_site header
Before this patch, the __config_site header was only generated when at
least one __config_site macro needed to be defined. This lead to two
different code paths in how libc++ is configured, depending on whether
a __config_site header was generated or not. After this patch, the
__config_site is always generated, but it can be empty in case there
are no macros to define in it.
More context on why this change is important
--------------------------------------------
In addition to being confusing, this double-code-path situation lead to
broken code being checked in undetected in 2405bd689815, which introduced
the LIBCXX_HAS_MERGED_TYPEINFO_NAMES_DEFAULT CMake setting. Specifically,
the _LIBCPP_HAS_MERGED_TYPEINFO_NAMES_DEFAULT <__config_site> macro was
supposed NOT to be defined unless LIBCXX_HAS_MERGED_TYPEINFO_NAMES_DEFAULT
was specified explicitly on the CMake command line. Instead, what happened
is that it was defined to 0 if it wasn't specified explicitly and a
<__config_site> header was generated. And defining that macro to 0 had
the important effect of using the non-unique RTTI comparison implementation,
which changes the ABI.
This change in behavior wasn't noticed because the <__config_site> header
is not generated by default. However, the Apple configuration does cause
a <__config_site> header to be generated, which lead to the wrong RTTI
implementation being used, and to https://llvm.org/PR45549. We came close
to an ABI break in the dylib, but were saved due to a downstream-only
change that overrode the decision of the <__config_site> for the purpose
of RTTI comparisons in libc++abi. This is an incredible luck that we should
not rely on ever again.
While the problem itself was fixed with 2464d8135e2a by setting
LIBCXX_HAS_MERGED_TYPEINFO_NAMES_DEFAULT explicitly in the Apple
CMake cache and then in d0fcdcd28f95 by making the setting less
brittle, the point still is that we should have had a single code
path from the beginning. Unlike most normal libraries, the macros
that configure libc++ are really complex, there's a lot of them and
they control important properties of the C++ runtime. There must be
a single code path for that, and it must be simple and robust.
Differential Revision: https://reviews.llvm.org/D80927
2020-05-15 18:54:27 +00:00
|
|
|
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
2020-09-28 23:12:48 +00:00
|
|
|
COMPONENT cxx-headers)
|
2016-04-29 22:17:15 +00:00
|
|
|
|
|
|
|
if (NOT CMAKE_CONFIGURATION_TYPES)
|
2020-09-28 23:12:48 +00:00
|
|
|
add_custom_target(install-cxx-headers
|
2020-06-26 16:08:59 +00:00
|
|
|
DEPENDS cxx-headers
|
2016-04-29 22:17:15 +00:00
|
|
|
COMMAND "${CMAKE_COMMAND}"
|
2020-09-28 23:12:48 +00:00
|
|
|
-DCMAKE_INSTALL_COMPONENT=cxx-headers
|
2016-04-29 22:17:15 +00:00
|
|
|
-P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
|
2017-12-06 21:03:42 +00:00
|
|
|
# Stripping is a no-op for headers
|
2020-09-28 23:12:48 +00:00
|
|
|
add_custom_target(install-cxx-headers-stripped DEPENDS install-cxx-headers)
|
[libcxx] Capture configuration information when installing the libc++ headers
Summary:
Hi all,
This patch is a successor to D11963. However it has changed dramatically and I felt it would be best to start a new review thread.
Please read the design documentation added in this patch for a description of how it works.
Reviewers: mclow.lists, danalbert, jroelofs, EricWF
Subscribers: vkalintiris, rnk, ed, espositofulvio, asl, eugenis, cfe-commits
Differential Revision: http://reviews.llvm.org/D13407
llvm-svn: 250235
2015-10-13 22:12:02 +00:00
|
|
|
endif()
|
2014-12-12 22:52:58 +00:00
|
|
|
endif()
|