diff options
author | Joseph Huber <jhuber6@vols.utk.edu> | 2023-05-02 06:39:14 -0500 |
---|---|---|
committer | Joseph Huber <jhuber6@vols.utk.edu> | 2023-05-02 09:40:24 -0500 |
commit | 2353b52eae71ffa3993d21f0bed0c571cf2e0c79 (patch) | |
tree | 76d1c287d8539afc5e6dfd9a3739baf24a54b882 /libc/test | |
parent | d755e10e7ac8abe7031c3f119df93541c0a78551 (diff) | |
download | llvm-2353b52eae71ffa3993d21f0bed0c571cf2e0c79.tar.gz |
[libc] Fix some missing features from the hermetic test support
This patch addresses some of the flags and features that are currently
missing from the hermetic test support. This mostly just fixes the
`add_libc_test` option failing to find a few dependencies or missing
arguments from the previous unit test support.
Reviewed By: lntue
Differential Revision: https://reviews.llvm.org/D149629
Diffstat (limited to 'libc/test')
-rw-r--r-- | libc/test/UnitTest/CMakeLists.txt | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/libc/test/UnitTest/CMakeLists.txt b/libc/test/UnitTest/CMakeLists.txt index c1f6d0d0750e..0335a8199fc2 100644 --- a/libc/test/UnitTest/CMakeLists.txt +++ b/libc/test/UnitTest/CMakeLists.txt @@ -77,8 +77,6 @@ add_library( RoundingModeUtils.cpp RoundingModeUtils.h ) -target_include_directories(LibcFPTestHelpers PUBLIC ${LIBC_SOURCE_DIR}) -target_link_libraries(LibcFPTestHelpers LibcUnitTest) add_dependencies( LibcFPTestHelpers LibcUnitTest @@ -93,8 +91,6 @@ add_library( MemoryMatcher.h MemoryMatcher.cpp ) -target_include_directories(LibcMemoryHelpers PUBLIC ${LIBC_SOURCE_DIR}) -target_link_libraries(LibcMemoryHelpers LibcUnitTest) add_dependencies( LibcMemoryHelpers LibcUnitTest @@ -106,8 +102,6 @@ add_library( PrintfMatcher.h PrintfMatcher.cpp ) -target_include_directories(LibcPrintfHelpers PUBLIC ${LIBC_SOURCE_DIR}) -target_link_libraries(LibcPrintfHelpers LibcUnitTest) add_dependencies( LibcPrintfHelpers LibcUnitTest @@ -121,8 +115,6 @@ add_library( ScanfMatcher.h ScanfMatcher.cpp ) -target_include_directories(LibcScanfHelpers PUBLIC ${LIBC_SOURCE_DIR}) -target_link_libraries(LibcScanfHelpers LibcUnitTest) add_dependencies( LibcScanfHelpers LibcUnitTest @@ -130,3 +122,9 @@ add_dependencies( libc.src.stdio.scanf_core.core_structs libc.test.UnitTest.string_utils ) + +foreach(lib LibcFPTestHelpers LibcMemoryHelpers LibcPrintfHelpers LibcScanfHelpers) + target_include_directories(${lib} PUBLIC ${LIBC_SOURCE_DIR}) + target_compile_options(${lib} PRIVATE -fno-exceptions -fno-rtti) +target_link_libraries(${lib} LibcUnitTest) +endforeach() |