diff --git a/libc/fuzzing/math/CMakeLists.txt b/libc/fuzzing/math/CMakeLists.txt --- a/libc/fuzzing/math/CMakeLists.txt +++ b/libc/fuzzing/math/CMakeLists.txt @@ -46,7 +46,7 @@ libc.src.math.truncf libc.src.math.truncl libc.src.__support.FPUtil.fputil - libc.src.__support.CPP.standalone_cpp + libc.src.__support.CPP.type_traits ) add_libc_fuzzer( diff --git a/libc/src/__support/CMakeLists.txt b/libc/src/__support/CMakeLists.txt --- a/libc/src/__support/CMakeLists.txt +++ b/libc/src/__support/CMakeLists.txt @@ -23,7 +23,7 @@ .ctype_utils libc.include.errno libc.src.errno.errno - libc.src.__support.CPP.standalone_cpp + libc.src.__support.CPP.limits ) add_header_library( @@ -44,7 +44,7 @@ .high_precision_decimal libc.include.errno libc.src.errno.errno - libc.src.__support.CPP.standalone_cpp + libc.src.__support.CPP.limits libc.src.__support.FPUtil.fputil ) diff --git a/libc/src/__support/CPP/CMakeLists.txt b/libc/src/__support/CPP/CMakeLists.txt --- a/libc/src/__support/CPP/CMakeLists.txt +++ b/libc/src/__support/CPP/CMakeLists.txt @@ -1,15 +1,56 @@ -# TODO(michaelrj): separate the standalone_cpp library into individual targets. add_header_library( - standalone_cpp + array HDRS Array.h +) + +add_header_library( + array_ref + HDRS ArrayRef.h +) + + +add_header_library( + bit + HDRS Bit.h +) + + +add_header_library( + bitset + HDRS Bitset.h +) + +add_header_library( + functional + HDRS Functional.h +) + +add_header_library( + limits + HDRS Limits.h +) + +add_header_library( + string_view + HDRS StringView.h +) + +add_header_library( + type_traits + HDRS TypeTraits.h +) + +add_header_library( + utility + HDRS Utility.h ) diff --git a/libc/src/__support/FPUtil/CMakeLists.txt b/libc/src/__support/FPUtil/CMakeLists.txt --- a/libc/src/__support/FPUtil/CMakeLists.txt +++ b/libc/src/__support/FPUtil/CMakeLists.txt @@ -1,3 +1,4 @@ +#TODO(michaelrj): separate the fputil library into individual targets. add_header_library( fputil HDRS @@ -19,7 +20,8 @@ libc.include.errno libc.include.fenv libc.src.__support.common - libc.src.__support.CPP.standalone_cpp + libc.src.__support.CPP.type_traits + libc.src.__support.CPP.bit libc.src.errno.errno ) diff --git a/libc/src/string/CMakeLists.txt b/libc/src/string/CMakeLists.txt --- a/libc/src/string/CMakeLists.txt +++ b/libc/src/string/CMakeLists.txt @@ -5,7 +5,7 @@ HDRS string_utils.h DEPENDS - libc.src.__support.CPP.standalone_cpp + libc.src.__support.CPP.bitset ) add_entrypoint_object( @@ -210,7 +210,7 @@ HDRS strspn.h DEPENDS - libc.src.__support.CPP.standalone_cpp + libc.src.__support.CPP.bitset ) add_entrypoint_object( diff --git a/libc/src/string/memory_utils/CMakeLists.txt b/libc/src/string/memory_utils/CMakeLists.txt --- a/libc/src/string/memory_utils/CMakeLists.txt +++ b/libc/src/string/memory_utils/CMakeLists.txt @@ -1,3 +1,4 @@ +#TODO(michaelrj): split out the implementations from memory_utils add_header_library( memory_utils HDRS @@ -8,7 +9,7 @@ memcpy_implementations.h memset_implementations.h DEPS - standalone_cpp + libc.src.__support.CPP.bit ) add_header_library( diff --git a/libc/test/src/__support/CPP/CMakeLists.txt b/libc/test/src/__support/CPP/CMakeLists.txt --- a/libc/test/src/__support/CPP/CMakeLists.txt +++ b/libc/test/src/__support/CPP/CMakeLists.txt @@ -7,7 +7,7 @@ SRCS bitset_test.cpp DEPENDS - libc.src.__support.CPP.standalone_cpp + libc.src.__support.CPP.bitset ) add_libc_unittest( @@ -17,7 +17,7 @@ SRCS stringview_test.cpp DEPENDS - libc.src.__support.CPP.standalone_cpp + libc.src.__support.CPP.string_view ) add_libc_unittest( @@ -27,7 +27,7 @@ SRCS limits_test.cpp DEPENDS - libc.src.__support.CPP.standalone_cpp + libc.src.__support.CPP.limits ) add_libc_unittest( @@ -37,7 +37,7 @@ SRCS arrayref_test.cpp DEPENDS - libc.src.__support.CPP.standalone_cpp + libc.src.__support.CPP.array_ref ) add_libc_unittest( @@ -57,7 +57,7 @@ SRCS integer_sequence_test.cpp DEPENDS - libc.src.__support.CPP.standalone_cpp + libc.src.__support.CPP.utility ) add_libc_unittest( diff --git a/libc/test/src/math/CMakeLists.txt b/libc/test/src/math/CMakeLists.txt --- a/libc/test/src/math/CMakeLists.txt +++ b/libc/test/src/math/CMakeLists.txt @@ -12,7 +12,7 @@ DEPENDS libc.include.errno libc.src.math.cosf - libc.src.__support.CPP.standalone_cpp + libc.src.__support.CPP.array libc.src.__support.FPUtil.fputil ) @@ -40,7 +40,7 @@ DEPENDS libc.include.errno libc.src.math.sinf - libc.src.__support.CPP.standalone_cpp + libc.src.__support.CPP.array libc.src.__support.FPUtil.fputil ) @@ -68,7 +68,7 @@ DEPENDS libc.include.errno libc.src.math.sincosf - libc.src.__support.CPP.standalone_cpp + libc.src.__support.CPP.array libc.src.__support.FPUtil.fputil ) diff --git a/libc/test/src/math/exhaustive/CMakeLists.txt b/libc/test/src/math/exhaustive/CMakeLists.txt --- a/libc/test/src/math/exhaustive/CMakeLists.txt +++ b/libc/test/src/math/exhaustive/CMakeLists.txt @@ -6,8 +6,6 @@ exhaustive_test.h SRCS exhaustive_test.cpp - DEPENDS - libc.src.__support.CPP.standalone_cpp ) add_fp_unittest( diff --git a/libc/test/src/stdlib/CMakeLists.txt b/libc/test/src/stdlib/CMakeLists.txt --- a/libc/test/src/stdlib/CMakeLists.txt +++ b/libc/test/src/stdlib/CMakeLists.txt @@ -226,7 +226,8 @@ libc.src.stdlib._Exit libc.src.stdlib.exit libc.src.stdlib.atexit - libc.src.__support.CPP.standalone_cpp + libc.src.__support.CPP.array + libc.src.__support.CPP.utility ) # add_libc_unittest( diff --git a/libc/test/src/string/memory_utils/CMakeLists.txt b/libc/test/src/string/memory_utils/CMakeLists.txt --- a/libc/test/src/string/memory_utils/CMakeLists.txt +++ b/libc/test/src/string/memory_utils/CMakeLists.txt @@ -8,7 +8,8 @@ utils_test.cpp DEPENDS libc.src.string.memory_utils.memory_utils - libc.src.__support.CPP.standalone_cpp + libc.src.__support.CPP.array + libc.src.__support.CPP.array_ref COMPILE_OPTIONS ${LIBC_COMPILE_OPTIONS_NATIVE} -ffreestanding diff --git a/libc/test/utils/UnitTest/CMakeLists.txt b/libc/test/utils/UnitTest/CMakeLists.txt --- a/libc/test/utils/UnitTest/CMakeLists.txt +++ b/libc/test/utils/UnitTest/CMakeLists.txt @@ -7,5 +7,7 @@ SRCS testfilter_test.cpp DEPENDS - libc.src.__support.CPP.standalone_cpp + # TODO(michaelrj): Remove this dependancy. It's only here because all unit + # tests must have at least one dependancy. + libc.src.__support.CPP.bit ) diff --git a/libc/utils/MPFRWrapper/CMakeLists.txt b/libc/utils/MPFRWrapper/CMakeLists.txt --- a/libc/utils/MPFRWrapper/CMakeLists.txt +++ b/libc/utils/MPFRWrapper/CMakeLists.txt @@ -6,7 +6,13 @@ add_compile_options( -O3 ) - add_dependencies(libcMPFRWrapper libc.src.__support.CPP.standalone_cpp libc.src.__support.FPUtil.fputil LibcUnitTest) + add_dependencies( + libcMPFRWrapper + libc.src.__support.CPP.string_view + libc.src.__support.CPP.type_traits + libc.src.__support.FPUtil.fputil + LibcUnitTest + ) if(EXISTS ${LLVM_LIBC_MPFR_INSTALL_PATH}) target_include_directories(libcMPFRWrapper PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH}/include) target_link_directories(libcMPFRWrapper PUBLIC ${LLVM_LIBC_MPFR_INSTALL_PATH}/lib) diff --git a/libc/utils/UnitTest/CMakeLists.txt b/libc/utils/UnitTest/CMakeLists.txt --- a/libc/utils/UnitTest/CMakeLists.txt +++ b/libc/utils/UnitTest/CMakeLists.txt @@ -5,7 +5,7 @@ LibcTest.h ) target_include_directories(LibcUnitTest PUBLIC ${LIBC_SOURCE_DIR}) -add_dependencies(LibcUnitTest libc.src.__support.CPP.standalone_cpp) +add_dependencies(LibcUnitTest libc.src.__support.CPP.type_traits) target_link_libraries(LibcUnitTest PUBLIC libc_test_utils) add_library( @@ -14,7 +14,7 @@ ) target_include_directories(LibcUnitTestMain PUBLIC ${LIBC_SOURCE_DIR}) -add_dependencies(LibcUnitTestMain LibcUnitTest libc.src.__support.CPP.standalone_cpp) +add_dependencies(LibcUnitTestMain LibcUnitTest) target_link_libraries(LibcUnitTestMain PUBLIC LibcUnitTest libc_test_utils) add_library( @@ -29,7 +29,6 @@ add_dependencies( LibcFPTestHelpers LibcUnitTest - libc.src.__support.CPP.standalone_cpp libc.src.__support.FPUtil.fputil ) @@ -43,5 +42,5 @@ add_dependencies( LibcMemoryHelpers LibcUnitTest - libc.src.__support.CPP.standalone_cpp + libc.src.__support.CPP.array_ref )