[reland] algorithm_test.cpp
authorGuillaume Chatelet <gchatelet@google.com>
Thu, 30 Jun 2022 14:43:52 +0000 (14:43 +0000)
committerGuillaume Chatelet <gchatelet@google.com>
Fri, 1 Jul 2022 10:45:29 +0000 (10:45 +0000)
Removing `-ffreestanding` for the tests should allow us to use `<iostream>`

Differential Revision: https://reviews.llvm.org/D128916

libc/test/src/string/memory_utils/CMakeLists.txt

index df481ee..d2178da 100644 (file)
@@ -1,18 +1,19 @@
+# These tests are only exercising implementation details
+#  - They don't need to be compiled with '-ffreestanding'
+#  - They can use C++ facilities like <iostream>.
 add_libc_unittest(
-  utils_test
+  implementation_details_test
   SUITE
     libc_string_unittests
   SRCS
     address_test.cpp
-    algorithm_test.cpp
+    algorithm_test.cpp
     backend_test.cpp
     elements_test.cpp
     memory_access_test.cpp
     utils_test.cpp
   COMPILE_OPTIONS
     ${LIBC_COMPILE_OPTIONS_NATIVE}
-    -ffreestanding
-    -pthread
   DEPENDS
     libc.src.string.memory_utils.memory_utils
     libc.src.__support.CPP.array