[libc-commits] [libc] [libc] Use global preprocessor definitions for libc tuning (PR #71938)
via libc-commits
libc-commits at lists.llvm.org
Fri Nov 10 05:22:48 PST 2023
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: Guillaume Chatelet (gchatelet)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/71938.diff
1 Files Affected:
- (modified) libc/src/string/CMakeLists.txt (+2-6)
``````````diff
diff --git a/libc/src/string/CMakeLists.txt b/libc/src/string/CMakeLists.txt
index 6daaf1998ea7bc2..dd1bdffa9d0a37f 100644
--- a/libc/src/string/CMakeLists.txt
+++ b/libc/src/string/CMakeLists.txt
@@ -1,13 +1,10 @@
add_subdirectory(memory_utils)
if(LIBC_CONF_STRING_UNSAFE_WIDE_READ)
- list(APPEND string_config_options "-DLIBC_COPT_STRING_UNSAFE_WIDE_READ")
+ add_compile_definitions("-DLIBC_COPT_STRING_UNSAFE_WIDE_READ")
endif()
if(LIBC_CONF_MEMSET_X86_USE_SOFTWARE_PREFETCHING)
- list(APPEND string_config_options "-DLIBC_COPT_MEMSET_X86_USE_SOFTWARE_PREFETCHING")
-endif()
-if(string_config_options)
- list(PREPEND string_config_options "COMPILE_OPTIONS")
+ add_compile_definitions("-DLIBC_COPT_MEMSET_X86_USE_SOFTWARE_PREFETCHING")
endif()
add_header_library(
@@ -20,7 +17,6 @@ add_header_library(
libc.include.stdlib
libc.src.__support.common
libc.src.__support.CPP.bitset
- ${string_config_options}
)
add_header_library(
``````````
</details>
https://github.com/llvm/llvm-project/pull/71938
More information about the libc-commits
mailing list