summaryrefslogtreecommitdiff
path: root/libc/src/string
diff options
context:
space:
mode:
authorSterling-Augustine <saugustine@google.com>2025-10-27 14:39:46 -0700
committerGitHub <noreply@github.com>2025-10-27 14:39:46 -0700
commit7d1538cd3db3e228459e483ce9cdeb7fa4ae5e00 (patch)
tree4bff517ba0f45cc9cee406da4733bad4e18ea056 /libc/src/string
parent1c837ecaa067840b06a97e7e1f13e54bf64e03cf (diff)
Move LIBC_CONF_STRING_UNSAFE_WIDE_READ to top-level libc-configuration (#165046)
This options sets a compile option when building sources inside the string directory, and this option affects string_utils.h. But string_utils.h is #included from more places than just the string directory (such as from __support/CPP/string.h), leading to both narrow-reads in those cases, but more seriously, ODR violations when the two different string_length implementations are included int he same program. Having this option at the top level avoids this problem.
Diffstat (limited to 'libc/src/string')
-rw-r--r--libc/src/string/CMakeLists.txt11
1 files changed, 0 insertions, 11 deletions
diff --git a/libc/src/string/CMakeLists.txt b/libc/src/string/CMakeLists.txt
index 83c956429be2..a640e1d2cc77 100644
--- a/libc/src/string/CMakeLists.txt
+++ b/libc/src/string/CMakeLists.txt
@@ -1,15 +1,5 @@
add_subdirectory(memory_utils)
-if(LIBC_CONF_STRING_UNSAFE_WIDE_READ)
- list(APPEND string_config_options "-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")
-endif()
-
add_header_library(
string_utils
HDRS
@@ -24,7 +14,6 @@ add_header_library(
libc.src.__support.common
libc.src.__support.macros.attributes
libc.src.string.memory_utils.inline_memcpy
- ${string_config_options}
)
add_header_library(