[libcxx-commits] [PATCH] D125910: [libc++] Improve error messages for disabled modes
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu May 19 08:27:50 PDT 2022
ldionne 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
----------------
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.
================
Comment at: libcxx/include/future:2435
#endif // !_LIBCPP_HAS_NO_THREADS
----------------
Mordante wrote:
> `<shared_mutex>` and `<thread>` seem to have a similar issue.
Thanks for the catch!
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