forked from OSchip/llvm-project
[libc++] Translate the enable_filesystem parameter to the DSL
This commit is contained in:
parent
539b47c9d1
commit
a2439bebe1
|
@ -119,10 +119,16 @@ 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"
|
||||
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}" \
|
||||
|
|
|
@ -328,9 +328,6 @@ class Configuration(object):
|
|||
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++':
|
||||
|
@ -868,10 +865,6 @@ class Configuration(object):
|
|||
|
||||
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']
|
||||
|
||||
|
|
|
@ -13,4 +13,10 @@ parameters = [
|
|||
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')),
|
||||
]
|
||||
|
|
Loading…
Reference in New Issue