1 add_custom_target(libc_include_tests)
2 add_dependencies(check-libc libc_include_tests)
11 libc.include.llvm-libc-macros.assert_macros
21 libc.include.llvm-libc-macros.complex_macros
31 libc.include.llvm-libc-macros.sys_queue_macros
32 libc.src.__support.char_vector
33 libc.src.__support.CPP.string
35 # This is needed because the __containerof macro uses statement expression.
36 -Wno-gnu-statement-expression-from-macro-expansion
48 libc.include.llvm-libc-macros.stdbit_macros
49 libc.include.llvm_libc_common_h
51 # Intentionally do not depend on libc.src.stdbit.*. The include test is
52 # simply testing the macros provided by stdbit.h, not the implementation
53 # of the underlying functions which the type generic macros may dispatch
70 libc.include.llvm-libc-macros.stdbit_macros
71 libc.include.llvm_libc_common_h
73 libc.src.assert.__assert_fail
74 # Intentionally do not depend on libc.src.stdbit.*. The include test is
75 # simply testing the macros provided by stdbit.h, not the implementation
76 # of the underlying functions which the type generic macros may dispatch
87 libc.include.llvm-libc-macros.stdckdint_macros
97 libc.include.llvm-libc-macros.math_function_macros
105 issubnormalf_test.cpp
107 libc.include.llvm-libc-macros.math_function_macros
115 issubnormall_test.cpp
117 libc.include.llvm-libc-macros.math_function_macros
127 libc.include.llvm-libc-macros.math_function_macros
137 libc.include.llvm-libc-macros.math_function_macros
147 libc.include.llvm-libc-macros.math_function_macros
157 libc.include.llvm-libc-macros.math_function_macros
167 libc.include.llvm-libc-macros.math_function_macros
177 libc.include.llvm-libc-macros.math_function_macros
187 libc.include.llvm-libc-macros.math_function_macros
197 libc.include.llvm-libc-macros.math_function_macros
207 libc.include.llvm-libc-macros.math_function_macros
217 libc.include.llvm-libc-macros.math_function_macros
227 libc.include.llvm-libc-macros.math_function_macros
237 libc.include.llvm-libc-macros.math_function_macros
247 libc.include.llvm-libc-macros.math_function_macros
257 libc.include.llvm-libc-macros.math_function_macros
267 libc.include.llvm-libc-macros.math_function_macros
277 libc.include.llvm-libc-macros.math_function_macros
287 libc.include.llvm-libc-macros.math_function_macros
297 libc.include.llvm-libc-macros.math_function_macros
307 libc.include.llvm-libc-macros.math_function_macros
317 libc.include.llvm-libc-macros.math_function_macros
327 libc.include.llvm-libc-macros.math_function_macros
342 libc.include.llvm-libc-macros.math_function_macros
357 libc.include.llvm-libc-macros.math_function_macros
372 libc.include.llvm-libc-macros.math_function_macros
375 # TODO(https://github.com/llvm/llvm-project/issues/114618): fix linkage failures
388 # libc.include.llvm-libc-macros.math_function_macros
389 # libc.src.math.issignaling
390 # libc.src.math.issignalingf
391 # libc.src.math.issignalingl
406 # libc.include.llvm-libc-macros.math_function_macros
407 # libc.src.math.iscanonical
408 # libc.src.math.iscanonicalf
409 # libc.src.math.iscanonicall
424 libc.include.llvm-libc-macros.math_function_macros
439 libc.include.llvm-libc-macros.math_function_macros
454 libc.include.llvm-libc-macros.math_function_macros
469 libc.include.llvm-libc-macros.math_function_macros
484 libc.include.llvm-libc-macros.math_function_macros
487 # Test `#include <...>` of each header in each available language mode.
488 # This is gated on -DLLVM_LIBC_BUILD_HEADER_TESTS=ON until all the bugs
489 # in headers are fixed so the tests all compile.
490 set(TEST_STDC_VERSIONS 89;99;11;17;23)
491 set(TEST_STDCXX_VERSIONS 03;11;14;17;20;23;26)
493 function(add_header_test target_name source_file deps std_mode)
494 if(LLVM_LIBC_BUILD_HEADER_TESTS)
515 foreach(target ${TARGET_PUBLIC_HEADERS})
516 string(REPLACE "libc.include." "" header ${target})
517 get_target_property(HEADER_NAME ${target} HEADER_NAME)
519 set(test_stdc_file "${CMAKE_CURRENT_BINARY_DIR}/${header}_test.c")
520 configure_file(header-test-template.c ${test_stdc_file} @ONLY)
521 foreach(stdc_version ${TEST_STDC_VERSIONS})
523 "${header}_c${stdc_version}_test"
529 "${header}_gnu${stdc_version}_test"
536 set(test_stdcxx_file "${CMAKE_CURRENT_BINARY_DIR}/${header}_test.cpp")
537 configure_file(header-test-template.c ${test_stdcxx_file} @ONLY)
538 foreach(stdcxx_version ${TEST_STDCXX_VERSIONS})
540 "${header}_cpp${stdcxx_version}_test"
543 "c++${stdcxx_version}"
546 "${header}_gnucpp${stdcxx_version}_test"
549 "gnu++${stdcxx_version}"