[libc-commits] [libc] 5e61b9c - [libc][NFC] Make all integration tests depend on the threads implementation.

Siva Chandra Reddy via libc-commits libc-commits at lists.llvm.org
Wed Jul 13 13:55:36 PDT 2022


Author: Siva Chandra Reddy
Date: 2022-07-13T20:51:12Z
New Revision: 5e61b9c556267086ef9b743a0b57df302eef831b

URL: https://github.com/llvm/llvm-project/commit/5e61b9c556267086ef9b743a0b57df302eef831b
DIFF: https://github.com/llvm/llvm-project/commit/5e61b9c556267086ef9b743a0b57df302eef831b.diff

LOG: [libc][NFC] Make all integration tests depend on the threads implementation.

The integration tests use the loader which sets up the main thread's
self object. So, all integration tests have to depend on the threads
implementation.

Added: 
    

Modified: 
    libc/cmake/modules/LLVMLibCTestRules.cmake

Removed: 
    


################################################################################
diff  --git a/libc/cmake/modules/LLVMLibCTestRules.cmake b/libc/cmake/modules/LLVMLibCTestRules.cmake
index a5f789d1e1f95..4b60714f3b43e 100644
--- a/libc/cmake/modules/LLVMLibCTestRules.cmake
+++ b/libc/cmake/modules/LLVMLibCTestRules.cmake
@@ -421,13 +421,9 @@ function(add_integration_test test_name)
   get_fq_target_name(${test_name}.libc fq_libc_target_name)
 
   get_fq_deps_list(fq_deps_list ${INTEGRATION_TEST_DEPENDS})
-  # Add memory functions to which compilers can emit calls.
-  list(APPEND fq_deps_list
-          libc.src.string.bcmp
-          libc.src.string.bzero
-          libc.src.string.memcmp
-          libc.src.string.memcpy
-          libc.src.string.memset)
+  # All integration tests setup TLS area and the main thread's self object.
+  # So, we need to link in the threads implementation.
+  list(APPEND fq_deps_list libc.src.__support.threads.thread)
   list(REMOVE_DUPLICATES fq_deps_list)
   # TODO: Instead of gathering internal object files from entrypoints,
   # collect the object files with public names of entrypoints.


        


More information about the libc-commits mailing list