[libc++] Make LIBCXX_ENABLE_FILESYSTEM fully consistent
authorLouis Dionne <ldionne.2@gmail.com>
Mon, 18 Jan 2021 17:18:18 +0000 (12:18 -0500)
committerLouis Dionne <ldionne.2@gmail.com>
Tue, 19 Jan 2021 19:15:48 +0000 (14:15 -0500)
commit933518fff82c8f39626bbcca81adc516483a9651
tree53ee8bbeae82e77f1821be348f06fb8fe33be32f
parent68dba7eae1df333738d1c77cbbefd480995c1972
[libc++] Make LIBCXX_ENABLE_FILESYSTEM fully consistent

Previously, LIBCXX_ENABLE_FILESYSTEM controlled only whether the filesystem
support was compiled into libc++'s library. This commit promotes the
setting to a first-class option like LIBCXX_ENABLE_LOCALIZATION, where
the whole library is aware of the setting and features that depend on
<filesystem> won't be provided at all. The test suite is also properly
annotated such that tests that depend on <filesystem> are disabled when
the library doesn't support it.

This is an alternative to https://llvm.org/D94824, but also an improvement
along the lines of LIBCXX_ENABLE_LOCALIZATION that I had been wanting to
make for a while.

Differential Revision: https://reviews.llvm.org/D94921
36 files changed:
libcxx/CMakeLists.txt
libcxx/cmake/caches/Generic-no-filesystem.cmake [new file with mode: 0644]
libcxx/include/__config_site.in
libcxx/include/filesystem
libcxx/include/fstream
libcxx/test/configs/legacy.cfg.in
libcxx/test/libcxx/double_include.sh.cpp
libcxx/test/libcxx/experimental/filesystem/deprecated.verify.cpp
libcxx/test/libcxx/experimental/filesystem/version.pass.cpp
libcxx/test/libcxx/min_max_macros.compile.pass.cpp
libcxx/test/libcxx/modules/cinttypes_exports.compile.pass.cpp
libcxx/test/libcxx/modules/clocale_exports.compile.pass.cpp
libcxx/test/libcxx/modules/cstdint_exports.compile.pass.cpp
libcxx/test/libcxx/modules/inttypes_h_exports.compile.pass.cpp
libcxx/test/libcxx/modules/stdint_h_exports.compile.pass.cpp
libcxx/test/libcxx/modules/stds_include.sh.cpp
libcxx/test/libcxx/no_assert_include.compile.pass.cpp
libcxx/test/std/experimental/filesystem/fs.req.macros/feature_macro.pass.cpp
libcxx/test/std/experimental/filesystem/fs.req.namespace/namespace.pass.cpp
libcxx/test/std/input.output/file.streams/fstreams/filebuf.members/open_path.pass.cpp
libcxx/test/std/input.output/file.streams/fstreams/fstream.cons/path.pass.cpp
libcxx/test/std/input.output/file.streams/fstreams/fstream.members/open_path.pass.cpp
libcxx/test/std/input.output/file.streams/fstreams/ifstream.cons/path.pass.cpp
libcxx/test/std/input.output/file.streams/fstreams/ifstream.members/open_path.pass.cpp
libcxx/test/std/input.output/file.streams/fstreams/ofstream.cons/path.pass.cpp
libcxx/test/std/input.output/file.streams/fstreams/ofstream.members/open_path.pass.cpp
libcxx/test/std/input.output/filesystems/lit.local.cfg
libcxx/test/std/language.support/support.limits/support.limits.general/filesystem.version.pass.cpp
libcxx/test/std/utilities/time/time.clock/time.clock.file/now.pass.cpp
libcxx/utils/ci/buildkite-pipeline.yml
libcxx/utils/ci/macos-backdeployment.sh
libcxx/utils/ci/run-buildbot
libcxx/utils/generate_feature_test_macro_components.py
libcxx/utils/generate_header_tests.py
libcxx/utils/libcxx/test/features.py
libcxx/utils/libcxx/test/params.py