Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libc][stdlib] Only add internal malloc in full build mode. Use the system malloc in overlay mode. #95845

Merged
merged 1 commit into from
Jun 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 17 additions & 9 deletions libc/src/stdlib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -418,15 +418,23 @@ else()
libc.src.string.memory_utils.inline_memcpy
libc.src.string.memory_utils.inline_memset
)
add_entrypoint_object(
malloc
SRCS
freelist_malloc.cpp
HDRS
malloc.h
DEPENDS
.freelist_heap
)
# Only add malloc in full build mode. Use the system malloc in overlay mode.
if(LLVM_LIBC_FULL_BUILD)
add_entrypoint_object(
malloc
SRCS
freelist_malloc.cpp
HDRS
malloc.h
DEPENDS
.freelist_heap
)
else()
add_entrypoint_external(
malloc
)
endif()

add_entrypoint_external(
free
)