Skip to content

Commit 97f723b

Browse files
committed
[libc] Fix 'vasprintf' not working in non-fullbuild mode
1 parent f0944f4 commit 97f723b

File tree

2 files changed

+14
-13
lines changed

2 files changed

+14
-13
lines changed

libc/config/gpu/entrypoints.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,8 @@ set(TARGET_LIBC_ENTRYPOINTS
187187
libc.src.stdio.sprintf
188188
libc.src.stdio.vsnprintf
189189
libc.src.stdio.vsprintf
190+
libc.src.stdio.asprintf
191+
libc.src.stdio.vasprintf
190192
libc.src.stdio.sscanf
191193
libc.src.stdio.vsscanf
192194
libc.src.stdio.feof

libc/src/stdio/printf_core/CMakeLists.txt

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@ add_object_library(
9999
libc.src.__support.uint128
100100
)
101101

102-
103102
add_object_library(
104103
printf_main
105104
SRCS
@@ -114,6 +113,18 @@ add_object_library(
114113
libc.src.__support.arg_list
115114
)
116115

116+
add_header_library(
117+
vasprintf_internal
118+
HDRS
119+
vasprintf_internal.h
120+
DEPENDS
121+
libc.src.__support.arg_list
122+
libc.src.stdio.printf_core.printf_main
123+
libc.src.stdio.printf_core.writer
124+
libc.src.stdlib.malloc
125+
libc.src.stdlib.realloc
126+
)
127+
117128
if(NOT (TARGET libc.src.__support.File.file) AND LLVM_LIBC_FULL_BUILD)
118129
# Not all platforms have a file implementation. If file is unvailable, and a
119130
# full build is requested, then we must skip all file based printf sections.
@@ -132,15 +143,3 @@ add_header_library(
132143
libc.src.stdio.printf_core.writer
133144
${use_system_file}
134145
)
135-
136-
add_header_library(
137-
vasprintf_internal
138-
HDRS
139-
vasprintf_internal.h
140-
DEPENDS
141-
libc.src.__support.arg_list
142-
libc.src.stdio.printf_core.printf_main
143-
libc.src.stdio.printf_core.writer
144-
libc.src.stdlib.malloc
145-
libc.src.stdlib.realloc
146-
)

0 commit comments

Comments
 (0)