[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
This commit is contained in:
Louis Dionne 2021-01-18 12:18:18 -05:00
parent 68dba7eae1
commit 933518fff8
36 changed files with 155 additions and 41 deletions

View File

@ -845,6 +845,7 @@ config_define_if(LIBCXX_BUILD_EXTERNAL_THREAD_LIBRARY _LIBCPP_HAS_THREAD_LIBRARY
config_define_if(LIBCXX_HAS_MUSL_LIBC _LIBCPP_HAS_MUSL_LIBC)
config_define_if(LIBCXX_NO_VCRUNTIME _LIBCPP_NO_VCRUNTIME)
config_define_if(LIBCXX_ENABLE_PARALLEL_ALGORITHMS _LIBCPP_HAS_PARALLEL_ALGORITHMS)
config_define_if_not(LIBCXX_ENABLE_FILESYSTEM _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
config_define_if_not(LIBCXX_ENABLE_RANDOM_DEVICE _LIBCPP_HAS_NO_RANDOM_DEVICE)
config_define_if_not(LIBCXX_ENABLE_LOCALIZATION _LIBCPP_HAS_NO_LOCALIZATION)
config_define_if_not(LIBCXX_ENABLE_VENDOR_AVAILABILITY_ANNOTATIONS _LIBCPP_HAS_NO_VENDOR_AVAILABILITY_ANNOTATIONS)

View File

@ -0,0 +1 @@
set(LIBCXX_ENABLE_FILESYSTEM OFF CACHE BOOL "")

View File

@ -30,6 +30,7 @@
#cmakedefine _LIBCPP_NO_VCRUNTIME
#cmakedefine _LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION @_LIBCPP_TYPEINFO_COMPARISON_IMPLEMENTATION@
#cmakedefine _LIBCPP_ABI_NAMESPACE @_LIBCPP_ABI_NAMESPACE@
#cmakedefine _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY
#cmakedefine _LIBCPP_HAS_PARALLEL_ALGORITHMS
#cmakedefine _LIBCPP_HAS_NO_RANDOM_DEVICE
#cmakedefine _LIBCPP_HAS_NO_LOCALIZATION

View File

@ -251,6 +251,10 @@
#include <__debug>
#if defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
# error "The Filesystem library is not supported by this configuration of libc++"
#endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif

View File

@ -186,7 +186,10 @@ typedef basic_fstream<wchar_t> wfstream;
#include <__locale>
#include <cstdio>
#include <cstdlib>
#include <filesystem>
#if !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
# include <filesystem>
#endif
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
@ -235,7 +238,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
basic_filebuf* open(const string& __s, ios_base::openmode __mode);
#if _LIBCPP_STD_VER >= 17
#if _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
_LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_INLINE_VISIBILITY
basic_filebuf* open(const _VSTD_FS::path& __p, ios_base::openmode __mode) {
return open(__p.c_str(), __mode);
@ -1151,7 +1154,7 @@ public:
#endif
_LIBCPP_INLINE_VISIBILITY
explicit basic_ifstream(const string& __s, ios_base::openmode __mode = ios_base::in);
#if _LIBCPP_STD_VER >= 17
#if _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
_LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_INLINE_VISIBILITY
explicit basic_ifstream(const filesystem::path& __p, ios_base::openmode __mode = ios_base::in)
: basic_ifstream(__p.c_str(), __mode) {}
@ -1177,7 +1180,7 @@ public:
void open(const wchar_t* __s, ios_base::openmode __mode = ios_base::in);
#endif
void open(const string& __s, ios_base::openmode __mode = ios_base::in);
#if _LIBCPP_STD_VER >= 17
#if _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
_LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_INLINE_VISIBILITY
void open(const filesystem::path& __p,
ios_base::openmode __mode = ios_base::in) {
@ -1365,7 +1368,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
explicit basic_ofstream(const string& __s, ios_base::openmode __mode = ios_base::out);
#if _LIBCPP_STD_VER >= 17
#if _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
_LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_INLINE_VISIBILITY
explicit basic_ofstream(const filesystem::path& __p, ios_base::openmode __mode = ios_base::out)
: basic_ofstream(__p.c_str(), __mode) {}
@ -1392,7 +1395,7 @@ public:
#endif
void open(const string& __s, ios_base::openmode __mode = ios_base::out);
#if _LIBCPP_STD_VER >= 17
#if _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
_LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_INLINE_VISIBILITY
void open(const filesystem::path& __p, ios_base::openmode __mode = ios_base::out)
{ return open(__p.c_str(), __mode); }
@ -1579,7 +1582,7 @@ public:
_LIBCPP_INLINE_VISIBILITY
explicit basic_fstream(const string& __s, ios_base::openmode __mode = ios_base::in | ios_base::out);
#if _LIBCPP_STD_VER >= 17
#if _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
_LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_INLINE_VISIBILITY
explicit basic_fstream(const filesystem::path& __p, ios_base::openmode __mode = ios_base::in | ios_base::out)
: basic_fstream(__p.c_str(), __mode) {}
@ -1607,7 +1610,7 @@ public:
#endif
void open(const string& __s, ios_base::openmode __mode = ios_base::in | ios_base::out);
#if _LIBCPP_STD_VER >= 17
#if _LIBCPP_STD_VER >= 17 && !defined(_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY)
_LIBCPP_AVAILABILITY_FILESYSTEM _LIBCPP_INLINE_VISIBILITY
void open(const filesystem::path& __p, ios_base::openmode __mode = ios_base::in|ios_base::out)
{ return open(__p.c_str(), __mode); }

View File

@ -11,7 +11,6 @@ config.cxx_library_root = "@LIBCXX_LIBRARY_DIR@"
config.enable_exceptions = @LIBCXX_ENABLE_EXCEPTIONS@
config.enable_debug_tests = @LIBCXX_ENABLE_DEBUG_MODE_SUPPORT@
config.enable_experimental = @LIBCXX_ENABLE_EXPERIMENTAL_LIBRARY@
config.enable_filesystem = @LIBCXX_ENABLE_FILESYSTEM@
config.enable_rtti = @LIBCXX_ENABLE_RTTI@
config.enable_shared = @LIBCXX_LINK_TESTS_WITH_SHARED_LIBCXX@
config.enable_32bit = @LIBCXX_BUILD_32_BITS@

View File

@ -87,7 +87,9 @@
#include <exception>
#include <execution>
#include <fenv.h>
#include <filesystem>
#ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY
# include <filesystem>
#endif
#include <float.h>
#include <forward_list>
#ifndef _LIBCPP_HAS_NO_LOCALIZATION
@ -199,7 +201,9 @@
# include <experimental/coroutine>
# endif
# include <experimental/deque>
# include <experimental/filesystem>
# ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY
# include <experimental/filesystem>
# endif
# include <experimental/forward_list>
# include <experimental/functional>
# include <experimental/iterator>

View File

@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
// UNSUPPORTED: libcpp-has-no-filesystem-library
// <experimental/filesystem>

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-filesystem-library
// <experimental/filesystem>
#define _LIBCPP_NO_EXPERIMENTAL_DEPRECATION_WARNING_FILESYSTEM

View File

@ -130,8 +130,10 @@ TEST_MACROS();
TEST_MACROS();
#include <fenv.h>
TEST_MACROS();
#include <filesystem>
#ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY
# include <filesystem>
TEST_MACROS();
#endif
#include <float.h>
TEST_MACROS();
#include <forward_list>
@ -313,8 +315,10 @@ TEST_MACROS();
# endif
# include <experimental/deque>
TEST_MACROS();
# include <experimental/filesystem>
# ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY
# include <experimental/filesystem>
TEST_MACROS();
# endif
# include <experimental/forward_list>
TEST_MACROS();
# include <experimental/functional>

View File

@ -14,6 +14,7 @@
// still get built as part of the 'std' module, which breaks the build.
// UNSUPPORTED: libcpp-has-no-threads
// UNSUPPORTED: libcpp-has-no-localization
// UNSUPPORTED: libcpp-has-no-filesystem-library
// REQUIRES: modules-support
// ADDITIONAL_COMPILE_FLAGS: -fmodules

View File

@ -14,6 +14,7 @@
// still get built as part of the 'std' module, which breaks the build.
// UNSUPPORTED: libcpp-has-no-threads
// UNSUPPORTED: libcpp-has-no-localization
// UNSUPPORTED: libcpp-has-no-filesystem-library
// UNSUPPORTED: c++03

View File

@ -14,6 +14,7 @@
// still get built as part of the 'std' module, which breaks the build.
// UNSUPPORTED: libcpp-has-no-threads
// UNSUPPORTED: libcpp-has-no-localization
// UNSUPPORTED: libcpp-has-no-filesystem-library
// Test that <cstdint> re-exports <stdint.h>

View File

@ -14,6 +14,7 @@
// still get built as part of the 'std' module, which breaks the build.
// UNSUPPORTED: libcpp-has-no-threads
// UNSUPPORTED: libcpp-has-no-localization
// UNSUPPORTED: libcpp-has-no-filesystem-library
// Test that intypes.h re-exports stdint.h

View File

@ -10,6 +10,7 @@
// still get built as part of the 'std' module, which breaks the build.
// UNSUPPORTED: libcpp-has-no-threads
// UNSUPPORTED: libcpp-has-no-localization
// UNSUPPORTED: libcpp-has-no-filesystem-library
// Test that int8_t and the like are exported from stdint.h, not inttypes.h

View File

@ -19,6 +19,7 @@
// still get built as part of the 'std' module, which breaks the build.
// UNSUPPORTED: libcpp-has-no-threads
// UNSUPPORTED: libcpp-has-no-localization
// UNSUPPORTED: libcpp-has-no-filesystem-library
// REQUIRES: modules-support

View File

@ -80,7 +80,9 @@
#include <exception>
#include <execution>
#include <fenv.h>
#include <filesystem>
#ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY
# include <filesystem>
#endif
#include <float.h>
#include <forward_list>
#ifndef _LIBCPP_HAS_NO_LOCALIZATION
@ -192,7 +194,9 @@
# include <experimental/coroutine>
# endif
# include <experimental/deque>
# include <experimental/filesystem>
# ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY
# include <experimental/filesystem>
# endif
# include <experimental/forward_list>
# include <experimental/functional>
# include <experimental/iterator>

View File

@ -6,6 +6,8 @@
//
//===----------------------------------------------------------------------===//
// UNSUPPORTED: libcpp-has-no-filesystem-library
// <experimental/filesystem>
// #define __cpp_lib_experimental_filesystem 201406L

View File

@ -7,6 +7,7 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03
// UNSUPPORTED: libcpp-has-no-filesystem-library
// <experimental/filesystem>

View File

@ -7,7 +7,15 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14
// UNSUPPORTED: c++filesystem-disabled
// UNSUPPORTED: libcpp-has-no-filesystem-library
// Filesystem is supported on Apple platforms starting with macosx10.15.
// UNSUPPORTED: with_system_cxx_lib=macosx10.14
// UNSUPPORTED: with_system_cxx_lib=macosx10.13
// UNSUPPORTED: with_system_cxx_lib=macosx10.12
// UNSUPPORTED: with_system_cxx_lib=macosx10.11
// UNSUPPORTED: with_system_cxx_lib=macosx10.10
// UNSUPPORTED: with_system_cxx_lib=macosx10.9
// <fstream>

View File

@ -7,7 +7,15 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14
// UNSUPPORTED: c++filesystem-disabled
// UNSUPPORTED: libcpp-has-no-filesystem-library
// Filesystem is supported on Apple platforms starting with macosx10.15.
// UNSUPPORTED: with_system_cxx_lib=macosx10.14
// UNSUPPORTED: with_system_cxx_lib=macosx10.13
// UNSUPPORTED: with_system_cxx_lib=macosx10.12
// UNSUPPORTED: with_system_cxx_lib=macosx10.11
// UNSUPPORTED: with_system_cxx_lib=macosx10.10
// UNSUPPORTED: with_system_cxx_lib=macosx10.9
// <fstream>

View File

@ -7,7 +7,15 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14
// UNSUPPORTED: c++filesystem-disabled
// UNSUPPORTED: libcpp-has-no-filesystem-library
// Filesystem is supported on Apple platforms starting with macosx10.15.
// UNSUPPORTED: with_system_cxx_lib=macosx10.14
// UNSUPPORTED: with_system_cxx_lib=macosx10.13
// UNSUPPORTED: with_system_cxx_lib=macosx10.12
// UNSUPPORTED: with_system_cxx_lib=macosx10.11
// UNSUPPORTED: with_system_cxx_lib=macosx10.10
// UNSUPPORTED: with_system_cxx_lib=macosx10.9
// <fstream>

View File

@ -7,7 +7,16 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14
// UNSUPPORTED: c++filesystem-disabled
// UNSUPPORTED: libcpp-has-no-filesystem-library
// Filesystem is supported on Apple platforms starting with macosx10.15.
// UNSUPPORTED: with_system_cxx_lib=macosx10.14
// UNSUPPORTED: with_system_cxx_lib=macosx10.13
// UNSUPPORTED: with_system_cxx_lib=macosx10.12
// UNSUPPORTED: with_system_cxx_lib=macosx10.11
// UNSUPPORTED: with_system_cxx_lib=macosx10.10
// UNSUPPORTED: with_system_cxx_lib=macosx10.9
// FILE_DEPENDENCIES: test.dat
// <fstream>

View File

@ -7,7 +7,16 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14
// UNSUPPORTED: c++filesystem-disabled
// UNSUPPORTED: libcpp-has-no-filesystem-library
// Filesystem is supported on Apple platforms starting with macosx10.15.
// UNSUPPORTED: with_system_cxx_lib=macosx10.14
// UNSUPPORTED: with_system_cxx_lib=macosx10.13
// UNSUPPORTED: with_system_cxx_lib=macosx10.12
// UNSUPPORTED: with_system_cxx_lib=macosx10.11
// UNSUPPORTED: with_system_cxx_lib=macosx10.10
// UNSUPPORTED: with_system_cxx_lib=macosx10.9
// FILE_DEPENDENCIES: test.dat
// <fstream>

View File

@ -7,7 +7,15 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14
// UNSUPPORTED: c++filesystem-disabled
// UNSUPPORTED: libcpp-has-no-filesystem-library
// Filesystem is supported on Apple platforms starting with macosx10.15.
// UNSUPPORTED: with_system_cxx_lib=macosx10.14
// UNSUPPORTED: with_system_cxx_lib=macosx10.13
// UNSUPPORTED: with_system_cxx_lib=macosx10.12
// UNSUPPORTED: with_system_cxx_lib=macosx10.11
// UNSUPPORTED: with_system_cxx_lib=macosx10.10
// UNSUPPORTED: with_system_cxx_lib=macosx10.9
// <fstream>

View File

@ -7,7 +7,15 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14
// UNSUPPORTED: c++filesystem-disabled
// UNSUPPORTED: libcpp-has-no-filesystem-library
// Filesystem is supported on Apple platforms starting with macosx10.15.
// UNSUPPORTED: with_system_cxx_lib=macosx10.14
// UNSUPPORTED: with_system_cxx_lib=macosx10.13
// UNSUPPORTED: with_system_cxx_lib=macosx10.12
// UNSUPPORTED: with_system_cxx_lib=macosx10.11
// UNSUPPORTED: with_system_cxx_lib=macosx10.10
// UNSUPPORTED: with_system_cxx_lib=macosx10.9
// <fstream>

View File

@ -1,2 +1,9 @@
if 'c++filesystem-disabled' in config.available_features:
# Filesystem is supported on Apple platforms starting with macosx10.15.
# Automatically disable the <filesystem> tests when we're running the test
# suite against an older macOS.
too_old = {'10.9', '10.10', '10.11', '10.12', '10.13', '10.14'}
if any('with_system_cxx_lib=macosx{}'.format(v) in config.available_features for v in too_old):
config.unsupported = True
if 'libcpp-has-no-filesystem-library' in config.available_features:
config.unsupported = True

View File

@ -11,6 +11,8 @@
//
// clang-format off
// UNSUPPORTED: libcpp-has-no-filesystem-library
// <filesystem>
// Test the feature test macros defined by <filesystem>

View File

@ -7,7 +7,15 @@
//===----------------------------------------------------------------------===//
// UNSUPPORTED: c++03, c++11, c++14, c++17
// UNSUPPORTED: c++filesystem-disabled
// UNSUPPORTED: libcpp-has-no-filesystem-library
// Filesystem is supported on Apple platforms starting with macosx10.15.
// UNSUPPORTED: with_system_cxx_lib=macosx10.14
// UNSUPPORTED: with_system_cxx_lib=macosx10.13
// UNSUPPORTED: with_system_cxx_lib=macosx10.12
// UNSUPPORTED: with_system_cxx_lib=macosx10.11
// UNSUPPORTED: with_system_cxx_lib=macosx10.10
// UNSUPPORTED: with_system_cxx_lib=macosx10.9
// <chrono>

View File

@ -175,6 +175,17 @@ steps:
- exit_status: -1 # Agent was lost
limit: 2
- label: "No Filesystem"
command: "libcxx/utils/ci/run-buildbot generic-no-filesystem"
artifact_paths:
- "**/test-results.xml"
agents:
queue: "libcxx-builders"
retry:
automatic:
- exit_status: -1 # Agent was lost
limit: 2
- label: "No random device"
command: "libcxx/utils/ci/run-buildbot generic-no-random_device"
artifact_paths:

View File

@ -120,13 +120,6 @@ fi
LIBCXX_ROOT_ON_DEPLOYMENT_TARGET="${PREVIOUS_DYLIBS_DIR}/macOS/libc++/${DEPLOYMENT_TARGET}"
LIBCXXABI_ROOT_ON_DEPLOYMENT_TARGET="${PREVIOUS_DYLIBS_DIR}/macOS/libc++abi/${DEPLOYMENT_TARGET}"
# Filesystem is supported on Apple platforms starting with macosx10.15.
if [[ ${DEPLOYMENT_TARGET} =~ ^10.9|10.10|10.11|10.12|10.13|10.14$ ]]; then
ENABLE_FILESYSTEM="--param enable_filesystem=false"
else
ENABLE_FILESYSTEM="--param enable_filesystem=true"
fi
# TODO: We need to also run the tests for libc++abi.
echo "@@@ Running tests for libc++ @@@"
"${LLVM_BUILD_DIR}/bin/llvm-lit" -sv "${MONOREPO_ROOT}/libcxx/test" \

View File

@ -225,6 +225,13 @@ generic-nodebug)
generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-nodebug.cmake"
check-cxx-cxxabi
;;
generic-no-filesystem)
export CC=clang
export CXX=clang++
clean
generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-no-filesystem.cmake"
check-cxx-cxxabi
;;
generic-no-random_device)
export CC=clang
export CXX=clang++
@ -271,10 +278,6 @@ x86_64-apple-system-backdeployment-*)
PARAMS+=";cxx_runtime_root=${OSX_ROOTS}/macOS/libc++/${DEPLOYMENT_TARGET}"
PARAMS+=";abi_library_path=${OSX_ROOTS}/macOS/libc++abi/${DEPLOYMENT_TARGET}"
PARAMS+=";use_system_cxx_lib=True"
# Filesystem is supported on Apple platforms starting with macosx10.15.
if [[ ${DEPLOYMENT_TARGET} =~ ^10.9|10.10|10.11|10.12|10.13|10.14$ ]]; then
PARAMS+=";enable_filesystem=False"
fi
export CC=clang
export CXX=clang++

View File

@ -646,6 +646,7 @@ assert all(tc["headers"] == sorted(tc["headers"]) for tc in feature_test_macros)
lit_markup = {
"atomic": ["UNSUPPORTED: libcpp-has-no-threads"],
"barrier": ["UNSUPPORTED: libcpp-has-no-threads"],
"filesystem": ["UNSUPPORTED: libcpp-has-no-filesystem-library"],
"iomanip": ["UNSUPPORTED: libcpp-has-no-localization"],
"istream": ["UNSUPPORTED: libcpp-has-no-localization"],
"latch": ["UNSUPPORTED: libcpp-has-no-threads"],

View File

@ -30,6 +30,9 @@ header_markup = {
"semaphore": ["ifndef _LIBCPP_HAS_NO_THREADS"],
"thread": ["ifndef _LIBCPP_HAS_NO_THREADS"],
"filesystem": ["ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY"],
"experimental/filesystem": ["ifndef _LIBCPP_HAS_NO_FILESYSTEM_LIBRARY"],
"clocale": ["ifndef _LIBCPP_HAS_NO_LOCALIZATION"],
"codecvt": ["ifndef _LIBCPP_HAS_NO_LOCALIZATION"],
"fstream": ["ifndef _LIBCPP_HAS_NO_LOCALIZATION"],

View File

@ -102,6 +102,7 @@ macros = {
'_LIBCPP_NO_VCRUNTIME': 'libcpp-no-vcruntime',
'_LIBCPP_ABI_VERSION': 'libcpp-abi-version',
'_LIBCPP_ABI_UNSTABLE': 'libcpp-abi-unstable',
'_LIBCPP_HAS_NO_FILESYSTEM_LIBRARY': 'libcpp-has-no-filesystem-library',
'_LIBCPP_HAS_NO_RANDOM_DEVICE': 'libcpp-has-no-random-device',
'_LIBCPP_HAS_NO_LOCALIZATION': 'libcpp-has-no-localization',
}

View File

@ -86,12 +86,6 @@ DEFAULT_PARAMETERS = [
]),
# Parameters to enable or disable parts of the test suite
Parameter(name='enable_filesystem', choices=[True, False], type=bool, default=True,
help="Whether to enable tests for the C++ <filesystem> library.",
actions=lambda filesystem: [] if filesystem else [
AddFeature('c++filesystem-disabled')
]),
Parameter(name='enable_experimental', choices=[True, False], type=bool, default=False,
help="Whether to enable tests for experimental C++ libraries (typically Library Fundamentals TSes).",
actions=lambda experimental: [] if not experimental else [