Skip to content

Commit 3bfd6a7

Browse files
authored
[libc][NFC] Add compile options only to the header libraries which use them. (#67447)
Other libraries dependent on these libraries will automatically inherit those compile options. This change in particular affects the compile option "-DLIBC_COPT_STDIO_USE_SYSTEM_FILE".
1 parent b10721e commit 3bfd6a7

File tree

3 files changed

+2
-6
lines changed

3 files changed

+2
-6
lines changed

libc/src/stdio/CMakeLists.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ add_entrypoint_object(
137137
fscanf.h
138138
DEPENDS
139139
${scanf_deps}
140-
${use_system_file}
141140
)
142141

143142
add_entrypoint_object(
@@ -148,7 +147,6 @@ add_entrypoint_object(
148147
scanf.h
149148
DEPENDS
150149
${scanf_deps}
151-
${use_system_file}
152150
)
153151

154152
add_entrypoint_object(
@@ -194,7 +192,6 @@ add_entrypoint_object(
194192
printf.h
195193
DEPENDS
196194
${printf_deps}
197-
${use_system_file}
198195
)
199196

200197
add_entrypoint_object(
@@ -206,7 +203,6 @@ add_entrypoint_object(
206203
DEPENDS
207204
libc.src.__support.arg_list
208205
libc.src.stdio.printf_core.vfprintf_internal
209-
${use_system_file}
210206
)
211207

212208
add_entrypoint_object(
@@ -239,7 +235,6 @@ add_entrypoint_object(
239235
vprintf.h
240236
DEPENDS
241237
${printf_deps}
242-
${use_system_file}
243238
)
244239

245240
add_entrypoint_object(
@@ -251,7 +246,6 @@ add_entrypoint_object(
251246
DEPENDS
252247
libc.src.__support.arg_list
253248
libc.src.stdio.printf_core.vfprintf_internal
254-
${use_system_file}
255249
)
256250

257251
add_subdirectory(printf_core)

libc/src/stdio/printf_core/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,4 +125,5 @@ add_header_library(
125125
libc.src.__support.arg_list
126126
libc.src.stdio.printf_core.printf_main
127127
libc.src.stdio.printf_core.writer
128+
${use_system_file}
128129
)

libc/src/stdio/scanf_core/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,4 +90,5 @@ add_header_library(
9090
libc.include.stdio
9191
libc.src.__support.File.file
9292
libc.src.__support.arg_list
93+
${use_system_file}
9394
)

0 commit comments

Comments
 (0)