[libcxx-commits] [libcxx] f5f58f1 - [libc++] Move the enable_experimental Lit param to the DSL

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jul 9 11:00:12 PDT 2020


Author: Louis Dionne
Date: 2020-07-09T14:00:05-04:00
New Revision: f5f58f1f733b880decfb8f12ebba6126da818496

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

LOG: [libc++] Move the enable_experimental Lit param 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 5495aba72a26..6015a00acb0d 100644
--- a/libcxx/utils/libcxx/test/config.py
+++ b/libcxx/utils/libcxx/test/config.py
@@ -427,7 +427,6 @@ def configure_link_flags(self):
             self.configure_link_flags_abi_library()
             self.configure_extra_library_flags()
         elif self.cxx_stdlib_under_test == 'libstdc++':
-            self.config.available_features.add('c++experimental')
             self.cxx.link_flags += ['-lstdc++fs', '-lm', '-pthread']
         elif self.cxx_stdlib_under_test == 'msvc':
             # FIXME: Correctly setup debug/release flags here.
@@ -465,10 +464,6 @@ def configure_link_flags_abi_library_path(self):
                 self.add_path(self.exec_env, self.abi_library_root)
 
     def configure_link_flags_cxx_library(self):
-        libcxx_experimental = self.get_lit_bool('enable_experimental', default=False)
-        if libcxx_experimental:
-            self.config.available_features.add('c++experimental')
-            self.cxx.link_flags += ['-lc++experimental']
         if self.link_shared:
             self.cxx.link_flags += ['-lc++']
         else:

diff  --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py
index 2a83c4a5e39c..01d412bf3f11 100644
--- a/libcxx/utils/libcxx/test/params.py
+++ b/libcxx/utils/libcxx/test/params.py
@@ -34,6 +34,11 @@
             feature=lambda filesystem: None if filesystem else
               Feature(name='c++filesystem-disabled')),
 
+  Parameter(name='enable_experimental', choices=[True, False], type=bool, default=True,
+          help="Whether to enable tests for experimental C++ libraries (typically Library Fundamentals TSes).",
+          feature=lambda experimental: None if not experimental else
+            Feature(name='c++experimental', linkFlag='-lc++experimental')),
+
   Parameter(name='long_tests', choices=[True, False], type=bool, default=True,
             help="Whether to tests that take longer to run. This can be useful when running on a very slow device.",
             feature=lambda enabled: Feature(name='long_tests') if enabled else None),


        


More information about the libcxx-commits mailing list