File tree 6 files changed +25
-2
lines changed
6 files changed +25
-2
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,12 @@ set(TARGET_LIBC_ENTRYPOINTS
63
63
libc.src.inttypes.imaxdiv
64
64
libc.src.inttypes.strtoimax
65
65
libc.src.inttypes.strtoumax
66
+
67
+ # stdio.h entrypoints
68
+ libc.src.stdio.sprintf
69
+ libc.src.stdio.snprintf
70
+ libc.src.stdio.vsprintf
71
+ libc.src.stdio.vsnprintf
66
72
67
73
# stdlib.h entrypoints
68
74
libc.src.stdlib.abs
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ set(TARGET_PUBLIC_HEADERS
4
4
libc.include.errno
5
5
libc.include.inttypes
6
6
libc.include.math
7
+ libc.include.stdio
7
8
libc.include.stdlib
8
9
libc.include.string
9
10
libc.include.strings
Original file line number Diff line number Diff line change @@ -64,6 +64,12 @@ set(TARGET_LIBC_ENTRYPOINTS
64
64
libc.src.inttypes.strtoimax
65
65
libc.src.inttypes.strtoumax
66
66
67
+ # stdio.h entrypoints
68
+ libc.src.stdio.sprintf
69
+ libc.src.stdio.snprintf
70
+ libc.src.stdio.vsprintf
71
+ libc.src.stdio.vsnprintf
72
+
67
73
# stdlib.h entrypoints
68
74
libc.src.stdlib.abs
69
75
libc.src.stdlib.atoi
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ set(TARGET_PUBLIC_HEADERS
4
4
libc.include.errno
5
5
libc.include.inttypes
6
6
libc.include.math
7
+ libc.include.stdio
7
8
libc.include.stdlib
8
9
libc.include.string
9
10
libc.include.strings
Original file line number Diff line number Diff line change @@ -26,6 +26,14 @@ if(NOT LIBC_TARGET_ARCHITECTURE_IS_GPU)
26
26
add_subdirectory (${CMAKE_CURRENT_SOURCE_DIR} /generic)
27
27
endif ()
28
28
29
+ if (${LIBC_TARGET_OS} STREQUAL "baremetal" )
30
+ list (APPEND printf_copts
31
+ "-DLIBC_COPT_PRINTF_DISABLE_FLOAT"
32
+ "-DLIBC_COPT_PRINTF_DISABLE_INDEX_MODE"
33
+ "-DLIBC_COPT_PRINTF_DISABLE_WRITE_INT"
34
+ )
35
+ endif ()
36
+
29
37
add_subdirectory (printf_core)
30
38
add_subdirectory (scanf_core)
31
39
@@ -419,13 +427,13 @@ list(APPEND printf_deps
419
427
libc.src.stdio.printf_core.vfprintf_internal
420
428
)
421
429
if (LLVM_LIBC_FULL_BUILD)
422
- list (APPEND printf_deps
430
+ list (APPEND printf_deps
423
431
libc.src.__support.File.file
424
432
libc.src.__support.File.platform_file
425
433
libc.src.__support.File.platform_stdout
426
434
)
427
435
else ()
428
- set ( printf_copts "-DLIBC_COPT_PRINTF_USE_SYSTEM_FILE" )
436
+ list ( APPEND printf_copts "-DLIBC_COPT_PRINTF_USE_SYSTEM_FILE" )
429
437
endif ()
430
438
431
439
add_entrypoint_object(
Original file line number Diff line number Diff line change @@ -93,6 +93,7 @@ add_object_library(
93
93
libc.src.__support.float_to_string
94
94
COMPILE_OPTIONS
95
95
-DLIBC_COPT_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE
96
+ ${printf_copts}
96
97
)
97
98
98
99
You can’t perform that action at this time.
0 commit comments