[libcxx-commits] [libcxx] a2439be - [libc++] Translate the enable_filesystem parameter to the DSL
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Wed Jun 10 05:54:53 PDT 2020
Author: Louis Dionne
Date: 2020-06-10T08:54:42-04:00
New Revision: a2439bebe1c21d23a1b7c43f4bd16865e2664b87
URL: https://github.com/llvm/llvm-project/commit/a2439bebe1c21d23a1b7c43f4bd16865e2664b87
DIFF: https://github.com/llvm/llvm-project/commit/a2439bebe1c21d23a1b7c43f4bd16865e2664b87.diff
LOG: [libc++] Translate the enable_filesystem parameter to the DSL
Added:
Modified:
libcxx/utils/ci/macos-backdeployment.sh
libcxx/utils/libcxx/test/config.py
libcxx/utils/libcxx/test/params.py
Removed:
################################################################################
diff --git a/libcxx/utils/ci/macos-backdeployment.sh b/libcxx/utils/ci/macos-backdeployment.sh
index 4ed3bda2e3af..839c61386824 100755
--- a/libcxx/utils/ci/macos-backdeployment.sh
+++ b/libcxx/utils/ci/macos-backdeployment.sh
@@ -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}" \
diff --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py
index ec673da4a6b3..118cb896e9c2 100644
--- a/libcxx/utils/libcxx/test/config.py
+++ b/libcxx/utils/libcxx/test/config.py
@@ -328,9 +328,6 @@ def configure_features(self):
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 @@ def configure_deployment(self):
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']
diff --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py
index 9a42d74bdb03..43674de2c213 100644
--- a/libcxx/utils/libcxx/test/params.py
+++ b/libcxx/utils/libcxx/test/params.py
@@ -13,4 +13,10 @@
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')),
]
More information about the libcxx-commits
mailing list