[libc-commits] [libc] [libc][NFC] Add compile options only to the header libraries which use them. (PR #67447)
via libc-commits
libc-commits at lists.llvm.org
Tue Sep 26 08:49:04 PDT 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
<details>
<summary>Changes</summary>
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".
---
Full diff: https://github.com/llvm/llvm-project/pull/67447.diff
3 Files Affected:
- (modified) libc/src/stdio/CMakeLists.txt (-6)
- (modified) libc/src/stdio/printf_core/CMakeLists.txt (+1)
- (modified) libc/src/stdio/scanf_core/CMakeLists.txt (+1)
``````````diff
diff --git a/libc/src/stdio/CMakeLists.txt b/libc/src/stdio/CMakeLists.txt
index 0ec4c608ad8425f..169bc592dee4885 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 1b6f763e084be9b..8da274395526df6 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 1fab27d3d28b5e0..060dc2d239eee67 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}
)
``````````
</details>
https://github.com/llvm/llvm-project/pull/67447
More information about the libc-commits
mailing list