brintos

brintos / llvm-project-archived public Read only

0
0
Text · 5.9 KiB · 138866b Raw
297 lines · plain
1add_custom_target(libc-support-tests)2 3if(NOT LIBC_TARGET_OS_IS_GPU)4  add_libc_test(5    block_test6    SUITE7      libc-support-tests8    SRCS9      block_test.cpp10    DEPENDS11      libc.src.__support.CPP.array12      libc.src.__support.CPP.bit13      libc.src.__support.CPP.span14      libc.src.__support.block15      libc.src.string.memcpy16  )17 18  add_libc_test(19    freelist_test20    SUITE21      libc-support-tests22    SRCS23      freelist_test.cpp24    DEPENDS25      libc.src.__support.CPP.array26      libc.src.__support.CPP.span27      libc.src.__support.block28      libc.src.__support.freelist29  )30 31  add_libc_test(32    freetrie_test33    SUITE34      libc-support-tests35    SRCS36      freetrie_test.cpp37    DEPENDS38      libc.src.__support.CPP.optional39      libc.src.__support.block40      libc.src.__support.freetrie41  )42 43  add_libc_test(44    freestore_test45    SUITE46      libc-support-tests47    SRCS48      freestore_test.cpp49    DEPENDS50      libc.src.__support.CPP.optional51      libc.src.__support.block52      libc.src.__support.freelist53      libc.src.__support.freestore54      libc.src.__support.freetrie55  )56endif()57 58# TODO: FreeListHeap uses the _end symbol which conflicts with the _end symbol59# defined by GPU start.cpp files so for now we exclude this test on GPU.60if(LLVM_LIBC_FULL_BUILD AND NOT LIBC_TARGET_OS_IS_GPU)61  add_libc_test(62    freelist_heap_test63    SUITE64      libc-support-tests65    SRCS66      freelist_heap_test.cpp67    DEPENDS68      libc.src.__support.CPP.span69      libc.src.__support.freelist_heap70      libc.src.string.memcmp71      libc.src.string.memcpy72  )73endif()74 75add_libc_test(76  blockstore_test77  SUITE78    libc-support-tests79  SRCS80    blockstore_test.cpp81  DEPENDS82    libc.src.__support.blockstore83)84 85add_libc_test(86  endian_internal_test87  SUITE88    libc-support-tests89  SRCS90    endian_internal_test.cpp91  DEPENDS92    libc.src.__support.common93)94 95add_libc_test(96  math_extras_test97  SUITE98    libc-support-tests99  SRCS100    math_extras_test.cpp101  DEPENDS102    libc.src.__support.integer_literals103    libc.src.__support.math_extras104    libc.src.__support.uint128105)106 107add_libc_test(108  high_precision_decimal_test109  SUITE110    libc-support-tests111  SRCS112  high_precision_decimal_test.cpp113  DEPENDS114    libc.src.__support.high_precision_decimal115    libc.src.__support.uint128116)117 118add_libc_test(119  str_to_float_test120  SUITE121    libc-support-tests122  SRCS123    str_to_float_test.cpp124    str_to_double_test.cpp125    str_to_long_double_test.cpp126  HDRS127    str_to_fp_test.h128  DEPENDS129    libc.src.__support.integer_literals130    libc.src.__support.str_to_float131    libc.src.__support.uint128132)133 134 135add_libc_test(136  str_to_integer_test137  SUITE138    libc-support-tests139  SRCS140    str_to_integer_test.cpp141  DEPENDS142    libc.src.__support.integer_literals143    libc.src.__support.str_to_integer144)145 146add_libc_test(147  wcs_to_integer_test148  SUITE149    libc-support-tests150  SRCS151    wcs_to_integer_test.cpp152  DEPENDS153    libc.src.__support.integer_literals154    libc.src.__support.str_to_integer155)156 157add_libc_test(158  integer_to_string_test159  SUITE160    libc-support-tests161  SRCS162    integer_to_string_test.cpp163  DEPENDS164    libc.src.__support.big_int165    libc.src.__support.CPP.limits166    libc.src.__support.CPP.string_view167    libc.src.__support.integer_literals168    libc.src.__support.integer_to_string169    libc.src.__support.uint128170)171 172add_libc_test(173  arg_list_test174  SUITE175    libc-support-tests176  SRCS177    arg_list_test.cpp178  DEPENDS179    libc.src.__support.arg_list180    libc.src.__support.macros.properties.os181)182 183# TODO: clang-cl generates calls into runtime library functions to184# handle 128-bit integer arithmetics and conversions which are not yet185# available on Windows. Re-enable 128-bit integer support on Windows once186# these functions are ready.187if(NOT LIBC_TARGET_ARCHITECTURE_IS_NVPTX AND NOT LIBC_TARGET_OS_IS_WINDOWS)188  add_libc_test(189    big_int_test190    SUITE191      libc-support-tests192    SRCS193      big_int_test.cpp194    DEPENDS195      libc.src.__support.big_int196      libc.src.__support.CPP.optional197      libc.src.__support.macros.properties.types198  )199endif()200 201add_libc_test(202  integer_literals_test203  SUITE204    libc-support-tests205  SRCS206    integer_literals_test.cpp207  DEPENDS208    libc.src.__support.CPP.optional209    libc.src.__support.integer_literals210    libc.src.__support.macros.properties.types211)212 213add_libc_test(214  fixedvector_test215  SUITE216    libc-support-tests217  SRCS218    fixedvector_test.cpp219  DEPENDS220    libc.src.__support.CPP.array221    libc.src.__support.fixedvector222)223 224add_libc_test(225  char_vector_test226  SUITE227    libc-support-tests228  SRCS229    char_vector_test.cpp230  DEPENDS231    libc.src.__support.char_vector232)233 234add_libc_test(235  hash_test236  SUITE237    libc-support-tests238  SRCS239    hash_test.cpp240  DEPENDS241    libc.src.__support.hash242    libc.src.__support.CPP.new243    libc.src.stdlib.rand244    libc.src.stdlib.srand245    libc.src.string.memset246  COMPILE_OPTIONS247    ${libc_opt_high_flag}248  UNIT_TEST_ONLY249    # Aligned Allocation is not supported in hermetic builds.250)251 252add_libc_test(253  memory_size_test254  SUITE255    libc-support-tests256  SRCS257    memory_size_test.cpp258  DEPENDS259    libc.src.__support.memory_size260)261 262add_libc_test(263  str_to_float_comparison_test264  NO_RUN_POSTBUILD265  SUITE266    libc-support-tests267  SRCS268    str_to_float_comparison_test.cpp269  DEPENDS270    libc.hdr.stdint_proxy271    libc.src.stdio.printf272    libc.src.stdio.fopen273    libc.src.stdio.fclose274    libc.src.stdio.fgets275    libc.src.stdlib.strtof276    libc.src.stdlib.strtod277    libc.src.stdlib.getenv278    libc.src.string.strtok279    libc.src.string.strdup280    libc.src.__support.CPP.bit281)282 283add_subdirectory(CPP)284add_subdirectory(File)285add_subdirectory(RPC)286add_subdirectory(OSUtil)287add_subdirectory(FPUtil)288add_subdirectory(fixed_point)289add_subdirectory(HashTable)290add_subdirectory(time)291add_subdirectory(threads)292# Requires access to uchar header which is not on MacOS293# Cannot currently build this on MacOS in overlay mode294if(NOT(LIBC_TARGET_OS_IS_DARWIN))295  add_subdirectory(wchar)296endif()297