From: Joseph Huber Date: Wed, 26 Apr 2023 00:03:43 +0000 (-0500) Subject: [libc] Enable the GPU build to build the UnitTest library X-Git-Tag: upstream/17.0.6~10289 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fab84dcd0a5a38df8ce5d8996fd2d0c917f39ae3;p=platform%2Fupstream%2Fllvm.git [libc] Enable the GPU build to build the UnitTest library The previous patch in D149216 allows us to use the internal `` include for the GPU build. However, we currently don't provide the memory functions so the header wasn't resolving them. This patch adds these as entrypoints. They don't cause any entrypoints to be emitted because they are not implemented, but they provide it in the header so that we can rely on the test's implementation of them. Depends on D149216 Reviewed By: sivachandra Differential Revision: https://reviews.llvm.org/D149217 --- diff --git a/libc/config/gpu/entrypoints.txt b/libc/config/gpu/entrypoints.txt index 5750fba..d42a554 100644 --- a/libc/config/gpu/entrypoints.txt +++ b/libc/config/gpu/entrypoints.txt @@ -57,6 +57,11 @@ set(TARGET_LIBC_ENTRYPOINTS # stdlib.h entrypoints libc.src.stdlib.atoi + # Only implemented in the test suite + libc.src.stdlib.malloc + libc.src.stdlib.realloc + libc.src.stdlib.free + # errno.h entrypoints libc.src.errno.errno ) diff --git a/libc/test/CMakeLists.txt b/libc/test/CMakeLists.txt index 333873a..ed6de64 100644 --- a/libc/test/CMakeLists.txt +++ b/libc/test/CMakeLists.txt @@ -6,9 +6,7 @@ add_dependencies(check-libc libc-unit-tests libc-hermetic-tests) add_custom_target(exhaustive-check-libc) add_custom_target(libc-long-running-tests) -if(NOT LIBC_TARGET_ARCHITECTURE_IS_GPU) - add_subdirectory(UnitTest) -endif() +add_subdirectory(UnitTest) add_header_library( errno_setter_matcher