aboutsummaryrefslogtreecommitdiff
path: root/libc/src/stdio
diff options
context:
space:
mode:
authorSiva Chandra <sivachandra@gmail.com>2023-09-26 09:20:00 -0700
committerGitHub <noreply@github.com>2023-09-26 09:20:00 -0700
commit3bfd6a7521320ddffd5219569067f17e9843b26e (patch)
treef7ef58c44ffd317b57bef52e00784d9bd97aa7cc /libc/src/stdio
parentb10721e94127bb62acdd8be35fab6249da26d975 (diff)
downloadllvm-3bfd6a7521320ddffd5219569067f17e9843b26e.zip
llvm-3bfd6a7521320ddffd5219569067f17e9843b26e.tar.gz
llvm-3bfd6a7521320ddffd5219569067f17e9843b26e.tar.bz2
[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".
Diffstat (limited to 'libc/src/stdio')
-rw-r--r--libc/src/stdio/CMakeLists.txt6
-rw-r--r--libc/src/stdio/printf_core/CMakeLists.txt1
-rw-r--r--libc/src/stdio/scanf_core/CMakeLists.txt1
3 files changed, 2 insertions, 6 deletions
diff --git a/libc/src/stdio/CMakeLists.txt b/libc/src/stdio/CMakeLists.txt
index 0ec4c60..169bc59 100644
--- a/libc/src/stdio/CMakeLists.txt
+++ b/libc/src/stdio/CMakeLists.txt
@@ -137,7 +137,6 @@ add_entrypoint_object(
fscanf.h
DEPENDS
${scanf_deps}
- ${use_system_file}
)
add_entrypoint_object(
@@ -148,7 +147,6 @@ add_entrypoint_object(
scanf.h
DEPENDS
${scanf_deps}
- ${use_system_file}
)
add_entrypoint_object(
@@ -194,7 +192,6 @@ add_entrypoint_object(
printf.h
DEPENDS
${printf_deps}
- ${use_system_file}
)
add_entrypoint_object(
@@ -206,7 +203,6 @@ add_entrypoint_object(
DEPENDS
libc.src.__support.arg_list
libc.src.stdio.printf_core.vfprintf_internal
- ${use_system_file}
)
add_entrypoint_object(
@@ -239,7 +235,6 @@ add_entrypoint_object(
vprintf.h
DEPENDS
${printf_deps}
- ${use_system_file}
)
add_entrypoint_object(
@@ -251,7 +246,6 @@ add_entrypoint_object(
DEPENDS
libc.src.__support.arg_list
libc.src.stdio.printf_core.vfprintf_internal
- ${use_system_file}
)
add_subdirectory(printf_core)
diff --git a/libc/src/stdio/printf_core/CMakeLists.txt b/libc/src/stdio/printf_core/CMakeLists.txt
index 1b6f763..8da2743 100644
--- a/libc/src/stdio/printf_core/CMakeLists.txt
+++ b/libc/src/stdio/printf_core/CMakeLists.txt
@@ -125,4 +125,5 @@ add_header_library(
libc.src.__support.arg_list
libc.src.stdio.printf_core.printf_main
libc.src.stdio.printf_core.writer
+ ${use_system_file}
)
diff --git a/libc/src/stdio/scanf_core/CMakeLists.txt b/libc/src/stdio/scanf_core/CMakeLists.txt
index 1fab27d..060dc2d 100644
--- a/libc/src/stdio/scanf_core/CMakeLists.txt
+++ b/libc/src/stdio/scanf_core/CMakeLists.txt
@@ -90,4 +90,5 @@ add_header_library(
libc.include.stdio
libc.src.__support.File.file
libc.src.__support.arg_list
+ ${use_system_file}
)