[libcxx-commits] [libcxx] [libcxx] Fix freestanding build with filesystem disabled on Windows (PR #164602)
via libcxx-commits
libcxx-commits at lists.llvm.org
Sat Oct 25 02:34:53 PDT 2025
moleium wrote:
@ldionne @philnik777 Thank you for the feedback.
I see the issue here, so i agree with the goal of keeping `std::path` available.
If you take a look at the implementation inconsistency in [<__filesystem/path.h>](https://github.com/llvm/llvm-project/blob/59e601a3d5e7669fdf809b9c6494e6f877ea5cd8/libcxx/include/__filesystem/path.h#L328) On Windows, `_PathExport` and its dependencies are guarded only by `_LIBCPP_WIN32API` which assumes locale support. Other parts of the same header like `_PathCVT`, correctly use `_LIBCPP_HAS_LOCALIZATION`.
Instead of my removing the CMake sources, applying `_LIBCPP_HAS_LOCALIZATION` guard consistently within the headers would fix the issue without breaking existing users.
I can update the PR with that approach if you agree.
https://github.com/llvm/llvm-project/pull/164602
More information about the libcxx-commits
mailing list