summaryrefslogtreecommitdiff
path: root/libc/cmake
diff options
context:
space:
mode:
authorJoseph Huber <jhuber6@vols.utk.edu>2023-03-15 20:12:16 -0500
committerJoseph Huber <jhuber6@vols.utk.edu>2023-03-16 07:33:22 -0500
commitf62523032d1d0e3e0f33cd1bc738a9f4b785eb25 (patch)
tree946d8748fd628b6bfaffad89df8a02b68bbc1ab5 /libc/cmake
parentbece599dff92006e8e729a7051a6b879b0fba5bc (diff)
downloadllvm-f62523032d1d0e3e0f33cd1bc738a9f4b785eb25.tar.gz
[libc] Inherit integration test dependencies from the startup target
All integration tests rely on the startup code to be run. Currently we manually include a few of these dependencies that are relevant for the Linux target. This patch changes this to make the integration test's dependencies include all the dependencies of the startup code. This simplifies the code and makes it easier to support different targets. The changes here cause the integration test to be dependent on more targets than previously necessary, but it should be fine. Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D146184
Diffstat (limited to 'libc/cmake')
-rw-r--r--libc/cmake/modules/LLVMLibCTestRules.cmake12
1 files changed, 3 insertions, 9 deletions
diff --git a/libc/cmake/modules/LLVMLibCTestRules.cmake b/libc/cmake/modules/LLVMLibCTestRules.cmake
index 6e253745a6fc..6054f46bfb54 100644
--- a/libc/cmake/modules/LLVMLibCTestRules.cmake
+++ b/libc/cmake/modules/LLVMLibCTestRules.cmake
@@ -439,15 +439,9 @@ function(add_integration_test test_name)
get_fq_deps_list(fq_deps_list ${INTEGRATION_TEST_DEPENDS})
list(APPEND fq_deps_list
- # All integration tests setup TLS area and the main thread's self object.
- # So, we need to link in the threads implementation. Likewise, the startup
- # code also has to run init_array callbacks which potentially register
- # their own atexit callbacks. So, link in exit and atexit also with all
- # integration tests.
- libc.src.__support.threads.thread
- libc.src.stdlib.atexit
- libc.src.stdlib.exit
- libc.src.unistd.environ
+ # All integration tests need to inherit the same dependencies as the
+ # startup code.
+ ${INTEGRATION_TEST_STARTUP}
# We always add the memory functions objects. This is because the
# compiler's codegen can emit calls to the C memory functions.
libc.src.string.bcmp