From 62ebd633c27e5b3ce8c074e35e25f4922629c81c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Mar=C3=ADn?= Date: Fri, 25 Feb 2022 10:44:22 +0100 Subject: [PATCH 1/6] Update to 14.x 2fe5bf57172cebf5a3f0b3f82552cf5c2122eca2 --- .arcconfig | 4 - .clang-format | 13 - CMakeLists.txt | 236 +- CREDITS.TXT | 49 +- TODO.TXT | 52 - benchmarks/CMakeLists.txt | 213 - benchmarks/CartesianBenchmarks.h | 133 - benchmarks/ContainerBenchmarks.h | 140 - benchmarks/GenerateInput.h | 144 - benchmarks/Utilities.h | 33 - benchmarks/VariantBenchmarks.h | 58 - benchmarks/algorithms.bench.cpp | 337 -- .../algorithms.partition_point.bench.cpp | 124 - benchmarks/allocation.bench.cpp | 136 - benchmarks/deque.bench.cpp | 47 - benchmarks/filesystem.bench.cpp | 163 - benchmarks/function.bench.cpp | 231 - benchmarks/lit.cfg.py | 23 - benchmarks/lit.site.cfg.py.in | 10 - benchmarks/map.bench.cpp | 1037 ---- benchmarks/ordered_set.bench.cpp | 248 - benchmarks/string.bench.cpp | 628 -- benchmarks/stringstream.bench.cpp | 40 - benchmarks/unordered_set_operations.bench.cpp | 307 - benchmarks/util_smartptr.bench.cpp | 41 - benchmarks/variant_visit_1.bench.cpp | 27 - benchmarks/variant_visit_2.bench.cpp | 22 - benchmarks/variant_visit_3.bench.cpp | 20 - benchmarks/vector_operations.bench.cpp | 40 - cmake/Modules/CheckLibcxxAtomic.cmake | 56 - cmake/Modules/DefineLinkerScript.cmake | 2 +- cmake/Modules/HandleCompilerRT.cmake | 64 - cmake/Modules/HandleLibCXXABI.cmake | 23 +- cmake/Modules/HandleLibcxxFlags.cmake | 11 + cmake/Modules/HandleOutOfTreeLLVM.cmake | 72 - cmake/caches/AArch64.cmake | 2 + cmake/caches/AIX.cmake | 16 + cmake/caches/Apple.cmake | 10 +- cmake/caches/Armv7Arm.cmake | 4 + cmake/caches/Armv7Thumb-noexceptions.cmake | 6 + cmake/caches/Armv8Arm.cmake | 4 + cmake/caches/Armv8Thumb-noexceptions.cmake | 6 + cmake/caches/FreeBSD.cmake | 9 + cmake/caches/Generic-32bits.cmake | 1 - cmake/caches/Generic-asan.cmake | 2 + cmake/caches/Generic-assertions.cmake | 1 + cmake/caches/Generic-cxx20.cmake | 2 +- cmake/caches/Generic-debug-iterators.cmake | 2 + cmake/caches/Generic-modules.cmake | 2 + ...c-nodebug.cmake => Generic-no-debug.cmake} | 0 cmake/caches/Generic-no-experimental.cmake | 2 + cmake/caches/Generic-no-filesystem.cmake | 1 + cmake/caches/Generic-no-unicode.cmake | 1 + cmake/caches/Generic-no-wide-characters.cmake | 1 + cmake/caches/Generic-static.cmake | 3 + cmake/caches/MinGW.cmake | 18 + cmake/config-ix.cmake | 44 +- docs/AddingNewCIJobs.rst | 67 - docs/BuildingLibcxx.rst | 533 -- docs/CMakeLists.txt | 9 - docs/Contributing.rst | 57 - docs/Cxx1yStatus.rst | 52 - docs/Cxx1yStatusIssuesStatus.csv | 157 - docs/Cxx1yStatusPaperStatus.csv | 32 - docs/Cxx1zStatus.rst | 57 - docs/Cxx1zStatusIssuesStatus.csv | 318 - docs/Cxx1zStatusPaperStatus.csv | 113 - docs/Cxx2aStatus.rst | 59 - docs/Cxx2aStatusIssuesStatus.csv | 299 - docs/Cxx2aStatusPaperStatus.csv | 195 - docs/Cxx2bStatus.rst | 50 - docs/Cxx2bStatusPaperStatus.csv | 6 - docs/DesignDocs/ABIVersioning.rst | 17 - docs/DesignDocs/AvailabilityMarkup.rst | 105 - docs/DesignDocs/CapturingConfigInfo.rst | 86 - docs/DesignDocs/DebugMode.rst | 91 - docs/DesignDocs/ExperimentalFeatures.rst | 203 - docs/DesignDocs/ExtendedCXX03Support.rst | 118 - docs/DesignDocs/FeatureTestMacros.rst | 43 - docs/DesignDocs/FileTimeType.rst | 495 -- docs/DesignDocs/ThreadingSupportAPI.rst | 83 - docs/DesignDocs/UniquePtrTrivialAbi.rst | 149 - docs/DesignDocs/VisibilityMacros.rst | 218 - docs/FeatureTestMacroTable.rst | 303 - docs/Helpers/Styles.rst | 31 - docs/Makefile.sphinx | 37 - docs/README.txt | 13 - docs/ReleaseNotes.rst | 64 - docs/TestingLibcxx.rst | 257 - docs/UsingLibcxx.rst | 348 -- docs/conf.py | 251 - docs/index.rst | 222 - include/CMakeLists.txt | 484 +- include/__algorithm/adjacent_find.h | 46 + include/__algorithm/all_of.h | 32 + include/__algorithm/any_of.h | 32 + include/__algorithm/binary_search.h | 55 + include/__algorithm/clamp.h | 46 + include/__algorithm/comp.h | 92 + include/__algorithm/comp_ref_type.h | 85 + include/__algorithm/copy.h | 77 + include/__algorithm/copy_backward.h | 79 + include/__algorithm/copy_if.h | 39 + include/__algorithm/copy_n.h | 66 + include/__algorithm/count.h | 35 + include/__algorithm/count_if.h | 35 + include/__algorithm/equal.h | 85 + include/__algorithm/equal_range.h | 82 + include/__algorithm/fill.h | 50 + include/__algorithm/fill_n.h | 42 + include/__algorithm/find.h | 32 + include/__algorithm/find_end.h | 150 + include/__algorithm/find_first_of.h | 52 + include/__algorithm/find_if.h | 32 + include/__algorithm/find_if_not.h | 32 + include/__algorithm/for_each.h | 32 + include/__algorithm/for_each_n.h | 42 + include/__algorithm/generate.h | 31 + include/__algorithm/generate_n.h | 35 + include/__algorithm/half_positive.h | 49 + include/__algorithm/in_in_out_result.h | 54 + include/__algorithm/in_in_result.h | 51 + include/__algorithm/in_out_result.h | 54 + include/__algorithm/includes.h | 62 + include/__algorithm/inplace_merge.h | 231 + include/__algorithm/is_heap.h | 45 + include/__algorithm/is_heap_until.h | 67 + include/__algorithm/is_partitioned.h | 38 + include/__algorithm/is_permutation.h | 162 + include/__algorithm/is_sorted.h | 45 + include/__algorithm/is_sorted_until.h | 57 + include/__algorithm/iter_swap.h | 32 + include/__algorithm/lexicographical_compare.h | 63 + include/__algorithm/lower_bound.h | 66 + include/__algorithm/make_heap.h | 59 + include/__algorithm/max.h | 72 + include/__algorithm/max_element.h | 58 + include/__algorithm/merge.h | 71 + include/__algorithm/min.h | 72 + include/__algorithm/min_element.h | 57 + include/__algorithm/minmax.h | 95 + include/__algorithm/minmax_element.h | 85 + include/__algorithm/mismatch.h | 67 + include/__algorithm/move.h | 78 + include/__algorithm/move_backward.h | 79 + include/__algorithm/next_permutation.h | 72 + include/__algorithm/none_of.h | 32 + include/__algorithm/nth_element.h | 248 + include/__algorithm/partial_sort.h | 74 + include/__algorithm/partial_sort_copy.h | 71 + include/__algorithm/partition.h | 81 + include/__algorithm/partition_copy.h | 47 + include/__algorithm/partition_point.h | 46 + include/__algorithm/pop_heap.h | 57 + include/__algorithm/prev_permutation.h | 72 + include/__algorithm/push_heap.h | 70 + include/__algorithm/remove.h | 45 + include/__algorithm/remove_copy.h | 38 + include/__algorithm/remove_copy_if.h | 38 + include/__algorithm/remove_if.h | 44 + include/__algorithm/replace.h | 32 + include/__algorithm/replace_copy.h | 36 + include/__algorithm/replace_copy_if.h | 36 + include/__algorithm/replace_if.h | 32 + include/__algorithm/reverse.h | 56 + include/__algorithm/reverse_copy.h | 32 + include/__algorithm/rotate.h | 200 + include/__algorithm/rotate_copy.h | 31 + include/__algorithm/sample.h | 102 + include/__algorithm/search.h | 125 + include/__algorithm/search_n.h | 112 + include/__algorithm/set_difference.h | 72 + include/__algorithm/set_intersection.h | 69 + .../__algorithm/set_symmetric_difference.h | 77 + include/__algorithm/set_union.h | 72 + include/__algorithm/shift_left.h | 56 + include/__algorithm/shift_right.h | 102 + include/__algorithm/shuffle.h | 160 + include/__algorithm/sift_down.h | 78 + include/__algorithm/sort.h | 556 ++ include/__algorithm/sort_heap.h | 53 + include/__algorithm/stable_partition.h | 295 + include/__algorithm/stable_sort.h | 230 + include/__algorithm/swap_ranges.h | 32 + include/__algorithm/transform.h | 43 + include/__algorithm/unique.h | 56 + include/__algorithm/unique_copy.h | 107 + include/__algorithm/unwrap_iter.h | 84 + include/__algorithm/upper_bound.h | 66 + include/__availability | 75 +- include/__bit/bit_cast.h | 38 + include/__bit/byteswap.h | 55 + include/__bit_reference | 38 +- include/__bits | 145 + include/__bsd_locale_defaults.h | 2 +- include/__bsd_locale_fallbacks.h | 16 +- include/__charconv/chars_format.h | 77 + include/__charconv/from_chars_result.h | 37 + include/__charconv/to_chars_result.h | 37 + include/__chrono/calendar.h | 1276 ++++ include/__chrono/convert_to_timespec.h | 55 + include/__chrono/duration.h | 615 ++ include/__chrono/file_clock.h | 85 + include/__chrono/high_resolution_clock.h | 36 + include/__chrono/steady_clock.h | 44 + include/__chrono/system_clock.h | 54 + include/__chrono/time_point.h | 249 + .../__compare/common_comparison_category.h | 94 + .../compare_partial_order_fallback.h | 73 + .../__compare/compare_strong_order_fallback.h | 70 + include/__compare/compare_three_way.h | 41 + include/__compare/compare_three_way_result.h | 43 + .../__compare/compare_weak_order_fallback.h | 70 + include/__compare/is_eq.h | 34 + include/__compare/ordering.h | 319 + include/__compare/partial_order.h | 71 + include/__compare/strong_order.h | 136 + include/__compare/synth_three_way.h | 51 + include/__compare/three_way_comparable.h | 58 + include/__compare/weak_order.h | 100 + include/__concepts/arithmetic.h | 48 + include/__concepts/assignable.h | 40 + include/__concepts/boolean_testable.h | 38 + include/__concepts/class_or_enum.h | 36 + include/__concepts/common_reference_with.h | 37 + include/__concepts/common_with.h | 47 + include/__concepts/constructible.h | 56 + include/__concepts/convertible_to.h | 37 + include/__concepts/copyable.h | 39 + include/__concepts/derived_from.h | 34 + include/__concepts/destructible.h | 32 + include/__concepts/different_from.h | 31 + include/__concepts/equality_comparable.h | 53 + include/__concepts/invocable.h | 41 + include/__concepts/movable.h | 39 + include/__concepts/predicate.h | 35 + include/__concepts/regular.h | 33 + include/__concepts/relation.h | 44 + include/__concepts/same_as.h | 35 + include/__concepts/semiregular.h | 33 + include/__concepts/swappable.h | 116 + include/__concepts/totally_ordered.h | 57 + include/__config | 611 +- include/__config_site.in | 9 +- include/__coroutine/coroutine_handle.h | 202 + include/__coroutine/coroutine_traits.h | 53 + include/__coroutine/noop_coroutine_handle.h | 112 + include/__coroutine/trivial_awaitables.h | 46 + include/__debug | 31 +- include/__errc | 4 +- include/__filesystem/copy_options.h | 80 + include/__filesystem/directory_entry.h | 511 ++ include/__filesystem/directory_iterator.h | 150 + include/__filesystem/directory_options.h | 78 + include/__filesystem/file_status.h | 68 + include/__filesystem/file_time_type.h | 27 + include/__filesystem/file_type.h | 39 + include/__filesystem/filesystem_error.h | 99 + include/__filesystem/operations.h | 197 + include/__filesystem/path.h | 1018 ++++ include/__filesystem/path_iterator.h | 130 + include/__filesystem/perm_options.h | 73 + include/__filesystem/perms.h | 91 + .../recursive_directory_iterator.h | 181 + include/__filesystem/space_info.h | 35 + include/__filesystem/u8path.h | 96 + include/__format/format_arg.h | 292 + include/__format/format_args.h | 71 + include/__format/format_context.h | 165 + include/__format/format_error.h | 51 + include/__format/format_fwd.h | 56 + include/__format/format_parse_context.h | 109 + include/__format/format_string.h | 169 + include/__format/format_to_n_result.h | 41 + include/__format/formatter.h | 290 + include/__format/formatter_bool.h | 147 + include/__format/formatter_char.h | 104 + include/__format/formatter_floating_point.h | 717 +++ include/__format/formatter_integer.h | 170 + include/__format/formatter_integral.h | 463 ++ include/__format/formatter_pointer.h | 91 + include/__format/formatter_string.h | 162 + include/__format/parser_std_format_spec.h | 1398 +++++ include/__functional/binary_function.h | 31 + include/__functional/binary_negate.h | 50 + include/__functional/bind.h | 392 ++ include/__functional/bind_back.h | 65 + include/__functional/bind_front.h | 58 + include/__functional/binder1st.h | 54 + include/__functional/binder2nd.h | 54 + include/__functional/compose.h | 52 + include/__functional/default_searcher.h | 56 + .../function.h} | 1321 +++- include/__functional/hash.h | 870 +++ include/__functional/identity.h | 37 + include/__functional/invoke.h | 100 + include/__functional/is_transparent.h | 36 + include/__functional/mem_fn.h | 161 + include/__functional/mem_fun_ref.h | 173 + include/__functional/not_fn.h | 53 + include/__functional/operations.h | 729 +++ include/__functional/perfect_forward.h | 95 + .../__functional/pointer_to_binary_function.h | 46 + .../__functional/pointer_to_unary_function.h | 46 + include/__functional/ranges_operations.h | 98 + include/__functional/reference_wrapper.h | 212 + include/__functional/unary_function.h | 29 + include/__functional/unary_negate.h | 47 + include/__functional/unwrap_ref.h | 57 + include/__functional/weak_result_type.h | 481 ++ include/__functional_base | 645 +- include/__functional_base_03 | 223 - include/__hash_table | 152 +- include/__iterator/access.h | 129 + include/__iterator/advance.h | 199 + include/__iterator/back_insert_iterator.h | 70 + include/__iterator/common_iterator.h | 283 + include/__iterator/concepts.h | 264 + include/__iterator/counted_iterator.h | 303 + include/__iterator/data.h | 51 + include/__iterator/default_sentinel.h | 30 + include/__iterator/distance.h | 107 + include/__iterator/empty.h | 44 + include/__iterator/erase_if_container.h | 40 + include/__iterator/front_insert_iterator.h | 70 + include/__iterator/incrementable_traits.h | 72 + include/__iterator/indirectly_comparable.h | 30 + include/__iterator/insert_iterator.h | 81 + include/__iterator/istream_iterator.h | 92 + include/__iterator/istreambuf_iterator.h | 105 + include/__iterator/iter_move.h | 93 + include/__iterator/iter_swap.h | 106 + include/__iterator/iterator.h | 35 + include/__iterator/iterator_traits.h | 495 ++ include/__iterator/move_iterator.h | 185 + include/__iterator/next.h | 86 + include/__iterator/ostream_iterator.h | 70 + include/__iterator/ostreambuf_iterator.h | 76 + include/__iterator/prev.h | 78 + include/__iterator/projected.h | 40 + include/__iterator/readable_traits.h | 86 + include/__iterator/reverse_access.h | 104 + include/__iterator/reverse_iterator.h | 235 + include/__iterator/size.h | 53 + include/__iterator/unreachable_sentinel.h | 38 + include/__iterator/wrap_iter.h | 285 + include/__libcpp_version | 2 +- include/__locale | 137 +- include/__mbstate_t.h | 44 + include/__memory/{base.h => addressof.h} | 57 +- .../{utilities.h => allocation_guard.h} | 13 +- include/__memory/allocator.h | 249 + include/__memory/allocator_arg_t.h | 78 + include/__memory/allocator_traits.h | 720 +-- include/__memory/auto_ptr.h | 81 + include/__memory/compressed_pair.h | 185 + include/__memory/concepts.h | 68 + include/__memory/construct_at.h | 110 + include/__memory/pointer_traits.h | 82 +- include/__memory/ranges_construct_at.h | 124 + .../ranges_uninitialized_algorithms.h | 318 + include/__memory/raw_storage_iterator.h | 68 + include/__memory/shared_ptr.h | 1719 ++++++ include/__memory/temporary_buffer.h | 84 + include/__memory/uninitialized_algorithms.h | 350 ++ include/__memory/unique_ptr.h | 768 +++ include/__memory/uses_allocator.h | 60 + include/__memory/voidify.h | 30 + include/__mutex_base | 25 +- include/__node_handle | 55 +- include/__nullptr | 8 +- include/__numeric/accumulate.h | 52 + include/__numeric/adjacent_difference.h | 72 + include/__numeric/exclusive_scan.h | 53 + include/__numeric/gcd_lcm.h | 96 + include/__numeric/inclusive_scan.h | 60 + include/__numeric/inner_product.h | 53 + include/__numeric/iota.h | 32 + include/__numeric/midpoint.h | 85 + include/__numeric/partial_sum.h | 70 + include/__numeric/reduce.h | 47 + include/__numeric/transform_exclusive_scan.h | 49 + include/__numeric/transform_inclusive_scan.h | 58 + include/__numeric/transform_reduce.h | 54 + include/__random/bernoulli_distribution.h | 143 + include/__random/binomial_distribution.h | 225 + include/__random/cauchy_distribution.h | 162 + include/__random/chi_squared_distribution.h | 144 + include/__random/clamp_to_integral.h | 60 + include/__random/default_random_engine.h | 25 + include/__random/discard_block_engine.h | 203 + include/__random/discrete_distribution.h | 260 + include/__random/exponential_distribution.h | 155 + include/__random/extreme_value_distribution.h | 161 + include/__random/fisher_f_distribution.h | 160 + include/__random/gamma_distribution.h | 213 + include/__random/generate_canonical.h | 53 + include/__random/geometric_distribution.h | 141 + include/__random/independent_bits_engine.h | 271 + include/__random/is_seed_sequence.h | 31 + include/__random/knuth_b.h | 26 + include/__random/linear_congruential_engine.h | 398 ++ include/__random/log2.h | 74 + include/__random/lognormal_distribution.h | 299 + include/__random/mersenne_twister_engine.h | 534 ++ .../__random/negative_binomial_distribution.h | 176 + include/__random/normal_distribution.h | 208 + .../piecewise_constant_distribution.h | 356 ++ .../__random/piecewise_linear_distribution.h | 372 ++ include/__random/poisson_distribution.h | 277 + include/__random/random_device.h | 88 + include/__random/ranlux.h | 31 + include/__random/seed_seq.h | 153 + include/__random/shuffle_order_engine.h | 283 + include/__random/student_t_distribution.h | 153 + include/__random/subtract_with_carry_engine.h | 352 ++ include/__random/uniform_int_distribution.h | 290 + .../__random/uniform_random_bit_generator.h | 45 + include/__random/uniform_real_distribution.h | 160 + include/__random/weibull_distribution.h | 155 + include/__ranges/access.h | 227 + include/__ranges/all.h | 82 + include/__ranges/common_view.h | 135 + include/__ranges/concepts.h | 146 + include/__ranges/copyable_box.h | 178 + include/__ranges/counted.h | 81 + include/__ranges/dangling.h | 42 + include/__ranges/data.h | 106 + include/__ranges/drop_view.h | 127 + include/__ranges/empty.h | 82 + include/__ranges/empty_view.h | 45 + include/__ranges/enable_borrowed_range.h | 40 + include/__ranges/enable_view.h | 47 + include/__ranges/iota_view.h | 408 ++ include/__ranges/join_view.h | 350 ++ include/__ranges/non_propagating_cache.h | 114 + include/__ranges/owning_view.h | 81 + include/__ranges/range_adaptor.h | 73 + include/__ranges/ref_view.h | 86 + include/__ranges/reverse_view.h | 190 + include/__ranges/single_view.h | 81 + include/__ranges/size.h | 135 + include/__ranges/subrange.h | 289 + include/__ranges/take_view.h | 185 + include/__ranges/transform_view.h | 440 ++ include/__ranges/view_interface.h | 195 + include/__split_buffer | 22 +- include/__std_stream | 6 +- include/__string | 177 +- .../android/locale_bionic.h | 6 +- .../{support => __support}/fuchsia/xlocale.h | 6 +- include/__support/ibm/gettod_zos.h | 53 + include/{support => __support}/ibm/limits.h | 2 +- include/__support/ibm/locale_mgmt_zos.h | 53 + include/__support/ibm/nanosleep.h | 55 + include/{support => __support}/ibm/support.h | 2 +- include/__support/ibm/xlocale.h | 133 + include/{support => __support}/musl/xlocale.h | 2 +- .../{support => __support}/newlib/xlocale.h | 6 +- .../nuttx => __support/openbsd}/xlocale.h | 15 +- .../solaris/floatingpoint.h | 0 .../{support => __support}/solaris/wchar.h | 0 .../{support => __support}/solaris/xlocale.h | 0 .../win32/limits_msvc_win32.h | 6 +- .../win32/locale_win32.h | 25 +- .../xlocale/__nop_locale_mgmt.h | 2 +- .../xlocale/__posix_l_fallback.h | 2 +- .../xlocale/__strtonum_fallback.h | 2 +- include/__thread/poll_with_backoff.h | 69 + include/__thread/timed_backoff_policy.h | 45 + include/__threading_support | 160 +- include/__tree | 26 +- include/__tuple | 48 +- include/__undef_macros | 2 +- include/__utility/as_const.h | 33 + include/__utility/auto_cast.h | 22 + include/__utility/cmp.h | 110 + include/__utility/declval.h | 34 + include/__utility/exchange.h | 37 + include/__utility/forward.h | 37 + include/__utility/in_place.h | 58 + include/__utility/integer_sequence.h | 78 + include/__utility/move.h | 47 + include/__utility/pair.h | 609 ++ include/__utility/piecewise_construct.h | 29 + include/__utility/priority_tag.h | 26 + include/__utility/rel_ops.h | 62 + include/__utility/swap.h | 50 + include/__utility/to_underlying.h | 40 + include/__utility/transaction.h | 91 + include/__variant/monostate.h | 60 + include/algorithm | 5260 +--------------- include/any | 9 +- include/array | 21 +- include/atomic | 613 +- include/barrier | 12 +- include/bit | 214 +- include/bitset | 31 +- include/cassert | 2 +- include/ccomplex | 4 +- include/cctype | 32 +- include/cerrno | 4 +- include/cfenv | 32 +- include/cfloat | 4 +- include/charconv | 189 +- include/chrono | 2304 +------ include/cinttypes | 18 +- include/ciso646 | 4 +- include/climits | 4 +- include/clocale | 12 +- include/cmath | 481 +- include/codecvt | 11 +- include/compare | 685 +-- include/complex | 21 +- include/complex.h | 6 +- include/concepts | 55 +- include/condition_variable | 5 +- include/coroutine | 335 +- include/csetjmp | 8 +- include/csignal | 10 +- include/cstdarg | 6 +- include/cstdbool | 4 +- include/cstddef | 21 +- include/cstdint | 60 +- include/cstdio | 114 +- include/cstdlib | 102 +- include/cstring | 52 +- include/ctgmath | 4 +- include/ctime | 38 +- include/ctype.h | 4 +- include/cwchar | 144 +- include/cwctype | 48 +- include/deque | 152 +- include/errno.h | 8 +- include/exception | 53 +- include/execution | 7 +- include/experimental/__config | 10 +- include/experimental/__memory | 33 +- include/experimental/algorithm | 13 +- include/experimental/coroutine | 16 +- include/experimental/deque | 4 +- include/experimental/filesystem | 2 +- include/experimental/forward_list | 4 +- include/experimental/functional | 57 +- include/experimental/iterator | 14 +- include/experimental/list | 4 +- include/experimental/map | 4 +- include/experimental/memory_resource | 24 +- include/experimental/propagate_const | 13 +- include/experimental/regex | 10 +- include/experimental/set | 4 +- include/experimental/simd | 38 +- include/experimental/string | 6 +- include/experimental/type_traits | 4 +- include/experimental/unordered_map | 4 +- include/experimental/unordered_set | 4 +- include/experimental/utility | 2 +- include/experimental/vector | 4 +- include/ext/__hash | 9 +- include/ext/hash_map | 12 +- include/ext/hash_set | 14 +- include/fenv.h | 2 +- include/filesystem | 2725 +-------- include/float.h | 4 +- include/format | 564 ++ include/forward_list | 100 +- include/fstream | 99 +- include/functional | 2792 +-------- include/future | 66 +- include/initializer_list | 8 +- include/inttypes.h | 4 +- include/iomanip | 22 +- include/ios | 35 +- include/iosfwd | 56 +- include/iostream | 22 +- include/istream | 107 +- include/iterator | 1923 +----- include/latch | 5 +- include/limits | 8 +- include/limits.h | 4 +- include/list | 380 +- include/locale | 465 +- include/locale.h | 6 +- include/map | 196 +- include/math.h | 348 +- include/memory | 3662 +----------- include/module.modulemap | 488 +- include/mutex | 52 +- include/new | 31 +- include/numbers | 78 +- include/numeric | 496 +- include/optional | 468 +- include/ostream | 139 +- include/queue | 348 +- include/random | 5320 +---------------- include/ranges | 246 + include/ratio | 35 +- include/regex | 146 +- include/scoped_allocator | 19 +- include/semaphore | 98 +- include/set | 175 +- include/setjmp.h | 4 +- include/shared_mutex | 10 +- include/span | 232 +- include/sstream | 80 +- include/stack | 82 +- include/stdbool.h | 4 +- include/stddef.h | 4 +- include/stdexcept | 6 +- include/stdint.h | 4 +- include/stdio.h | 4 +- include/stdlib.h | 48 +- include/streambuf | 12 +- include/string | 976 ++- include/string.h | 4 +- include/string_view | 228 +- include/strstream | 27 +- include/support/ibm/locale_mgmt_aix.h | 84 - include/support/ibm/nanosleep.h | 38 - include/support/ibm/xlocale.h | 275 - include/system_error | 34 +- include/tgmath.h | 6 +- include/thread | 41 +- include/tuple | 1188 ++-- include/type_traits | 1451 +++-- include/typeindex | 9 +- include/typeinfo | 58 +- include/unordered_map | 586 +- include/unordered_set | 459 +- include/utility | 1491 +---- include/valarray | 243 +- include/variant | 225 +- include/vector | 638 +- include/version | 145 +- include/wchar.h | 14 +- include/wctype.h | 20 +- lib/abi/CHANGELOG.TXT | 100 +- lib/abi/CMakeLists.txt | 2 +- ...stable.exceptions.no_new_in_libcxx.abilist | 2550 ++++++++ ...stable.exceptions.no_new_in_libcxx.abilist | 17 +- ...stable.exceptions.no_new_in_libcxx.abilist | 21 +- src/CMakeLists.txt | 85 +- src/algorithm.cpp | 6 +- src/any.cpp | 8 +- src/atomic.cpp | 11 +- src/barrier.cpp | 8 +- src/bind.cpp | 2 +- src/charconv.cpp | 76 +- src/chrono.cpp | 151 +- src/chrono_system_time_init.h | 2 + src/condition_variable.cpp | 10 +- src/condition_variable_destructor.cpp | 2 +- src/debug.cpp | 4 +- src/exception.cpp | 2 +- src/experimental/memory_resource.cpp | 28 +- .../memory_resource_init_helper.h | 2 + src/filesystem/directory_iterator.cpp | 104 +- src/filesystem/filesystem_common.h | 286 +- src/filesystem/operations.cpp | 488 +- src/filesystem/posix_compat.h | 521 ++ src/format.cpp | 15 + src/functional.cpp | 8 +- src/future.cpp | 12 +- src/hash.cpp | 2 +- src/include/apple_availability.h | 2 +- src/include/atomic_support.h | 4 +- src/include/config_elast.h | 6 +- src/include/refstring.h | 10 +- src/include/ryu/common.h | 107 + src/include/ryu/d2fixed.h | 60 + src/include/ryu/d2fixed_full_table.h | 4451 ++++++++++++++ src/include/ryu/d2s.h | 62 + src/include/ryu/d2s_full_table.h | 368 ++ src/include/ryu/d2s_intrinsics.h | 257 + src/include/ryu/digit_table.h | 68 + src/include/ryu/f2s.h | 55 + src/include/ryu/ryu.h | 148 + .../include/sso_allocator.h | 10 +- src/include/to_chars_floating_point.h | 1076 ++++ src/ios.cpp | 18 +- src/ios.instantiations.cpp | 11 +- src/iostream.cpp | 53 +- src/iostream_init.h | 2 + src/legacy_pointer_safety.cpp | 23 + src/locale.cpp | 641 +- src/memory.cpp | 70 +- src/mutex.cpp | 26 +- src/mutex_destructor.cpp | 4 +- src/new.cpp | 50 +- src/optional.cpp | 10 +- src/random.cpp | 66 +- src/random_shuffle.cpp | 2 +- src/regex.cpp | 122 +- src/ryu/README.txt | 11 + src/ryu/d2fixed.cpp | 669 +++ src/ryu/d2s.cpp | 782 +++ src/ryu/f2s.cpp | 715 +++ src/shared_mutex.cpp | 2 +- src/stdexcept.cpp | 2 +- src/string.cpp | 75 +- src/strstream.cpp | 2 +- src/support/ibm/mbsnrtowcs.cpp | 95 + src/support/ibm/wcsnrtombs.cpp | 93 + src/support/ibm/xlocale_zos.cpp | 137 + src/support/runtime/exception_fallback.ipp | 50 +- src/support/runtime/exception_glibcxx.ipp | 8 +- src/support/runtime/exception_libcxxabi.ipp | 4 +- src/support/runtime/exception_libcxxrt.ipp | 4 +- src/support/runtime/exception_msvc.ipp | 50 +- .../runtime/exception_pointer_cxxabi.ipp | 12 +- .../runtime/exception_pointer_glibcxx.ipp | 14 +- .../runtime/exception_pointer_msvc.ipp | 24 +- .../exception_pointer_unimplemented.ipp | 12 +- src/support/runtime/new_handler_fallback.ipp | 4 +- src/support/runtime/stdexcept_default.ipp | 32 +- src/support/runtime/stdexcept_vcruntime.ipp | 2 +- src/support/solaris/xlocale.cpp | 2 +- src/support/win32/locale_win32.cpp | 6 +- src/support/win32/support.cpp | 16 +- src/support/win32/thread_win32.cpp | 11 +- src/system_error.cpp | 36 +- src/thread.cpp | 4 +- src/typeinfo.cpp | 8 +- src/utility.cpp | 2 +- src/valarray.cpp | 2 +- src/variant.cpp | 2 +- src/vector.cpp | 23 +- 727 files changed, 72687 insertions(+), 45694 deletions(-) delete mode 100644 .arcconfig delete mode 100644 .clang-format delete mode 100644 benchmarks/CMakeLists.txt delete mode 100644 benchmarks/CartesianBenchmarks.h delete mode 100644 benchmarks/ContainerBenchmarks.h delete mode 100644 benchmarks/GenerateInput.h delete mode 100644 benchmarks/Utilities.h delete mode 100644 benchmarks/VariantBenchmarks.h delete mode 100644 benchmarks/algorithms.bench.cpp delete mode 100644 benchmarks/algorithms.partition_point.bench.cpp delete mode 100644 benchmarks/allocation.bench.cpp delete mode 100644 benchmarks/deque.bench.cpp delete mode 100644 benchmarks/filesystem.bench.cpp delete mode 100644 benchmarks/function.bench.cpp delete mode 100644 benchmarks/lit.cfg.py delete mode 100644 benchmarks/lit.site.cfg.py.in delete mode 100644 benchmarks/map.bench.cpp delete mode 100644 benchmarks/ordered_set.bench.cpp delete mode 100644 benchmarks/string.bench.cpp delete mode 100644 benchmarks/stringstream.bench.cpp delete mode 100644 benchmarks/unordered_set_operations.bench.cpp delete mode 100644 benchmarks/util_smartptr.bench.cpp delete mode 100644 benchmarks/variant_visit_1.bench.cpp delete mode 100644 benchmarks/variant_visit_2.bench.cpp delete mode 100644 benchmarks/variant_visit_3.bench.cpp delete mode 100644 benchmarks/vector_operations.bench.cpp delete mode 100644 cmake/Modules/CheckLibcxxAtomic.cmake delete mode 100644 cmake/Modules/HandleCompilerRT.cmake delete mode 100644 cmake/Modules/HandleOutOfTreeLLVM.cmake create mode 100644 cmake/caches/AArch64.cmake create mode 100644 cmake/caches/AIX.cmake create mode 100644 cmake/caches/Armv7Arm.cmake create mode 100644 cmake/caches/Armv7Thumb-noexceptions.cmake create mode 100644 cmake/caches/Armv8Arm.cmake create mode 100644 cmake/caches/Armv8Thumb-noexceptions.cmake create mode 100644 cmake/caches/FreeBSD.cmake delete mode 100644 cmake/caches/Generic-32bits.cmake create mode 100644 cmake/caches/Generic-assertions.cmake create mode 100644 cmake/caches/Generic-debug-iterators.cmake create mode 100644 cmake/caches/Generic-modules.cmake rename cmake/caches/{Generic-nodebug.cmake => Generic-no-debug.cmake} (100%) create mode 100644 cmake/caches/Generic-no-experimental.cmake create mode 100644 cmake/caches/Generic-no-filesystem.cmake create mode 100644 cmake/caches/Generic-no-unicode.cmake create mode 100644 cmake/caches/Generic-no-wide-characters.cmake create mode 100644 cmake/caches/Generic-static.cmake create mode 100644 cmake/caches/MinGW.cmake delete mode 100644 docs/AddingNewCIJobs.rst delete mode 100644 docs/BuildingLibcxx.rst delete mode 100644 docs/CMakeLists.txt delete mode 100644 docs/Contributing.rst delete mode 100644 docs/Cxx1yStatus.rst delete mode 100644 docs/Cxx1yStatusIssuesStatus.csv delete mode 100644 docs/Cxx1yStatusPaperStatus.csv delete mode 100644 docs/Cxx1zStatus.rst delete mode 100644 docs/Cxx1zStatusIssuesStatus.csv delete mode 100644 docs/Cxx1zStatusPaperStatus.csv delete mode 100644 docs/Cxx2aStatus.rst delete mode 100644 docs/Cxx2aStatusIssuesStatus.csv delete mode 100644 docs/Cxx2aStatusPaperStatus.csv delete mode 100644 docs/Cxx2bStatus.rst delete mode 100644 docs/Cxx2bStatusPaperStatus.csv delete mode 100644 docs/DesignDocs/ABIVersioning.rst delete mode 100644 docs/DesignDocs/AvailabilityMarkup.rst delete mode 100644 docs/DesignDocs/CapturingConfigInfo.rst delete mode 100644 docs/DesignDocs/DebugMode.rst delete mode 100644 docs/DesignDocs/ExperimentalFeatures.rst delete mode 100644 docs/DesignDocs/ExtendedCXX03Support.rst delete mode 100644 docs/DesignDocs/FeatureTestMacros.rst delete mode 100644 docs/DesignDocs/FileTimeType.rst delete mode 100644 docs/DesignDocs/ThreadingSupportAPI.rst delete mode 100644 docs/DesignDocs/UniquePtrTrivialAbi.rst delete mode 100644 docs/DesignDocs/VisibilityMacros.rst delete mode 100644 docs/FeatureTestMacroTable.rst delete mode 100644 docs/Helpers/Styles.rst delete mode 100644 docs/Makefile.sphinx delete mode 100644 docs/README.txt delete mode 100644 docs/ReleaseNotes.rst delete mode 100644 docs/TestingLibcxx.rst delete mode 100644 docs/UsingLibcxx.rst delete mode 100644 docs/conf.py delete mode 100644 docs/index.rst create mode 100644 include/__algorithm/adjacent_find.h create mode 100644 include/__algorithm/all_of.h create mode 100644 include/__algorithm/any_of.h create mode 100644 include/__algorithm/binary_search.h create mode 100644 include/__algorithm/clamp.h create mode 100644 include/__algorithm/comp.h create mode 100644 include/__algorithm/comp_ref_type.h create mode 100644 include/__algorithm/copy.h create mode 100644 include/__algorithm/copy_backward.h create mode 100644 include/__algorithm/copy_if.h create mode 100644 include/__algorithm/copy_n.h create mode 100644 include/__algorithm/count.h create mode 100644 include/__algorithm/count_if.h create mode 100644 include/__algorithm/equal.h create mode 100644 include/__algorithm/equal_range.h create mode 100644 include/__algorithm/fill.h create mode 100644 include/__algorithm/fill_n.h create mode 100644 include/__algorithm/find.h create mode 100644 include/__algorithm/find_end.h create mode 100644 include/__algorithm/find_first_of.h create mode 100644 include/__algorithm/find_if.h create mode 100644 include/__algorithm/find_if_not.h create mode 100644 include/__algorithm/for_each.h create mode 100644 include/__algorithm/for_each_n.h create mode 100644 include/__algorithm/generate.h create mode 100644 include/__algorithm/generate_n.h create mode 100644 include/__algorithm/half_positive.h create mode 100644 include/__algorithm/in_in_out_result.h create mode 100644 include/__algorithm/in_in_result.h create mode 100644 include/__algorithm/in_out_result.h create mode 100644 include/__algorithm/includes.h create mode 100644 include/__algorithm/inplace_merge.h create mode 100644 include/__algorithm/is_heap.h create mode 100644 include/__algorithm/is_heap_until.h create mode 100644 include/__algorithm/is_partitioned.h create mode 100644 include/__algorithm/is_permutation.h create mode 100644 include/__algorithm/is_sorted.h create mode 100644 include/__algorithm/is_sorted_until.h create mode 100644 include/__algorithm/iter_swap.h create mode 100644 include/__algorithm/lexicographical_compare.h create mode 100644 include/__algorithm/lower_bound.h create mode 100644 include/__algorithm/make_heap.h create mode 100644 include/__algorithm/max.h create mode 100644 include/__algorithm/max_element.h create mode 100644 include/__algorithm/merge.h create mode 100644 include/__algorithm/min.h create mode 100644 include/__algorithm/min_element.h create mode 100644 include/__algorithm/minmax.h create mode 100644 include/__algorithm/minmax_element.h create mode 100644 include/__algorithm/mismatch.h create mode 100644 include/__algorithm/move.h create mode 100644 include/__algorithm/move_backward.h create mode 100644 include/__algorithm/next_permutation.h create mode 100644 include/__algorithm/none_of.h create mode 100644 include/__algorithm/nth_element.h create mode 100644 include/__algorithm/partial_sort.h create mode 100644 include/__algorithm/partial_sort_copy.h create mode 100644 include/__algorithm/partition.h create mode 100644 include/__algorithm/partition_copy.h create mode 100644 include/__algorithm/partition_point.h create mode 100644 include/__algorithm/pop_heap.h create mode 100644 include/__algorithm/prev_permutation.h create mode 100644 include/__algorithm/push_heap.h create mode 100644 include/__algorithm/remove.h create mode 100644 include/__algorithm/remove_copy.h create mode 100644 include/__algorithm/remove_copy_if.h create mode 100644 include/__algorithm/remove_if.h create mode 100644 include/__algorithm/replace.h create mode 100644 include/__algorithm/replace_copy.h create mode 100644 include/__algorithm/replace_copy_if.h create mode 100644 include/__algorithm/replace_if.h create mode 100644 include/__algorithm/reverse.h create mode 100644 include/__algorithm/reverse_copy.h create mode 100644 include/__algorithm/rotate.h create mode 100644 include/__algorithm/rotate_copy.h create mode 100644 include/__algorithm/sample.h create mode 100644 include/__algorithm/search.h create mode 100644 include/__algorithm/search_n.h create mode 100644 include/__algorithm/set_difference.h create mode 100644 include/__algorithm/set_intersection.h create mode 100644 include/__algorithm/set_symmetric_difference.h create mode 100644 include/__algorithm/set_union.h create mode 100644 include/__algorithm/shift_left.h create mode 100644 include/__algorithm/shift_right.h create mode 100644 include/__algorithm/shuffle.h create mode 100644 include/__algorithm/sift_down.h create mode 100644 include/__algorithm/sort.h create mode 100644 include/__algorithm/sort_heap.h create mode 100644 include/__algorithm/stable_partition.h create mode 100644 include/__algorithm/stable_sort.h create mode 100644 include/__algorithm/swap_ranges.h create mode 100644 include/__algorithm/transform.h create mode 100644 include/__algorithm/unique.h create mode 100644 include/__algorithm/unique_copy.h create mode 100644 include/__algorithm/unwrap_iter.h create mode 100644 include/__algorithm/upper_bound.h create mode 100644 include/__bit/bit_cast.h create mode 100644 include/__bit/byteswap.h create mode 100644 include/__bits create mode 100644 include/__charconv/chars_format.h create mode 100644 include/__charconv/from_chars_result.h create mode 100644 include/__charconv/to_chars_result.h create mode 100644 include/__chrono/calendar.h create mode 100644 include/__chrono/convert_to_timespec.h create mode 100644 include/__chrono/duration.h create mode 100644 include/__chrono/file_clock.h create mode 100644 include/__chrono/high_resolution_clock.h create mode 100644 include/__chrono/steady_clock.h create mode 100644 include/__chrono/system_clock.h create mode 100644 include/__chrono/time_point.h create mode 100644 include/__compare/common_comparison_category.h create mode 100644 include/__compare/compare_partial_order_fallback.h create mode 100644 include/__compare/compare_strong_order_fallback.h create mode 100644 include/__compare/compare_three_way.h create mode 100644 include/__compare/compare_three_way_result.h create mode 100644 include/__compare/compare_weak_order_fallback.h create mode 100644 include/__compare/is_eq.h create mode 100644 include/__compare/ordering.h create mode 100644 include/__compare/partial_order.h create mode 100644 include/__compare/strong_order.h create mode 100644 include/__compare/synth_three_way.h create mode 100644 include/__compare/three_way_comparable.h create mode 100644 include/__compare/weak_order.h create mode 100644 include/__concepts/arithmetic.h create mode 100644 include/__concepts/assignable.h create mode 100644 include/__concepts/boolean_testable.h create mode 100644 include/__concepts/class_or_enum.h create mode 100644 include/__concepts/common_reference_with.h create mode 100644 include/__concepts/common_with.h create mode 100644 include/__concepts/constructible.h create mode 100644 include/__concepts/convertible_to.h create mode 100644 include/__concepts/copyable.h create mode 100644 include/__concepts/derived_from.h create mode 100644 include/__concepts/destructible.h create mode 100644 include/__concepts/different_from.h create mode 100644 include/__concepts/equality_comparable.h create mode 100644 include/__concepts/invocable.h create mode 100644 include/__concepts/movable.h create mode 100644 include/__concepts/predicate.h create mode 100644 include/__concepts/regular.h create mode 100644 include/__concepts/relation.h create mode 100644 include/__concepts/same_as.h create mode 100644 include/__concepts/semiregular.h create mode 100644 include/__concepts/swappable.h create mode 100644 include/__concepts/totally_ordered.h create mode 100644 include/__coroutine/coroutine_handle.h create mode 100644 include/__coroutine/coroutine_traits.h create mode 100644 include/__coroutine/noop_coroutine_handle.h create mode 100644 include/__coroutine/trivial_awaitables.h create mode 100644 include/__filesystem/copy_options.h create mode 100644 include/__filesystem/directory_entry.h create mode 100644 include/__filesystem/directory_iterator.h create mode 100644 include/__filesystem/directory_options.h create mode 100644 include/__filesystem/file_status.h create mode 100644 include/__filesystem/file_time_type.h create mode 100644 include/__filesystem/file_type.h create mode 100644 include/__filesystem/filesystem_error.h create mode 100644 include/__filesystem/operations.h create mode 100644 include/__filesystem/path.h create mode 100644 include/__filesystem/path_iterator.h create mode 100644 include/__filesystem/perm_options.h create mode 100644 include/__filesystem/perms.h create mode 100644 include/__filesystem/recursive_directory_iterator.h create mode 100644 include/__filesystem/space_info.h create mode 100644 include/__filesystem/u8path.h create mode 100644 include/__format/format_arg.h create mode 100644 include/__format/format_args.h create mode 100644 include/__format/format_context.h create mode 100644 include/__format/format_error.h create mode 100644 include/__format/format_fwd.h create mode 100644 include/__format/format_parse_context.h create mode 100644 include/__format/format_string.h create mode 100644 include/__format/format_to_n_result.h create mode 100644 include/__format/formatter.h create mode 100644 include/__format/formatter_bool.h create mode 100644 include/__format/formatter_char.h create mode 100644 include/__format/formatter_floating_point.h create mode 100644 include/__format/formatter_integer.h create mode 100644 include/__format/formatter_integral.h create mode 100644 include/__format/formatter_pointer.h create mode 100644 include/__format/formatter_string.h create mode 100644 include/__format/parser_std_format_spec.h create mode 100644 include/__functional/binary_function.h create mode 100644 include/__functional/binary_negate.h create mode 100644 include/__functional/bind.h create mode 100644 include/__functional/bind_back.h create mode 100644 include/__functional/bind_front.h create mode 100644 include/__functional/binder1st.h create mode 100644 include/__functional/binder2nd.h create mode 100644 include/__functional/compose.h create mode 100644 include/__functional/default_searcher.h rename include/{__functional_03 => __functional/function.h} (52%) create mode 100644 include/__functional/hash.h create mode 100644 include/__functional/identity.h create mode 100644 include/__functional/invoke.h create mode 100644 include/__functional/is_transparent.h create mode 100644 include/__functional/mem_fn.h create mode 100644 include/__functional/mem_fun_ref.h create mode 100644 include/__functional/not_fn.h create mode 100644 include/__functional/operations.h create mode 100644 include/__functional/perfect_forward.h create mode 100644 include/__functional/pointer_to_binary_function.h create mode 100644 include/__functional/pointer_to_unary_function.h create mode 100644 include/__functional/ranges_operations.h create mode 100644 include/__functional/reference_wrapper.h create mode 100644 include/__functional/unary_function.h create mode 100644 include/__functional/unary_negate.h create mode 100644 include/__functional/unwrap_ref.h create mode 100644 include/__functional/weak_result_type.h delete mode 100644 include/__functional_base_03 create mode 100644 include/__iterator/access.h create mode 100644 include/__iterator/advance.h create mode 100644 include/__iterator/back_insert_iterator.h create mode 100644 include/__iterator/common_iterator.h create mode 100644 include/__iterator/concepts.h create mode 100644 include/__iterator/counted_iterator.h create mode 100644 include/__iterator/data.h create mode 100644 include/__iterator/default_sentinel.h create mode 100644 include/__iterator/distance.h create mode 100644 include/__iterator/empty.h create mode 100644 include/__iterator/erase_if_container.h create mode 100644 include/__iterator/front_insert_iterator.h create mode 100644 include/__iterator/incrementable_traits.h create mode 100644 include/__iterator/indirectly_comparable.h create mode 100644 include/__iterator/insert_iterator.h create mode 100644 include/__iterator/istream_iterator.h create mode 100644 include/__iterator/istreambuf_iterator.h create mode 100644 include/__iterator/iter_move.h create mode 100644 include/__iterator/iter_swap.h create mode 100644 include/__iterator/iterator.h create mode 100644 include/__iterator/iterator_traits.h create mode 100644 include/__iterator/move_iterator.h create mode 100644 include/__iterator/next.h create mode 100644 include/__iterator/ostream_iterator.h create mode 100644 include/__iterator/ostreambuf_iterator.h create mode 100644 include/__iterator/prev.h create mode 100644 include/__iterator/projected.h create mode 100644 include/__iterator/readable_traits.h create mode 100644 include/__iterator/reverse_access.h create mode 100644 include/__iterator/reverse_iterator.h create mode 100644 include/__iterator/size.h create mode 100644 include/__iterator/unreachable_sentinel.h create mode 100644 include/__iterator/wrap_iter.h create mode 100644 include/__mbstate_t.h rename include/__memory/{base.h => addressof.h} (59%) rename include/__memory/{utilities.h => allocation_guard.h} (93%) create mode 100644 include/__memory/allocator.h create mode 100644 include/__memory/allocator_arg_t.h create mode 100644 include/__memory/auto_ptr.h create mode 100644 include/__memory/compressed_pair.h create mode 100644 include/__memory/concepts.h create mode 100644 include/__memory/construct_at.h create mode 100644 include/__memory/ranges_construct_at.h create mode 100644 include/__memory/ranges_uninitialized_algorithms.h create mode 100644 include/__memory/raw_storage_iterator.h create mode 100644 include/__memory/shared_ptr.h create mode 100644 include/__memory/temporary_buffer.h create mode 100644 include/__memory/uninitialized_algorithms.h create mode 100644 include/__memory/unique_ptr.h create mode 100644 include/__memory/uses_allocator.h create mode 100644 include/__memory/voidify.h create mode 100644 include/__numeric/accumulate.h create mode 100644 include/__numeric/adjacent_difference.h create mode 100644 include/__numeric/exclusive_scan.h create mode 100644 include/__numeric/gcd_lcm.h create mode 100644 include/__numeric/inclusive_scan.h create mode 100644 include/__numeric/inner_product.h create mode 100644 include/__numeric/iota.h create mode 100644 include/__numeric/midpoint.h create mode 100644 include/__numeric/partial_sum.h create mode 100644 include/__numeric/reduce.h create mode 100644 include/__numeric/transform_exclusive_scan.h create mode 100644 include/__numeric/transform_inclusive_scan.h create mode 100644 include/__numeric/transform_reduce.h create mode 100644 include/__random/bernoulli_distribution.h create mode 100644 include/__random/binomial_distribution.h create mode 100644 include/__random/cauchy_distribution.h create mode 100644 include/__random/chi_squared_distribution.h create mode 100644 include/__random/clamp_to_integral.h create mode 100644 include/__random/default_random_engine.h create mode 100644 include/__random/discard_block_engine.h create mode 100644 include/__random/discrete_distribution.h create mode 100644 include/__random/exponential_distribution.h create mode 100644 include/__random/extreme_value_distribution.h create mode 100644 include/__random/fisher_f_distribution.h create mode 100644 include/__random/gamma_distribution.h create mode 100644 include/__random/generate_canonical.h create mode 100644 include/__random/geometric_distribution.h create mode 100644 include/__random/independent_bits_engine.h create mode 100644 include/__random/is_seed_sequence.h create mode 100644 include/__random/knuth_b.h create mode 100644 include/__random/linear_congruential_engine.h create mode 100644 include/__random/log2.h create mode 100644 include/__random/lognormal_distribution.h create mode 100644 include/__random/mersenne_twister_engine.h create mode 100644 include/__random/negative_binomial_distribution.h create mode 100644 include/__random/normal_distribution.h create mode 100644 include/__random/piecewise_constant_distribution.h create mode 100644 include/__random/piecewise_linear_distribution.h create mode 100644 include/__random/poisson_distribution.h create mode 100644 include/__random/random_device.h create mode 100644 include/__random/ranlux.h create mode 100644 include/__random/seed_seq.h create mode 100644 include/__random/shuffle_order_engine.h create mode 100644 include/__random/student_t_distribution.h create mode 100644 include/__random/subtract_with_carry_engine.h create mode 100644 include/__random/uniform_int_distribution.h create mode 100644 include/__random/uniform_random_bit_generator.h create mode 100644 include/__random/uniform_real_distribution.h create mode 100644 include/__random/weibull_distribution.h create mode 100644 include/__ranges/access.h create mode 100644 include/__ranges/all.h create mode 100644 include/__ranges/common_view.h create mode 100644 include/__ranges/concepts.h create mode 100644 include/__ranges/copyable_box.h create mode 100644 include/__ranges/counted.h create mode 100644 include/__ranges/dangling.h create mode 100644 include/__ranges/data.h create mode 100644 include/__ranges/drop_view.h create mode 100644 include/__ranges/empty.h create mode 100644 include/__ranges/empty_view.h create mode 100644 include/__ranges/enable_borrowed_range.h create mode 100644 include/__ranges/enable_view.h create mode 100644 include/__ranges/iota_view.h create mode 100644 include/__ranges/join_view.h create mode 100644 include/__ranges/non_propagating_cache.h create mode 100644 include/__ranges/owning_view.h create mode 100644 include/__ranges/range_adaptor.h create mode 100644 include/__ranges/ref_view.h create mode 100644 include/__ranges/reverse_view.h create mode 100644 include/__ranges/single_view.h create mode 100644 include/__ranges/size.h create mode 100644 include/__ranges/subrange.h create mode 100644 include/__ranges/take_view.h create mode 100644 include/__ranges/transform_view.h create mode 100644 include/__ranges/view_interface.h rename include/{support => __support}/android/locale_bionic.h (90%) rename include/{support => __support}/fuchsia/xlocale.h (74%) create mode 100644 include/__support/ibm/gettod_zos.h rename include/{support => __support}/ibm/limits.h (97%) create mode 100644 include/__support/ibm/locale_mgmt_zos.h create mode 100644 include/__support/ibm/nanosleep.h rename include/{support => __support}/ibm/support.h (95%) create mode 100644 include/__support/ibm/xlocale.h rename include/{support => __support}/musl/xlocale.h (95%) rename include/{support => __support}/newlib/xlocale.h (82%) rename include/{support/nuttx => __support/openbsd}/xlocale.h (50%) rename include/{support => __support}/solaris/floatingpoint.h (100%) rename include/{support => __support}/solaris/wchar.h (100%) rename include/{support => __support}/solaris/xlocale.h (100%) rename include/{support => __support}/win32/limits_msvc_win32.h (96%) rename include/{support => __support}/win32/locale_win32.h (93%) rename include/{support => __support}/xlocale/__nop_locale_mgmt.h (94%) rename include/{support => __support}/xlocale/__posix_l_fallback.h (98%) rename include/{support => __support}/xlocale/__strtonum_fallback.h (96%) create mode 100644 include/__thread/poll_with_backoff.h create mode 100644 include/__thread/timed_backoff_policy.h create mode 100644 include/__utility/as_const.h create mode 100644 include/__utility/auto_cast.h create mode 100644 include/__utility/cmp.h create mode 100644 include/__utility/declval.h create mode 100644 include/__utility/exchange.h create mode 100644 include/__utility/forward.h create mode 100644 include/__utility/in_place.h create mode 100644 include/__utility/integer_sequence.h create mode 100644 include/__utility/move.h create mode 100644 include/__utility/pair.h create mode 100644 include/__utility/piecewise_construct.h create mode 100644 include/__utility/priority_tag.h create mode 100644 include/__utility/rel_ops.h create mode 100644 include/__utility/swap.h create mode 100644 include/__utility/to_underlying.h create mode 100644 include/__utility/transaction.h create mode 100644 include/__variant/monostate.h create mode 100644 include/format create mode 100644 include/ranges delete mode 100644 include/support/ibm/locale_mgmt_aix.h delete mode 100644 include/support/ibm/nanosleep.h delete mode 100644 include/support/ibm/xlocale.h create mode 100644 lib/abi/arm64-apple-darwin.libcxxabi.v1.stable.exceptions.no_new_in_libcxx.abilist create mode 100644 src/chrono_system_time_init.h create mode 100644 src/experimental/memory_resource_init_helper.h create mode 100644 src/filesystem/posix_compat.h create mode 100644 src/format.cpp create mode 100644 src/include/ryu/common.h create mode 100644 src/include/ryu/d2fixed.h create mode 100644 src/include/ryu/d2fixed_full_table.h create mode 100644 src/include/ryu/d2s.h create mode 100644 src/include/ryu/d2s_full_table.h create mode 100644 src/include/ryu/d2s_intrinsics.h create mode 100644 src/include/ryu/digit_table.h create mode 100644 src/include/ryu/f2s.h create mode 100644 src/include/ryu/ryu.h rename include/__sso_allocator => src/include/sso_allocator.h (89%) create mode 100644 src/include/to_chars_floating_point.h create mode 100644 src/iostream_init.h create mode 100644 src/legacy_pointer_safety.cpp create mode 100644 src/ryu/README.txt create mode 100644 src/ryu/d2fixed.cpp create mode 100644 src/ryu/d2s.cpp create mode 100644 src/ryu/f2s.cpp create mode 100644 src/support/ibm/mbsnrtowcs.cpp create mode 100644 src/support/ibm/wcsnrtombs.cpp create mode 100644 src/support/ibm/xlocale_zos.cpp diff --git a/.arcconfig b/.arcconfig deleted file mode 100644 index b7486508..00000000 --- a/.arcconfig +++ /dev/null @@ -1,4 +0,0 @@ -{ - "repository.callsign" : "CXX", - "conduit_uri" : "https://reviews.llvm.org/" -} diff --git a/.clang-format b/.clang-format deleted file mode 100644 index dd596813..00000000 --- a/.clang-format +++ /dev/null @@ -1,13 +0,0 @@ -BasedOnStyle: LLVM - ---- -Language: Cpp -Standard: Cpp03 - -AlwaysBreakTemplateDeclarations: true -PointerAlignment: Left - -# Disable formatting options which may break tests. -SortIncludes: false -ReflowComments: false ---- diff --git a/CMakeLists.txt b/CMakeLists.txt index f4c7e999..35c2ce51 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,60 +10,49 @@ endif() #=============================================================================== cmake_minimum_required(VERSION 3.13.4) -if(POLICY CMP0042) - cmake_policy(SET CMP0042 NEW) # Set MACOSX_RPATH=YES by default -endif() -if(POLICY CMP0022) - cmake_policy(SET CMP0022 NEW) # Required when interacting with LLVM and Clang -endif() -if(POLICY CMP0068) - cmake_policy(SET CMP0068 NEW) - set(CMAKE_BUILD_WITH_INSTALL_NAME_DIR ON) -endif() +set(LLVM_COMMON_CMAKE_UTILS "${CMAKE_CURRENT_SOURCE_DIR}/../cmake") # Add path for custom modules -set(CMAKE_MODULE_PATH +list(INSERT CMAKE_MODULE_PATH 0 "${CMAKE_CURRENT_SOURCE_DIR}/cmake" "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules" - ${CMAKE_MODULE_PATH} + "${LLVM_COMMON_CMAKE_UTILS}" + "${LLVM_COMMON_CMAKE_UTILS}/Modules" ) +set(CMAKE_FOLDER "libc++") + set(LIBCXX_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}) set(LIBCXX_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) set(LIBCXX_BINARY_INCLUDE_DIR "${LIBCXX_BINARY_DIR}/include/c++build") if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR OR LIBCXX_STANDALONE_BUILD) + message(WARNING "The Standalone build is deprecated in this release. Please use one of the ways " + "described at https://libcxx.llvm.org/BuildingLibcxx.html for building libc++.") project(libcxx CXX C) set(PACKAGE_NAME libcxx) - set(PACKAGE_VERSION 12.0.0git) + set(PACKAGE_VERSION 14.0.0git) set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") set(PACKAGE_BUGREPORT "llvm-bugs@lists.llvm.org") # In a standalone build, we don't have llvm to automatically generate the # llvm-lit script for us. So we need to provide an explicit directory that # the configurator should write the script into. - set(LIBCXX_STANDALONE_BUILD 1) + set(LIBCXX_STANDALONE_BUILD TRUE) set(LLVM_LIT_OUTPUT_DIR "${LIBCXX_BINARY_DIR}/bin") +endif() + +# Must go below project(..) +include(GNUInstallDirs) +if (LIBCXX_STANDALONE_BUILD) # Find the LLVM sources and simulate LLVM CMake options. include(HandleOutOfTreeLLVM) -endif() -if (LIBCXX_STANDALONE_BUILD) find_package(Python3 COMPONENTS Interpreter) if(NOT Python3_Interpreter_FOUND) - message(WARNING "Python3 not found, using python2 as a fallback") - find_package(Python2 COMPONENTS Interpreter REQUIRED) - if(Python2_VERSION VERSION_LESS 2.7) - message(SEND_ERROR "Python 2.7 or newer is required") - endif() - - # Treat python2 as python3 - add_executable(Python3::Interpreter IMPORTED) - set_target_properties(Python3::Interpreter PROPERTIES - IMPORTED_LOCATION ${Python2_EXECUTABLE}) - set(Python3_EXECUTABLE ${Python2_EXECUTABLE}) + message(SEND_ERROR "Python3 not found. Python3 is required") endif() endif() @@ -97,7 +86,11 @@ option(LIBCXX_ENABLE_SHARED "Build libc++ as a shared library." ON) option(LIBCXX_ENABLE_STATIC "Build libc++ as a static library." ON) option(LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY "Build libc++experimental.a" ON) set(ENABLE_FILESYSTEM_DEFAULT ON) -if (WIN32) +if (WIN32 AND NOT MINGW) + # Filesystem is buildable for windows, but it requires __int128 helper + # functions, that currently are provided by libgcc or compiler_rt builtins. + # These are available in MinGW environments, but not currently in MSVC + # environments. set(ENABLE_FILESYSTEM_DEFAULT OFF) endif() option(LIBCXX_ENABLE_FILESYSTEM "Build filesystem as part of the main libc++ library" @@ -121,6 +114,16 @@ option(LIBCXX_ENABLE_LOCALIZATION the C locale API (e.g. embedded). When localization is not supported, several parts of the library will be disabled: , , will be completely unusable, and other parts may be only partly available." ON) +option(LIBCXX_ENABLE_UNICODE + "Whether to include support for Unicode in the library. Disabling Unicode can + be useful when porting to platforms that don't support UTF-8 encoding (e.g. + embedded)." ON) +option(LIBCXX_ENABLE_WIDE_CHARACTERS + "Whether to include support for wide characters in the library. Disabling + wide character support can be useful when porting to platforms that don't + support the C functionality for wide characters. When wide characters are + not supported, several parts of the library will be disabled, notably the + wide character specializations of std::basic_string." ON) option(LIBCXX_ENABLE_VENDOR_AVAILABILITY_ANNOTATIONS "Whether to turn on vendor availability annotations on declarations that depend on definitions in a shared library. By default, we assume that we're not building @@ -128,8 +131,17 @@ option(LIBCXX_ENABLE_VENDOR_AVAILABILITY_ANNOTATIONS to provide compile-time errors when using features unavailable on some version of the shared library they shipped should turn this on and see `include/__availability` for more details." OFF) -set(LIBCXX_TEST_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/test/configs/legacy.cfg.in" CACHE STRING - "The Lit testing configuration to use when running the tests.") +option(LIBCXX_ENABLE_INCOMPLETE_FEATURES + "Whether to enable support for incomplete library features. Incomplete features + are new library features under development. These features don't guarantee + ABI stability nor the quality of completed library features. Vendors + shipping the library may want to disable this option." OFF) +set(LIBCXX_TEST_CONFIG "legacy.cfg.in" CACHE STRING + "The path to the Lit testing configuration to use when running the tests. + If a relative path is provided, it is assumed to be relative to '/libcxx/test/configs'.") +if (NOT IS_ABSOLUTE "${LIBCXX_TEST_CONFIG}") + set(LIBCXX_TEST_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/test/configs/${LIBCXX_TEST_CONFIG}") +endif() set(LIBCXX_TEST_PARAMS "" CACHE STRING "A list of parameters to run the Lit test suite with.") @@ -190,6 +202,7 @@ endif() option(LIBCXX_HIDE_FROM_ABI_PER_TU_BY_DEFAULT "Enable per TU ABI insulation by default. To be used by vendors." OFF) set(LIBCXX_ABI_DEFINES "" CACHE STRING "A semicolon separated list of ABI macros to define in the site config header.") +option(LIBCXX_EXTRA_SITE_DEFINES "Extra defines to add into __config_site") option(LIBCXX_USE_COMPILER_RT "Use compiler-rt instead of libgcc" OFF) set(LIBCXX_LIBCPPABI_VERSION "2" CACHE STRING "Version of libc++abi's ABI to re-export from libc++ when re-exporting is enabled. Note that this is not related to the version of libc++'s ABI itself!") @@ -255,19 +268,34 @@ option(LIBCXX_ENABLE_NEW_DELETE_DEFINITIONS option(LIBCXXABI_USE_LLVM_UNWINDER "Build and use the LLVM unwinder." OFF) # Target options -------------------------------------------------------------- -option(LIBCXX_BUILD_32_BITS "Build 32 bit libc++." ${LLVM_BUILD_32_BITS}) -set(LIBCXX_TARGET_TRIPLE "" CACHE STRING "Use alternate target triple.") -set(LIBCXX_SYSROOT "" CACHE STRING "Use alternate sysroot.") -set(LIBCXX_GCC_TOOLCHAIN "" CACHE STRING "Use alternate GCC toolchain.") +option(LIBCXX_BUILD_32_BITS "Build 32 bit multilib libc++. This option is not supported anymore when building the runtimes. Please specify a full triple instead." ${LLVM_BUILD_32_BITS}) +if (LIBCXX_BUILD_32_BITS) + message(FATAL_ERROR "LIBCXX_BUILD_32_BITS is not supported anymore when building the runtimes, please specify a full triple instead.") +endif() + +if(NOT CMAKE_SYSROOT AND LIBCXX_SYSROOT) + message(WARNING "LIBCXX_SYSROOT is deprecated, please use CMAKE_SYSROOT instead") +endif() +if(NOT CMAKE_CXX_COMPILER_TARGET AND LIBCXX_TARGET_TRIPLE) + message(WARNING "LIBCXX_TARGET_TRIPLE is deprecated, please use CMAKE_CXX_COMPILER_TARGET instead") +endif() +if(NOT CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN AND LIBCXX_GCC_TOOLCHAIN) + message(WARNING "LIBCXX_GCC_TOOLCHAIN is deprecated, please use CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN instead") +endif() + +if(CMAKE_CXX_COMPILER_TARGET) + set(LIBCXX_DEFAULT_TARGET_TRIPLE "${CMAKE_CXX_COMPILER_TARGET}") +else() + set(LIBCXX_DEFAULT_TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}") +endif() +set(LIBCXX_TARGET_TRIPLE "${LIBCXX_DEFAULT_TARGET_TRIPLE}" CACHE STRING "Use alternate target triple.") +set(LIBCXX_SYSROOT "${CMAKE_SYSROOT}" CACHE STRING "Use alternate sysroot.") +set(LIBCXX_GCC_TOOLCHAIN "${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}" CACHE STRING "Use alternate GCC toolchain.") # Feature options ------------------------------------------------------------- option(LIBCXX_ENABLE_EXCEPTIONS "Use exceptions." ON) option(LIBCXX_ENABLE_RTTI "Use run time type information." ON) -option(LIBCXX_ENABLE_GLOBAL_FILESYSTEM_NAMESPACE "Build libc++ with support for the global filesystem namespace." ON) -option(LIBCXX_ENABLE_STDIN "Build libc++ with support for stdin/std::cin." ON) -option(LIBCXX_ENABLE_STDOUT "Build libc++ with support for stdout/std::cout." ON) option(LIBCXX_ENABLE_THREADS "Build libc++ with support for threads." ON) -option(LIBCXX_ENABLE_THREAD_UNSAFE_C_FUNCTIONS "Build libc++ with support for thread-unsafe C functions" ON) option(LIBCXX_ENABLE_MONOTONIC_CLOCK "Build libc++ with support for a monotonic clock. This option may only be set to OFF when LIBCXX_ENABLE_THREADS=OFF." ON) @@ -365,16 +393,6 @@ if (LLVM_USE_SANITIZER AND LIBCXX_GENERATE_COVERAGE) message(FATAL_ERROR "LLVM_USE_SANITIZER cannot be used with LIBCXX_GENERATE_COVERAGE") endif() -# Set LIBCXX_BUILD_32_BITS to (LIBCXX_BUILD_32_BITS OR LLVM_BUILD_32_BITS) -# and check that we can build with 32 bits if requested. -if (CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32) - if (LIBCXX_BUILD_32_BITS AND NOT LLVM_BUILD_32_BITS) # Don't duplicate the output from LLVM - message(STATUS "Building 32 bits executables and libraries.") - endif() -elseif(LIBCXX_BUILD_32_BITS) - message(FATAL_ERROR "LIBCXX_BUILD_32_BITS=ON is not supported on this platform.") -endif() - # Warn users that LIBCXX_ENABLE_STATIC_ABI_LIBRARY is an experimental option. if (LIBCXX_ENABLE_STATIC_ABI_LIBRARY) message(WARNING "LIBCXX_ENABLE_STATIC_ABI_LIBRARY is an experimental option") @@ -406,29 +424,43 @@ endif () # Configure System #=============================================================================== +# TODO: Projects that depend on libc++ should use LIBCXX_GENERATED_INCLUDE_DIR +# instead of hard-coding include/c++/v1. + +set(LIBCXX_INSTALL_INCLUDE_DIR "${CMAKE_INSTALL_INCLUDEDIR}/c++/v1" CACHE PATH + "Path where target-agnostic libc++ headers should be installed.") +set(LIBCXX_INSTALL_RUNTIME_DIR "${CMAKE_INSTALL_BINDIR}" CACHE PATH + "Path where built libc++ runtime libraries should be installed.") + if(LLVM_ENABLE_PER_TARGET_RUNTIME_DIR AND NOT APPLE) - set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++) - set(LIBCXX_HEADER_DIR ${LLVM_BINARY_DIR}) - set(LIBCXX_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++) + set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}) + set(LIBCXX_GENERATED_INCLUDE_DIR "${LLVM_BINARY_DIR}/include/c++/v1") + set(LIBCXX_GENERATED_INCLUDE_TARGET_DIR "${LLVM_BINARY_DIR}/include/${LLVM_DEFAULT_TARGET_TRIPLE}/c++/v1") + set(LIBCXX_INSTALL_LIBRARY_DIR lib${LLVM_LIBDIR_SUFFIX}/${LLVM_DEFAULT_TARGET_TRIPLE} CACHE PATH + "Path where built libc++ libraries should be installed.") + set(LIBCXX_INSTALL_INCLUDE_TARGET_DIR "${CMAKE_INSTALL_INCLUDEDIR}/${LLVM_DEFAULT_TARGET_TRIPLE}/c++/v1" CACHE PATH + "Path where target-specific libc++ headers should be installed.") if(LIBCXX_LIBDIR_SUBDIR) string(APPEND LIBCXX_LIBRARY_DIR /${LIBCXX_LIBDIR_SUBDIR}) string(APPEND LIBCXX_INSTALL_LIBRARY_DIR /${LIBCXX_LIBDIR_SUBDIR}) endif() -elseif(LLVM_LIBRARY_OUTPUT_INTDIR) - set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}) - set(LIBCXX_HEADER_DIR ${LLVM_BINARY_DIR}) - set(LIBCXX_INSTALL_LIBRARY_DIR lib${LIBCXX_LIBDIR_SUFFIX}) else() - set(LIBCXX_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX}) - set(LIBCXX_HEADER_DIR ${CMAKE_BINARY_DIR}) - set(LIBCXX_INSTALL_LIBRARY_DIR lib${LIBCXX_LIBDIR_SUFFIX}) + if(LLVM_LIBRARY_OUTPUT_INTDIR) + set(LIBCXX_LIBRARY_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}) + set(LIBCXX_GENERATED_INCLUDE_DIR "${LLVM_BINARY_DIR}/include/c++/v1") + else() + set(LIBCXX_LIBRARY_DIR ${CMAKE_BINARY_DIR}/lib${LIBCXX_LIBDIR_SUFFIX}) + set(LIBCXX_GENERATED_INCLUDE_DIR "${CMAKE_BINARY_DIR}/include/c++/v1") + endif() + set(LIBCXX_GENERATED_INCLUDE_TARGET_DIR "${LIBCXX_GENERATED_INCLUDE_DIR}") + set(LIBCXX_INSTALL_LIBRARY_DIR lib${LIBCXX_LIBDIR_SUFFIX} CACHE PATH + "Path where built libc++ libraries should be installed.") + set(LIBCXX_INSTALL_INCLUDE_TARGET_DIR "${LIBCXX_INSTALL_INCLUDE_DIR}" CACHE PATH + "Path where target-specific libc++ headers should be installed.") endif() file(MAKE_DIRECTORY "${LIBCXX_BINARY_INCLUDE_DIR}") -set(LIBCXX_INSTALL_PREFIX "" CACHE STRING "Define libc++ destination prefix.") -set(LIBCXX_INSTALL_HEADER_PREFIX "" CACHE STRING "Define libc++ header destination prefix.") - set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR}) set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR}) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LIBCXX_LIBRARY_DIR}) @@ -450,26 +482,17 @@ include(HandleLibcxxFlags) # These flags get added to CMAKE_CXX_FLAGS and CMAKE_C_FLAGS so that # 'config-ix' use them during feature checks. It also adds them to both # 'LIBCXX_COMPILE_FLAGS' and 'LIBCXX_LINK_FLAGS' -add_target_flags_if(LIBCXX_BUILD_32_BITS "-m32") - +if(ZOS) + add_target_flags_if_supported("-fzos-le-char-mode=ebcdic") +endif() if(LIBCXX_TARGET_TRIPLE) - add_target_flags("--target=${LIBCXX_TARGET_TRIPLE}") -elseif(CMAKE_CXX_COMPILER_TARGET) - set(LIBCXX_TARGET_TRIPLE "${CMAKE_CXX_COMPILER_TARGET}") + add_target_flags_if_supported("--target=${LIBCXX_TARGET_TRIPLE}") endif() if(LIBCXX_SYSROOT) - add_target_flags("--sysroot=${LIBCXX_SYSROOT}") -elseif(CMAKE_SYSROOT) - set(LIBCXX_SYSROOT "${CMAKE_SYSROOT}") + add_target_flags_if_supported("--sysroot=${LIBCXX_SYSROOT}") endif() if(LIBCXX_GCC_TOOLCHAIN) - add_target_flags("--gcc-toolchain=${LIBCXX_GCC_TOOLCHAIN}") -elseif(CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN) - set(LIBCXX_GCC_TOOLCHAIN "${CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN}") -endif() - -if(LIBCXX_TARGET_TRIPLE) - set(TARGET_TRIPLE "${LIBCXX_TARGET_TRIPLE}") + add_target_flags_if_supported("--gcc-toolchain=${LIBCXX_GCC_TOOLCHAIN}") endif() # Configure compiler. @@ -518,7 +541,7 @@ function(cxx_add_basic_build_flags target) # in the dylib. C++20 is needed to use char8_t. set_target_properties(${target} PROPERTIES CXX_STANDARD 20 - CXX_STANDARD_REQUIRED NO + CXX_STANDARD_REQUIRED YES CXX_EXTENSIONS NO) # When building the dylib, don't warn for unavailable aligned allocation @@ -575,15 +598,22 @@ endfunction() # Warning flags =============================================================== function(cxx_add_warning_flags target) target_compile_definitions(${target} PUBLIC -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) - target_add_compile_flags_if_supported(${target} PRIVATE -Wall -Wextra -W -Wwrite-strings + if (MSVC) + # -W4 is the cl.exe/clang-cl equivalent of -Wall. (In cl.exe and clang-cl, + # -Wall is equivalent to -Weverything in GCC style compiler drivers.) + target_add_compile_flags_if_supported(${target} PRIVATE -W4) + else() + target_add_compile_flags_if_supported(${target} PRIVATE -Wall) + endif() + target_add_compile_flags_if_supported(${target} PRIVATE -Wextra -W -Wwrite-strings -Wno-unused-parameter -Wno-long-long - -Werror=return-type -Wextra-semi) + -Werror=return-type -Wextra-semi -Wundef + -Wformat-nonliteral) if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang") target_add_compile_flags_if_supported(${target} PRIVATE -Wno-user-defined-literals -Wno-covered-switch-default -Wno-suggest-override - -Wno-ignored-attributes # FIXME: Caused by _LIBCPP_NODEBUG_TYPE not being supported on older clangs ) if (LIBCXX_TARGETING_CLANG_CL) target_add_compile_flags_if_supported(${target} PRIVATE @@ -732,9 +762,26 @@ endif() # Link system libraries ======================================================= function(cxx_link_system_libraries target) - target_add_link_flags_if_supported(${target} PRIVATE "-nodefaultlibs") - target_add_compile_flags_if_supported(${target} PRIVATE "/Zl") - target_add_link_flags_if_supported(${target} PRIVATE "/nodefaultlib") + +# In order to remove just libc++ from the link step +# we need to use -nostdlib++ whenever it is supported. +# Unfortunately this cannot be used universally because for example g++ supports +# only -nodefaultlibs in which case all libraries will be removed and +# all libraries but c++ have to be added in manually. + if (LIBCXX_SUPPORTS_NOSTDLIBXX_FLAG) + target_add_link_flags_if_supported(${target} PRIVATE "-nostdlib++") + else() + target_add_link_flags_if_supported(${target} PRIVATE "-nodefaultlibs") + target_add_compile_flags_if_supported(${target} PRIVATE "/Zl") + target_add_link_flags_if_supported(${target} PRIVATE "/nodefaultlib") + endif() + + if (LIBCXX_SUPPORTS_UNWINDLIB_NONE_FLAG AND LIBCXXABI_USE_LLVM_UNWINDER) + # If we're linking directly against the libunwind that we're building + # in the same invocation, don't try to link in the toolchain's + # default libunwind (which may be missing still). + target_add_link_flags_if_supported(${target} PRIVATE "--unwindlib=none") + endif() if (LIBCXX_HAS_SYSTEM_LIB) target_link_libraries(${target} PRIVATE System) @@ -838,12 +885,8 @@ config_define_if(LIBCXX_ABI_UNSTABLE _LIBCPP_ABI_UNSTABLE) config_define_if(LIBCXX_ABI_FORCE_ITANIUM _LIBCPP_ABI_FORCE_ITANIUM) config_define_if(LIBCXX_ABI_FORCE_MICROSOFT _LIBCPP_ABI_FORCE_MICROSOFT) config_define_if(LIBCXX_HIDE_FROM_ABI_PER_TU_BY_DEFAULT _LIBCPP_HIDE_FROM_ABI_PER_TU_BY_DEFAULT) -config_define_if_not(LIBCXX_ENABLE_GLOBAL_FILESYSTEM_NAMESPACE _LIBCPP_HAS_NO_GLOBAL_FILESYSTEM_NAMESPACE) -config_define_if_not(LIBCXX_ENABLE_STDIN _LIBCPP_HAS_NO_STDIN) -config_define_if_not(LIBCXX_ENABLE_STDOUT _LIBCPP_HAS_NO_STDOUT) config_define_if_not(LIBCXX_ENABLE_THREADS _LIBCPP_HAS_NO_THREADS) config_define_if_not(LIBCXX_ENABLE_MONOTONIC_CLOCK _LIBCPP_HAS_NO_MONOTONIC_CLOCK) -config_define_if_not(LIBCXX_ENABLE_THREAD_UNSAFE_C_FUNCTIONS _LIBCPP_HAS_NO_THREAD_UNSAFE_C_FUNCTIONS) if (NOT LIBCXX_TYPEINFO_COMPARISON_IMPLEMENTATION STREQUAL "default") config_define("${LIBCXX_TYPEINFO_COMPARISON_IMPLEMENTATION}" _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION) endif() @@ -854,9 +897,16 @@ config_define_if(LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY _LIBCPP_HAS_THREAD_LIBRARY config_define_if(LIBCXX_HAS_MUSL_LIBC _LIBCPP_HAS_MUSL_LIBC) config_define_if(LIBCXX_NO_VCRUNTIME _LIBCPP_NO_VCRUNTIME) config_define_if(LIBCXX_ENABLE_PARALLEL_ALGORITHMS _LIBCPP_HAS_PARALLEL_ALGORITHMS) +config_define_if_not(LIBCXX_ENABLE_FILESYSTEM _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY) config_define_if_not(LIBCXX_ENABLE_RANDOM_DEVICE _LIBCPP_HAS_NO_RANDOM_DEVICE) config_define_if_not(LIBCXX_ENABLE_LOCALIZATION _LIBCPP_HAS_NO_LOCALIZATION) +config_define_if_not(LIBCXX_ENABLE_UNICODE _LIBCPP_HAS_NO_UNICODE) +config_define_if_not(LIBCXX_ENABLE_WIDE_CHARACTERS _LIBCPP_HAS_NO_WIDE_CHARACTERS) config_define_if_not(LIBCXX_ENABLE_VENDOR_AVAILABILITY_ANNOTATIONS _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS) +# Incomplete features get their own specific disabling flags. This makes it +# easier to grep for target specific flags once the feature is complete. +config_define_if_not(LIBCXX_ENABLE_INCOMPLETE_FEATURES _LIBCPP_HAS_NO_INCOMPLETE_FORMAT) +config_define_if_not(LIBCXX_ENABLE_INCOMPLETE_FEATURES _LIBCPP_HAS_NO_INCOMPLETE_RANGES) if (LIBCXX_ABI_DEFINES) set(abi_defines) @@ -870,6 +920,17 @@ if (LIBCXX_ABI_DEFINES) config_define(${abi_defines} _LIBCPP_ABI_DEFINES) endif() +if (LIBCXX_EXTRA_SITE_DEFINES) + set(extra_site_defines) + foreach (extra_site_define ${LIBCXX_EXTRA_SITE_DEFINES}) + # Allow defines such as DEFINE=VAL, transformed into "#define DEFINE VAL". + string(REPLACE "=" " " extra_site_define "${extra_site_define}") + list(APPEND extra_site_defines "#define ${extra_site_define}") + endforeach() + string(REPLACE ";" "\n" extra_site_defines "${extra_site_defines}") + config_define(${extra_site_defines} _LIBCPP_EXTRA_SITE_DEFINES) +endif() + # By default libc++ on Windows expects to use a shared library, which requires # the headers to use DLL import/export semantics. However when building a # static library only we modify the headers to disable DLL import/export. @@ -900,6 +961,7 @@ endfunction() #=============================================================================== add_subdirectory(include) add_subdirectory(src) +add_subdirectory(utils) set(LIBCXX_TEST_DEPS "") diff --git a/CREDITS.TXT b/CREDITS.TXT index 49f095d2..cd5bc08a 100644 --- a/CREDITS.TXT +++ b/CREDITS.TXT @@ -12,6 +12,13 @@ N: Saleem Abdulrasool E: compnerd@compnerd.org D: Minor patches and Linux fixes. +N: Ulf Adams +D: Invented the Ryu and Ryu Printf algorithms used in floating-point to_chars, and wrote the initial code. + +N: Muiez Ahmed +E: muiez@ibm.com +D: z/OS port. + N: Dan Albert E: danalbert@google.com D: Android support and test runner improvements. @@ -24,9 +31,8 @@ N: Holger Arnold E: holgerar@gmail.com D: Minor fix. -N: Ruben Van Boxem -E: vanboxem dot ruben at gmail dot com -D: Initial Windows patches. +N: Jorg Brown +D: Ported floating-point to_chars from MSVC to libc++. N: David Chisnall E: theraven at theravensnest dot org @@ -41,6 +47,10 @@ N: Jonathan B Coe E: jbcoe@me.com D: Implementation of propagate_const. +N: Matthew Dempsky +E: matthew@dempsky.org +D: Minor patches and bug fixes. + N: Christopher Di Bella E: cjdb@google.com E: cjdb.ns@gmail.com @@ -58,10 +68,6 @@ N: Bill Fisher E: william.w.fisher@gmail.com D: Regex bug fixes. -N: Matthew Dempsky -E: matthew@dempsky.org -D: Minor patches and bug fixes. - N: Google Inc. D: Copyright owner and contributor of the CityHash algorithm @@ -81,6 +87,14 @@ N: Argyrios Kyrtzidis E: kyrtzidis@apple.com D: Bug fixes. +N: Stephan T. Lavavej +E: stl@microsoft.com +E: stl@nuwen.net +D: Implemented floating-point to_chars. + +N: Microsoft Corporation +D: Contributed floating-point to_chars. + N: Bruce Mitchener, Jr. E: bruce.mitchener@gmail.com D: Emscripten-related changes. @@ -113,6 +127,10 @@ N: Jon Roelofs E: jroelofS@jroelofs.com D: Remote testing, Newlib port, baremetal/single-threaded support. +N: Kent Ross +E: k@mad.cash +D: Patches for operator<=> support + N: Jonathan Sauer D: Minor patches, mostly related to constexpr @@ -131,6 +149,10 @@ N: Stephan Tolksdorf E: st@quanttec.com D: Minor fix +N: Ruben Van Boxem +E: vanboxem dot ruben at gmail dot com +D: Initial Windows patches. + N: Michael van der Westhuizen E: r1mikey at gmail dot com @@ -141,6 +163,11 @@ N: Klaas de Vries E: klaas at klaasgaaf dot nl D: Minor bug fix. +N: Mark de Wever +E: koraq at xs4all dot nl +D: Format library support. +D: Finalized the porting of MSVC's to_chars to libc++. + N: Zhang Xiongpang E: zhangxiongpang@gmail.com D: Minor patches and bug fixes. @@ -149,11 +176,11 @@ N: Xing Xue E: xingxue@ca.ibm.com D: AIX port -N: Zhihao Yuan -E: lichray@gmail.com -D: Standard compatibility fixes. - N: Jeffrey Yasskin E: jyasskin@gmail.com E: jyasskin@google.com D: Linux fixes. + +N: Zhihao Yuan +E: lichray@gmail.com +D: Standard compatibility fixes. diff --git a/TODO.TXT b/TODO.TXT index cf489d29..bc785546 100644 --- a/TODO.TXT +++ b/TODO.TXT @@ -16,60 +16,8 @@ Test Suite Tasks * Improve the quality and portability of the locale test data. * Convert failure tests to use Clang Verify. -Filesystem Tasks -================ -* P0492r2 - Implement National body comments for Filesystem - * INCOMPLETE - US 25: has_filename() is equivalent to just !empty() - * INCOMPLETE - US 31: Everything is defined in terms of one implicit host system - * INCOMPLETE - US 32: Meaning of 27.10.2.1 unclear - * INCOMPLETE - US 33: Definition of canonical path problematic - * INCOMPLETE - US 34: Are there attributes of a file that are not an aspect of the file system? - * INCOMPLETE - US 35: What synchronization is required to avoid a file system race? - * INCOMPLETE - US 36: Symbolic links themselves are attached to a directory via (hard) links - * INCOMPLETE - US 37: The term “redundant current directory (dot) elements” is not defined - * INCOMPLETE - US 38: Duplicates §17.3.16 - * INCOMPLETE - US 39: Remove note: Dot and dot-dot are not directories - * INCOMPLETE - US 40: Not all directories have a parent. - * INCOMPLETE - US 41: The term “parent directory” for a (non-directory) file is unusual - * INCOMPLETE - US 42: Pathname resolution does not always resolve a symlink - * INCOMPLETE - US 43: Concerns about encoded character types - * INCOMPLETE - US 44: Definition of path in terms of a string requires leaky abstraction - * INCOMPLETE - US 45: Generic format portability compromised by unspecified root-name - * INCOMPLETE - US 46: filename can be empty so productions for relative-path are redundant - * INCOMPLETE - US 47: “.” and “..” already match the name production - * INCOMPLETE - US 48: Multiple separators are often meaningful in a root-name - * INCOMPLETE - US 49: What does “method of conversion method” mean? - * INCOMPLETE - US 50: 27.10.8.1 ¶ 1.4 largely redundant with ¶ 1.3 - * INCOMPLETE - US 51: Failing to add / when appending empty string prevents useful apps - * INCOMPLETE - US 52: remove_filename() postcondition is not by itself a definition - * INCOMPLETE - US 53: remove_filename()'s name does not correspond to its behavior - * INCOMPLETE - US 54: remove_filename() is broken - * INCOMPLETE - US 55: replace_extension()'s use of path as parameter is inappropriate - * INCOMPLETE - US 56: Remove replace_extension()'s conditional addition of period - * INCOMPLETE - US 57: On Windows, absolute paths will sort in among relative paths - * INCOMPLETE - US 58: parent_path() behavior for root paths is useless - * INCOMPLETE - US 59: filename() returning path for single path components is bizarre - * INCOMPLETE - US 60: path("/foo/").filename()==path(".") is surprising - * INCOMPLETE - US 61: Leading dots in filename() should not begin an extension - * INCOMPLETE - US 62: It is important that stem()+extension()==filename() - * INCOMPLETE - US 63: lexically_normal() inconsistently treats trailing "/" but not "/.." as directory - * INCOMPLETE - US 73, CA 2: root-name is effectively implementation defined - * INCOMPLETE - US 74, CA 3: The term “pathname” is ambiguous in some contexts - * INCOMPLETE - US 75, CA 4: Extra flag in path constructors is needed - * INCOMPLETE - US 76, CA 5: root-name definition is over-specified. - * INCOMPLETE - US 77, CA 6: operator/ and other appends not useful if arg has root-name - * INCOMPLETE - US 78, CA 7: Member absolute() in 27.10.4.1 is overspecified for non-POSIX-like O/S - * INCOMPLETE - US 79, CA 8: Some operation functions are overspecified for implementation-defined file types - * INCOMPLETE - US 185: Fold error_code and non-error_code signatures into one signature - * INCOMPLETE - FI 14: directory_entry comparisons are members - * INCOMPLETE - Late 36: permissions() error_code overload should be noexcept - * INCOMPLETE - Late 37: permissions() actions should be separate parameter - * INCOMPLETE - Late 42: resize_file() Postcondition missing argument - Misc Tasks ========== * Find all sequences of >2 underscores and eradicate them. * run clang-tidy on libc++ * Document the "conditionally-supported" bits of libc++ -* Look at basic_string's move assignment operator, re LWG 2063 and POCMA -* Put a static_assert in std::allocator to deny const/volatile types (LWG 2447) diff --git a/benchmarks/CMakeLists.txt b/benchmarks/CMakeLists.txt deleted file mode 100644 index 42d25c20..00000000 --- a/benchmarks/CMakeLists.txt +++ /dev/null @@ -1,213 +0,0 @@ -include(ExternalProject) -include(CheckCXXCompilerFlag) - -#============================================================================== -# Build Google Benchmark for libc++ -#============================================================================== - -set(BENCHMARK_LIBCXX_COMPILE_FLAGS - -Wno-unused-command-line-argument - -nostdinc++ - -isystem ${LIBCXX_SOURCE_DIR}/include - -L${LIBCXX_LIBRARY_DIR} - -Wl,-rpath,${LIBCXX_LIBRARY_DIR} - ${SANITIZER_FLAGS} - ) -if (DEFINED LIBCXX_CXX_ABI_LIBRARY_PATH) - list(APPEND BENCHMARK_LIBCXX_COMPILE_FLAGS - -L${LIBCXX_CXX_ABI_LIBRARY_PATH} - -Wl,-rpath,${LIBCXX_CXX_ABI_LIBRARY_PATH}) -endif() -list(APPEND BENCHMARK_LIBCXX_COMPILE_FLAGS -include "${LIBCXX_BINARY_DIR}/__config_site") -split_list(BENCHMARK_LIBCXX_COMPILE_FLAGS) - -ExternalProject_Add(google-benchmark-libcxx - EXCLUDE_FROM_ALL ON - DEPENDS cxx cxx-headers - PREFIX benchmark-libcxx - SOURCE_DIR ${LIBCXX_SOURCE_DIR}/utils/google-benchmark - INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/benchmark-libcxx - CMAKE_CACHE_ARGS - -DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER} - -DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER} - -DCMAKE_BUILD_TYPE:STRING=RELEASE - -DCMAKE_INSTALL_PREFIX:PATH= - -DCMAKE_CXX_FLAGS:STRING=${BENCHMARK_LIBCXX_COMPILE_FLAGS} - -DBENCHMARK_USE_LIBCXX:BOOL=ON - -DBENCHMARK_ENABLE_TESTING:BOOL=OFF) - -#============================================================================== -# Build Google Benchmark for the native stdlib -#============================================================================== -set(BENCHMARK_NATIVE_TARGET_FLAGS) -if (LIBCXX_BENCHMARK_NATIVE_GCC_TOOLCHAIN) - set(BENCHMARK_NATIVE_TARGET_FLAGS - -gcc-toolchain ${LIBCXX_BENCHMARK_NATIVE_GCC_TOOLCHAIN}) -endif() -split_list(BENCHMARK_NATIVE_TARGET_FLAGS) - -if (LIBCXX_BENCHMARK_NATIVE_STDLIB) - ExternalProject_Add(google-benchmark-native - EXCLUDE_FROM_ALL ON - PREFIX benchmark-native - SOURCE_DIR ${LIBCXX_SOURCE_DIR}/utils/google-benchmark - INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR}/benchmark-native - CMAKE_CACHE_ARGS - -DCMAKE_C_COMPILER:STRING=${CMAKE_C_COMPILER} - -DCMAKE_CXX_COMPILER:STRING=${CMAKE_CXX_COMPILER} - -DCMAKE_CXX_FLAGS:STRING=${BENCHMARK_NATIVE_TARGET_FLAGS} - -DCMAKE_BUILD_TYPE:STRING=RELEASE - -DCMAKE_INSTALL_PREFIX:PATH= - -DBENCHMARK_ENABLE_TESTING:BOOL=OFF) -endif() - - -#============================================================================== -# Benchmark tests configuration -#============================================================================== -add_custom_target(cxx-benchmarks) -set(BENCHMARK_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}) -set(BENCHMARK_LIBCXX_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/benchmark-libcxx) -set(BENCHMARK_NATIVE_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/benchmark-native) - - -set(BENCHMARK_TEST_COMPILE_FLAGS - -O2 - -fsized-deallocation - -I${BENCHMARK_LIBCXX_INSTALL}/include - -I${LIBCXX_SOURCE_DIR}/test/support -) -set(BENCHMARK_TEST_LIBCXX_COMPILE_FLAGS - ${BENCHMARK_TEST_COMPILE_FLAGS} - ${SANITIZER_FLAGS} - -Wno-user-defined-literals - -Wno-suggest-override -) - -set(BENCHMARK_TEST_LIBCXX_LINK_FLAGS - -nodefaultlibs - -L${BENCHMARK_LIBCXX_INSTALL}/lib/ - ${SANITIZER_FLAGS} -) -set(BENCHMARK_TEST_NATIVE_COMPILE_FLAGS - ${BENCHMARK_NATIVE_TARGET_FLAGS} - ${BENCHMARK_TEST_COMPILE_FLAGS} -) -set(BENCHMARK_TEST_NATIVE_LINK_FLAGS - ${BENCHMARK_NATIVE_TARGET_FLAGS} - -L${BENCHMARK_NATIVE_INSTALL}/lib -) -split_list(BENCHMARK_TEST_COMPILE_FLAGS) -split_list(BENCHMARK_TEST_LIBCXX_COMPILE_FLAGS) -split_list(BENCHMARK_TEST_LIBCXX_LINK_FLAGS) -split_list(BENCHMARK_TEST_NATIVE_COMPILE_FLAGS) -split_list(BENCHMARK_TEST_NATIVE_LINK_FLAGS) - -if (LIBCXX_BENCHMARK_NATIVE_STDLIB STREQUAL "libstdc++") - find_library(LIBSTDCXX_FILESYSTEM_TEST stdc++fs - PATHS ${LIBCXX_BENCHMARK_NATIVE_GCC_TOOLCHAIN} - PATH_SUFFIXES lib lib64 - DOC "The libstdc++ filesystem library used by the benchmarks" - ) - if (NOT "${LIBSTDCXX_FILESYSTEM_TEST}" STREQUAL "LIBSTDCXX_FILESYSTEM_TEST-NOTFOUND") - set(LIBSTDCXX_FILESYSTEM_LIB "stdc++fs") - endif() -endif() - -set(libcxx_benchmark_targets) - -function(add_benchmark_test name source_file) - set(libcxx_target ${name}_libcxx) - list(APPEND libcxx_benchmark_targets ${libcxx_target}) - add_executable(${libcxx_target} EXCLUDE_FROM_ALL ${source_file}) - add_dependencies(${libcxx_target} cxx google-benchmark-libcxx) - add_dependencies(cxx-benchmarks ${libcxx_target}) - if (LIBCXX_ENABLE_SHARED) - target_link_libraries(${libcxx_target} PRIVATE cxx_shared) - else() - target_link_libraries(${libcxx_target} PRIVATE cxx_static) - endif() - if (TARGET cxx_experimental) - target_link_libraries(${libcxx_target} PRIVATE cxx_experimental) - endif() - target_link_libraries(${libcxx_target} PRIVATE -lbenchmark) - if (LLVM_USE_SANITIZER) - target_link_libraries(${libcxx_target} PRIVATE -ldl) - endif() - set_target_properties(${libcxx_target} - PROPERTIES - OUTPUT_NAME "${name}.libcxx.out" - RUNTIME_OUTPUT_DIRECTORY "${BENCHMARK_OUTPUT_DIR}" - COMPILE_FLAGS "${BENCHMARK_TEST_LIBCXX_COMPILE_FLAGS}" - LINK_FLAGS "${BENCHMARK_TEST_LIBCXX_LINK_FLAGS}" - CXX_STANDARD 17 - CXX_STANDARD_REQUIRED YES - CXX_EXTENSIONS NO) - cxx_link_system_libraries(${libcxx_target}) - if (LIBCXX_BENCHMARK_NATIVE_STDLIB) - if (LIBCXX_BENCHMARK_NATIVE_STDLIB STREQUAL "libstdc++" AND NOT DEFINED LIBSTDCXX_FILESYSTEM_LIB - AND "${name}" STREQUAL "filesystem") - return() - endif() - set(native_target ${name}_native) - add_executable(${native_target} EXCLUDE_FROM_ALL ${source_file}) - add_dependencies(${native_target} google-benchmark-native - google-benchmark-libcxx) - target_link_libraries(${native_target} PRIVATE -lbenchmark) - if (LIBCXX_BENCHMARK_NATIVE_STDLIB STREQUAL "libstdc++") - target_link_libraries(${native_target} PRIVATE ${LIBSTDCXX_FILESYSTEM_LIB}) - elseif (LIBCXX_BENCHMARK_NATIVE_STDLIB STREQUAL "libc++") - target_link_libraries(${native_target} PRIVATE -lc++fs -lc++experimental) - endif() - if (LIBCXX_HAS_PTHREAD_LIB) - target_link_libraries(${native_target} PRIVATE -pthread) - endif() - add_dependencies(cxx-benchmarks ${native_target}) - set_target_properties(${native_target} - PROPERTIES - OUTPUT_NAME "${name}.native.out" - RUNTIME_OUTPUT_DIRECTORY "${BENCHMARK_OUTPUT_DIR}" - INCLUDE_DIRECTORIES "" - COMPILE_FLAGS "${BENCHMARK_TEST_NATIVE_COMPILE_FLAGS}" - LINK_FLAGS "${BENCHMARK_TEST_NATIVE_LINK_FLAGS}" - CXX_STANDARD 17 - CXX_STANDARD_REQUIRED YES - CXX_EXTENSIONS NO) - endif() -endfunction() - - -#============================================================================== -# Register Benchmark tests -#============================================================================== -file(GLOB BENCHMARK_TESTS "*.bench.cpp") -foreach(test_path ${BENCHMARK_TESTS}) - get_filename_component(test_file "${test_path}" NAME) - string(REPLACE ".bench.cpp" "" test_name "${test_file}") - if (NOT DEFINED ${test_name}_REPORTED) - message(STATUS "Adding Benchmark: ${test_file}") - # Only report the adding of the benchmark once. - set(${test_name}_REPORTED ON CACHE INTERNAL "") - endif() - add_benchmark_test(${test_name} ${test_file}) -endforeach() - -if (LIBCXX_INCLUDE_TESTS) - include(AddLLVM) - - if (NOT DEFINED LIBCXX_TEST_DEPS) - message(FATAL_ERROR "Expected LIBCXX_TEST_DEPS to be defined") - endif() - - configure_lit_site_cfg( - ${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in - ${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py) - - set(BENCHMARK_LIT_ARGS "--show-all --show-xfail --show-unsupported ${LIT_ARGS_DEFAULT}") - - add_lit_target(check-cxx-benchmarks - "Running libcxx benchmarks tests" - ${CMAKE_CURRENT_BINARY_DIR} - DEPENDS cxx-benchmarks ${LIBCXX_TEST_DEPS} - ARGS ${BENCHMARK_LIT_ARGS}) -endif() diff --git a/benchmarks/CartesianBenchmarks.h b/benchmarks/CartesianBenchmarks.h deleted file mode 100644 index 2eea1568..00000000 --- a/benchmarks/CartesianBenchmarks.h +++ /dev/null @@ -1,133 +0,0 @@ -//===----------------------------------------------------------------------===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// - - -#include -#include -#include -#include - -#include "benchmark/benchmark.h" -#include "test_macros.h" - -namespace internal { - -template -struct EnumValue : std::integral_constant(I)> { - static std::string name() { return std::string("_") + D::Names[I]; } -}; - -template -constexpr auto makeEnumValueTuple(std::index_sequence) { - return std::make_tuple(EnumValue{}...); -} - -template -static auto skip(const B& Bench, int) -> decltype(Bench.skip()) { - return Bench.skip(); -} -template -static auto skip(const B& Bench, char) { - return false; -} - -template -void makeBenchmarkFromValuesImpl(const Args& A, std::index_sequence) { - for (auto& V : A) { - B Bench{std::get(V)...}; - if (!internal::skip(Bench, 0)) { - benchmark::RegisterBenchmark(Bench.name().c_str(), - [=](benchmark::State& S) { Bench.run(S); }); - } - } -} - -template -void makeBenchmarkFromValues(const std::vector >& A) { - makeBenchmarkFromValuesImpl(A, std::index_sequence_for()); -} - -template