2018-06-12 11:10:02 +08:00
|
|
|
set(files
|
2020-11-05 04:01:25 +08:00
|
|
|
__availability
|
2018-06-12 11:10:02 +08:00
|
|
|
__bit_reference
|
2021-01-18 20:21:00 +08:00
|
|
|
__bits
|
2018-06-12 11:10:02 +08:00
|
|
|
__bsd_locale_defaults.h
|
|
|
|
__bsd_locale_fallbacks.h
|
2020-06-27 00:08:59 +08:00
|
|
|
__config
|
2018-06-12 11:10:02 +08:00
|
|
|
__debug
|
2020-11-05 00:43:47 +08:00
|
|
|
__errc
|
2021-04-25 23:58:03 +08:00
|
|
|
__format/format_error.h
|
2021-04-26 00:23:42 +08:00
|
|
|
__format/format_parse_context.h
|
2021-05-05 15:14:08 +08:00
|
|
|
__function_like.h
|
2018-06-12 11:10:02 +08:00
|
|
|
__functional_03
|
|
|
|
__functional_base
|
|
|
|
__functional_base_03
|
|
|
|
__hash_table
|
2021-05-05 15:14:08 +08:00
|
|
|
__iterator/advance.h
|
2021-04-20 02:28:27 +08:00
|
|
|
__iterator/concepts.h
|
|
|
|
__iterator/incrementable_traits.h
|
2021-04-29 03:02:08 +08:00
|
|
|
__iterator/indirect_concepts.h
|
2021-04-21 02:40:43 +08:00
|
|
|
__iterator/iter_move.h
|
|
|
|
__iterator/iterator_traits.h
|
2021-05-08 13:02:43 +08:00
|
|
|
__iterator/next.h
|
2021-05-16 09:39:22 +08:00
|
|
|
__iterator/prev.h
|
2021-04-29 03:02:08 +08:00
|
|
|
__iterator/projected.h
|
2021-04-20 02:28:27 +08:00
|
|
|
__iterator/readable_traits.h
|
2018-06-12 11:10:02 +08:00
|
|
|
__libcpp_version
|
|
|
|
__locale
|
2021-04-15 01:59:03 +08:00
|
|
|
__memory/addressof.h
|
2021-04-15 02:00:48 +08:00
|
|
|
__memory/allocation_guard.h
|
2021-04-10 00:48:34 +08:00
|
|
|
__memory/allocator.h
|
2020-12-11 07:28:13 +08:00
|
|
|
__memory/allocator_traits.h
|
2021-04-10 00:44:26 +08:00
|
|
|
__memory/auto_ptr.h
|
2021-04-10 02:43:01 +08:00
|
|
|
__memory/compressed_pair.h
|
2021-04-15 01:59:03 +08:00
|
|
|
__memory/construct_at.h
|
2021-04-10 03:57:21 +08:00
|
|
|
__memory/pointer_safety.h
|
2020-12-11 07:28:13 +08:00
|
|
|
__memory/pointer_traits.h
|
2021-04-10 02:45:18 +08:00
|
|
|
__memory/raw_storage_iterator.h
|
2021-04-10 03:16:14 +08:00
|
|
|
__memory/shared_ptr.h
|
2021-04-10 00:58:00 +08:00
|
|
|
__memory/temporary_buffer.h
|
2021-04-10 02:47:46 +08:00
|
|
|
__memory/uninitialized_algorithms.h
|
2021-04-10 03:00:57 +08:00
|
|
|
__memory/unique_ptr.h
|
2018-06-12 11:10:02 +08:00
|
|
|
__mutex_base
|
2018-08-01 09:33:38 +08:00
|
|
|
__node_handle
|
2018-06-12 11:10:02 +08:00
|
|
|
__nullptr
|
2021-04-11 13:08:32 +08:00
|
|
|
__ranges/access.h
|
2021-04-12 01:40:30 +08:00
|
|
|
__ranges/concepts.h
|
2021-04-24 06:22:18 +08:00
|
|
|
__ranges/data.h
|
2021-04-24 03:34:22 +08:00
|
|
|
__ranges/empty.h
|
2020-11-25 01:08:02 +08:00
|
|
|
__ranges/enable_borrowed_range.h
|
2021-04-29 03:22:11 +08:00
|
|
|
__ranges/view.h
|
2021-04-23 00:29:02 +08:00
|
|
|
__ranges/size.h
|
2018-06-12 11:10:02 +08:00
|
|
|
__split_buffer
|
|
|
|
__std_stream
|
|
|
|
__string
|
|
|
|
__threading_support
|
|
|
|
__tree
|
|
|
|
__tuple
|
|
|
|
__undef_macros
|
2021-04-24 23:28:35 +08:00
|
|
|
__utility/to_underlying.h
|
2018-06-12 11:10:02 +08:00
|
|
|
algorithm
|
|
|
|
any
|
|
|
|
array
|
|
|
|
atomic
|
2020-02-18 22:58:34 +08:00
|
|
|
barrier
|
2018-08-18 00:07:48 +08:00
|
|
|
bit
|
2018-06-12 11:10:02 +08:00
|
|
|
bitset
|
|
|
|
cassert
|
|
|
|
ccomplex
|
|
|
|
cctype
|
|
|
|
cerrno
|
|
|
|
cfenv
|
|
|
|
cfloat
|
2018-08-01 10:38:30 +08:00
|
|
|
charconv
|
2018-06-12 11:10:02 +08:00
|
|
|
chrono
|
|
|
|
cinttypes
|
|
|
|
ciso646
|
|
|
|
climits
|
|
|
|
clocale
|
|
|
|
cmath
|
|
|
|
codecvt
|
|
|
|
compare
|
|
|
|
complex
|
|
|
|
complex.h
|
2020-04-09 06:00:13 +08:00
|
|
|
concepts
|
2018-06-12 11:10:02 +08:00
|
|
|
condition_variable
|
|
|
|
csetjmp
|
|
|
|
csignal
|
|
|
|
cstdarg
|
|
|
|
cstdbool
|
|
|
|
cstddef
|
|
|
|
cstdint
|
|
|
|
cstdio
|
|
|
|
cstdlib
|
|
|
|
cstring
|
|
|
|
ctgmath
|
|
|
|
ctime
|
|
|
|
ctype.h
|
|
|
|
cwchar
|
|
|
|
cwctype
|
|
|
|
deque
|
|
|
|
errno.h
|
|
|
|
exception
|
2019-08-06 02:29:14 +08:00
|
|
|
execution
|
2018-06-12 11:10:02 +08: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-12 07:47:19 +08:00
|
|
|
fenv.h
|
2018-07-27 11:42:58 +08:00
|
|
|
filesystem
|
2018-06-12 11:10:02 +08:00
|
|
|
float.h
|
2020-11-27 02:12:18 +08:00
|
|
|
format
|
2018-06-12 11:10:02 +08:00
|
|
|
forward_list
|
|
|
|
fstream
|
|
|
|
functional
|
|
|
|
future
|
|
|
|
initializer_list
|
|
|
|
inttypes.h
|
|
|
|
iomanip
|
|
|
|
ios
|
|
|
|
iosfwd
|
|
|
|
iostream
|
|
|
|
istream
|
|
|
|
iterator
|
2020-02-18 22:58:34 +08:00
|
|
|
latch
|
2018-06-12 11:10:02 +08:00
|
|
|
limits
|
|
|
|
limits.h
|
|
|
|
list
|
|
|
|
locale
|
|
|
|
locale.h
|
|
|
|
map
|
|
|
|
math.h
|
|
|
|
memory
|
|
|
|
module.modulemap
|
|
|
|
mutex
|
|
|
|
new
|
2020-06-19 15:13:33 +08:00
|
|
|
numbers
|
2018-06-12 11:10:02 +08:00
|
|
|
numeric
|
|
|
|
optional
|
|
|
|
ostream
|
|
|
|
queue
|
|
|
|
random
|
2020-11-25 01:08:02 +08:00
|
|
|
ranges
|
2018-06-12 11:10:02 +08:00
|
|
|
ratio
|
2021-04-11 13:08:32 +08:00
|
|
|
ranges
|
2018-06-12 11:10:02 +08:00
|
|
|
regex
|
|
|
|
scoped_allocator
|
2020-02-18 22:58:34 +08:00
|
|
|
semaphore
|
2018-06-12 11:10:02 +08:00
|
|
|
set
|
|
|
|
setjmp.h
|
|
|
|
shared_mutex
|
2018-07-24 11:01:02 +08:00
|
|
|
span
|
2018-06-12 11:10:02 +08:00
|
|
|
sstream
|
|
|
|
stack
|
|
|
|
stdbool.h
|
|
|
|
stddef.h
|
|
|
|
stdexcept
|
|
|
|
stdint.h
|
|
|
|
stdio.h
|
|
|
|
stdlib.h
|
|
|
|
streambuf
|
|
|
|
string
|
|
|
|
string.h
|
|
|
|
string_view
|
|
|
|
strstream
|
2021-02-03 05:58:38 +08:00
|
|
|
__support/android/locale_bionic.h
|
|
|
|
__support/fuchsia/xlocale.h
|
2021-02-13 02:36:15 +08:00
|
|
|
__support/ibm/gettod_zos.h
|
2021-02-03 05:58:38 +08:00
|
|
|
__support/ibm/limits.h
|
|
|
|
__support/ibm/locale_mgmt_aix.h
|
2021-03-09 03:20:22 +08:00
|
|
|
__support/ibm/locale_mgmt_zos.h
|
2021-02-03 05:58:38 +08: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 11:10:02 +08: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-07-16 05:10:56 +08:00
|
|
|
configure_file("__config_site.in" "${LIBCXX_GENERATED_INCLUDE_TARGET_DIR}/__config_site" @ONLY)
|
2018-06-12 11:10:02 +08:00
|
|
|
|
2020-07-16 05:10:56 +08:00
|
|
|
set(_all_includes "${LIBCXX_GENERATED_INCLUDE_TARGET_DIR}/__config_site")
|
2020-06-27 00:08:59 +08:00
|
|
|
foreach(f ${files})
|
|
|
|
set(src "${CMAKE_CURRENT_SOURCE_DIR}/${f}")
|
|
|
|
set(dst "${LIBCXX_GENERATED_INCLUDE_DIR}/${f}")
|
2020-10-23 21:32:50 +08:00
|
|
|
add_custom_command(OUTPUT ${dst}
|
2020-06-27 00:08:59 +08: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 11:10:02 +08:00
|
|
|
|
2021-04-02 21:19:31 +08:00
|
|
|
add_custom_target(generate-cxx-headers ALL DEPENDS ${_all_includes})
|
2020-10-23 21:32:50 +08:00
|
|
|
|
2020-06-27 00:08:59 +08: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")
|
2021-04-30 01:11:39 +08:00
|
|
|
target_compile_options(cxx-headers INTERFACE /I${LIBCXX_GENERATED_INCLUDE_DIR}
|
|
|
|
INTERFACE /I${LIBCXX_GENERATED_INCLUDE_TARGET_DIR})
|
2018-06-12 11:10:02 +08:00
|
|
|
else()
|
2020-07-16 05:10:56 +08:00
|
|
|
target_compile_options(cxx-headers INTERFACE -I${LIBCXX_GENERATED_INCLUDE_DIR}
|
|
|
|
INTERFACE -I${LIBCXX_GENERATED_INCLUDE_TARGET_DIR})
|
2016-08-31 00:51:34 +08:00
|
|
|
endif()
|
2014-10-24 00:51:12 +08:00
|
|
|
|
2014-12-13 06:52:58 +08:00
|
|
|
if (LIBCXX_INSTALL_HEADERS)
|
2018-06-12 11:10:02 +08:00
|
|
|
foreach(file ${files})
|
|
|
|
get_filename_component(dir ${file} DIRECTORY)
|
|
|
|
install(FILES ${file}
|
2020-07-16 05:10:56 +08:00
|
|
|
DESTINATION ${LIBCXX_INSTALL_INCLUDE_DIR}/${dir}
|
2020-09-29 07:12:48 +08:00
|
|
|
COMPONENT cxx-headers
|
2018-06-12 11:10:02 +08: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-14 06:12:02 +08:00
|
|
|
|
2020-06-27 00:08:59 +08:00
|
|
|
# Install the generated __config_site.
|
2020-07-16 05:10:56 +08:00
|
|
|
install(FILES ${LIBCXX_GENERATED_INCLUDE_TARGET_DIR}/__config_site
|
|
|
|
DESTINATION ${LIBCXX_INSTALL_INCLUDE_TARGET_DIR}
|
[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-16 02:54:27 +08:00
|
|
|
PERMISSIONS OWNER_READ OWNER_WRITE GROUP_READ WORLD_READ
|
2020-09-29 07:12:48 +08:00
|
|
|
COMPONENT cxx-headers)
|
2016-04-30 06:17:15 +08:00
|
|
|
|
|
|
|
if (NOT CMAKE_CONFIGURATION_TYPES)
|
2020-09-29 07:12:48 +08:00
|
|
|
add_custom_target(install-cxx-headers
|
2020-06-27 00:08:59 +08:00
|
|
|
DEPENDS cxx-headers
|
2016-04-30 06:17:15 +08:00
|
|
|
COMMAND "${CMAKE_COMMAND}"
|
2020-09-29 07:12:48 +08:00
|
|
|
-DCMAKE_INSTALL_COMPONENT=cxx-headers
|
2016-04-30 06:17:15 +08:00
|
|
|
-P "${CMAKE_BINARY_DIR}/cmake_install.cmake")
|
2017-12-07 05:03:42 +08:00
|
|
|
# Stripping is a no-op for headers
|
2020-09-29 07:12:48 +08: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-14 06:12:02 +08:00
|
|
|
endif()
|
2014-12-13 06:52:58 +08:00
|
|
|
endif()
|