[libcxx-commits] [PATCH] D152168: [libc++] Roll up fstream support into filesystem support

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jun 21 11:00:26 PDT 2023


ldionne added a comment.

Thanks for the additional context. So basically, you folks are considering systems where a file system does exist (even in the case of semihosted I/O), but where the platform does not provide the necessary set of library functions to implement all of `<filesystem>`. In other words, that's a system where `LIBCXX_ENABLE_FILESYSTEM` is true, but where parts of the filesystem-requiring functionality in libc++ can't be implemented due to incomplete platform support.

If I understand correctly, then I think that's the correct way to think about this, instead of pretending that these platforms don't have support for a filesystem but magically have the `<fstream>` class and only that one. Can you tell me a bit more about your setups? This didn't come up during our CI testing (which tests all officially supported configurations), so we're not formally aware of your use cases:

1. Do you carry downstream patches?
2. How did you find out about this change?
3. How much of `<filesystem>` can't be implemented on your platforms?

I'm interested in supporting your use cases, and in particular in making things work well for embedded platforms -- that's part of the reason why we're making all these changes. But I'm also interested in making sure we provide coherent and well-supported ways to subset the library instead of arbitrary ones based on individual platform's needs, so at the moment just re-introducing `LIBCXX_ENABLE_FSTREAM` doesn't seem like the right approach to me. FWIW, the only reason why I introduced `LIBCXX_ENABLE_FSTREAM` is that I didn't have time to do this full stack of patches back then. Let's talk.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152168



More information about the libcxx-commits mailing list