[llvm] Create a CharSetConverter class with both iconv and icu support (PR #74516)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 15 13:27:11 PST 2025
================
@@ -552,6 +552,10 @@ else()
option(LLVM_ENABLE_THREADS "Use threads if available." ON)
endif()
+set(LLVM_ENABLE_ICU "ON" CACHE STRING "Use ICU for character conversion support if available. Can be ON, OFF, or FORCE_ON")
----------------
nikic wrote:
Because I don't think most consumers of *LLVM* will want libLLVM to have a dependency on ICU. Like, you wouldn't want your graphics driver to pull in ICU due to a mesa -> LLVM -> LLVMSupport -> ICU dependency chain.
It would be less concerning (though also not great) if this were a separate library and not part of LLVMSupport, so the dependency can be added to clang only, not LLVM.
> The `iconv` support used is already limited to "built-in" support, e.g., from `libc`.
Why is that? Linux + glibc has a high quality built-in iconv, but e.g. musl and macOS have a low quality built-in iconv. I could understand limiting support to only the GNU iconv implementation, but I'm not sure I get the built-in vs separate library distinction for iconv.
https://github.com/llvm/llvm-project/pull/74516
More information about the llvm-commits
mailing list