[libc-commits] [PATCH] D149217: [libc] Enable the GPU build to build the UnitTest library
Joseph Huber via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue Apr 25 17:06:29 PDT 2023
jhuber6 created this revision.
jhuber6 added reviewers: sivachandra, lntue, michaelrj.
Herald added subscribers: libc-commits, ecnelises, tschuett.
Herald added projects: libc-project, All.
jhuber6 requested review of this revision.
The previous patch in D149216 <https://reviews.llvm.org/D149216> allows us to use the internal `<stdlib.h>`
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 <https://reviews.llvm.org/D149216>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D149217
Files:
libc/config/gpu/entrypoints.txt
libc/test/CMakeLists.txt
Index: libc/test/CMakeLists.txt
===================================================================
--- libc/test/CMakeLists.txt
+++ libc/test/CMakeLists.txt
@@ -6,9 +6,7 @@
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
Index: libc/config/gpu/entrypoints.txt
===================================================================
--- libc/config/gpu/entrypoints.txt
+++ libc/config/gpu/entrypoints.txt
@@ -57,6 +57,11 @@
# 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
)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149217.516990.patch
Type: text/x-patch
Size: 854 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20230426/fcc0fae6/attachment.bin>
More information about the libc-commits
mailing list