[libcxx-commits] [PATCH] D152382: [libc++] Expand the contents of LIBCXX_ENABLE_FILESYSTEM

Petr Hosek via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Jun 27 16:48:18 PDT 2023


phosek added a comment.

We reproduced the issue. We currently disable filesystem support on Windows by setting `LIBCXX_ENABLE_FILESYSTEM` to `OFF`, see https://github.com/llvm/llvm-project/blob/7075f9d926c93efefacb72caf17e93ae00b3703b/clang/cmake/caches/Fuchsia-stage2.cmake#L122. Even when filesystem is disabled, libc++ still builds `filesystem_clock.cpp` (https://github.com/llvm/llvm-project/blob/be02f912d6b9b515a1d1b30cf06dfff1c085ea34/libcxx/src/CMakeLists.txt#L15) and `filesystem_clock.cpp` includes `posix_compat.h` (https://github.com/llvm/llvm-project/blob/be02f912d6b9b515a1d1b30cf06dfff1c085ea34/libcxx/src/filesystem/filesystem_clock.cpp#L14) which on Windows calls functions like `status` (https://github.com/llvm/llvm-project/blob/be02f912d6b9b515a1d1b30cf06dfff1c085ea34/libcxx/src/filesystem/posix_compat.h#L362), but that function is declared in `__filesystem/operations.h` (https://github.com/llvm/llvm-project/blob/be02f912d6b9b515a1d1b30cf06dfff1c085ea34/libcxx/include/__filesystem/operations.h#L187) but after this change, all those declarations aren't omitted when `LIBCXX_ENABLE_FILESYSTEM` is disabled (https://github.com/llvm/llvm-project/blob/be02f912d6b9b515a1d1b30cf06dfff1c085ea34/libcxx/include/__filesystem/operations.h#L31).

Can we either revert this change, or at least undo the change to `__filesystem/operations.h`?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152382/new/

https://reviews.llvm.org/D152382



More information about the libcxx-commits mailing list