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"
+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" \
--param=enable_experimental=false \
+ ${ENABLE_FILESYSTEM} \
--param=cxx_headers="${LLVM_INSTALL_DIR}/include/c++/v1" \
--param=std="${STD}" \
--param=platform="macosx${DEPLOYMENT_TARGET}" \
if self.long_tests:
self.config.available_features.add('long_tests')
- if not self.get_lit_bool('enable_filesystem', default=True):
- self.config.available_features.add('c++filesystem-disabled')
-
if self.target_info.is_windows():
self.config.available_features.add('windows')
if self.cxx_stdlib_under_test == 'libc++':
self.config.available_features.add('dylib-has-no-bad_any_cast')
self.lit_config.note("throwing bad_any_cast is not supported by the deployment target")
- # Filesystem is support on Apple platforms starting with macosx10.15.
- if name == 'macosx' and version in ('10.%s' % v for v in range(9, 15)):
- self.config.available_features.add('c++filesystem-disabled')
- self.lit_config.note("the deployment target does not support <filesystem>")
else:
self.cxx.compile_flags += ['-D_LIBCPP_DISABLE_AVAILABILITY']
help="Whether to enable exceptions when compiling the test suite.",
feature=lambda exceptions: None if exceptions else
Feature(name='no-exceptions', compileFlag='-fno-exceptions')),
+
+ # 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.",
+ feature=lambda filesystem: None if filesystem else
+ Feature(name='c++filesystem-disabled')),
]