[libcxx-commits] [PATCH] D125910: [libc++] Improve error messages for disabled modes
Mark de Wever via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Sun May 29 05:38:35 PDT 2022
Mordante added inline comments.
================
Comment at: libcxx/include/filesystem:264
#if defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
-# error "The Filesystem library is not supported since libc++ has been configured with LIBCXX_ENABLE_FILESYSTEM disabled"
+# error "The <filesystem> library is not supported since libc++ has been configured without support for a filesystem."
#endif
----------------
ldionne wrote:
> Mordante wrote:
> > In general I like the approach to make errors easier to understand. I just wonder would it be useful to keep the CMake flag? Something along the lines of the suggested edit.
> >
> Frankly, I'm not sure. This is going to be seen by end-users exclusively, not by maintainers. They don't even know that we configure and build libc++ with CMake.
>
> One could even argue that this can be confusing if a user is building *their* project with CMake -- it could be understood as saying that they should be passing `LIBCXX_ENABLE_FILESYSTEM=ON` to their own CMake configuration, which would be rather misleading.
Fair point. I don't feel very strongly about it. I expect (and hope) disabled headers are uncommon in practice.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125910/new/
https://reviews.llvm.org/D125910
More information about the libcxx-commits
mailing list