[libcxx-commits] [libcxx] c1a83c3 - [libc++] Move the stdlib Lit parameter to the DSL

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jul 9 10:24:45 PDT 2020


Author: Louis Dionne
Date: 2020-07-09T13:23:11-04:00
New Revision: c1a83c30e10c19cdd83277bf2e5ceca7ce6471c8

URL: https://github.com/llvm/llvm-project/commit/c1a83c30e10c19cdd83277bf2e5ceca7ce6471c8
DIFF: https://github.com/llvm/llvm-project/commit/c1a83c30e10c19cdd83277bf2e5ceca7ce6471c8.diff

LOG: [libc++] Move the stdlib Lit parameter to the DSL

Added: 
    

Modified: 
    libcxx/utils/libcxx/test/config.py
    libcxx/utils/libcxx/test/params.py

Removed: 
    


################################################################################
diff  --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py
index 30a59a068a7a..909708b6a74a 100644
--- a/libcxx/utils/libcxx/test/config.py
+++ b/libcxx/utils/libcxx/test/config.py
@@ -126,7 +126,7 @@ def configure(self):
         self.configure_deployment()
         self.configure_src_root()
         self.configure_obj_root()
-        self.configure_cxx_stdlib_under_test()
+        self.cxx_stdlib_under_test = self.get_lit_conf('cxx_stdlib_under_test', 'libc++')
         self.cxx_library_root = self.get_lit_conf('cxx_library_root', self.libcxx_obj_root)
         self.abi_library_root = self.get_lit_conf('abi_library_path', None)
         self.cxx_runtime_root = self.get_lit_conf('cxx_runtime_root', self.cxx_library_root)
@@ -257,22 +257,6 @@ def configure_obj_root(self):
             else:
                 self.libcxx_obj_root = self.project_obj_root
 
-    def configure_cxx_stdlib_under_test(self):
-        self.cxx_stdlib_under_test = self.get_lit_conf(
-            'cxx_stdlib_under_test', 'libc++')
-        if self.cxx_stdlib_under_test not in \
-                ['libc++', 'libstdc++', 'msvc', 'cxx_default']:
-            self.lit_config.fatal(
-                'unsupported value for "cxx_stdlib_under_test": %s'
-                % self.cxx_stdlib_under_test)
-        self.config.available_features.add(self.cxx_stdlib_under_test)
-        if self.cxx_stdlib_under_test == 'libstdc++':
-            # Manually enable the experimental and filesystem tests for libstdc++
-            # if the options aren't present.
-            # FIXME this is a hack.
-            if self.get_lit_conf('enable_experimental') is None:
-                self.config.enable_experimental = 'true'
-
     def configure_features(self):
         additional_features = self.get_lit_conf('additional_features')
         if additional_features:

diff  --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py
index 8509624071c4..bcc325dee3ed 100644
--- a/libcxx/utils/libcxx/test/params.py
+++ b/libcxx/utils/libcxx/test/params.py
@@ -24,6 +24,10 @@
             feature=lambda exceptions: None if exceptions else
               Feature(name='no-exceptions', compileFlag='-fno-exceptions')),
 
+  Parameter(name='stdlib', choices=['libc++', 'libstdc++', 'msvc'], type=str, default='libc++',
+            help="The C++ Standard Library implementation being tested.",
+            feature=lambda stdlib: Feature(name=stdlib)),
+
   # 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.",


        


More information about the libcxx-commits mailing list