Skip to content

Commit c1a83c3

Browse files
committed
[libc++] Move the stdlib Lit parameter to the DSL
1 parent 6a8ed4a commit c1a83c3

File tree

2 files changed

+5
-17
lines changed

2 files changed

+5
-17
lines changed

libcxx/utils/libcxx/test/config.py

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ def configure(self):
126126
self.configure_deployment()
127127
self.configure_src_root()
128128
self.configure_obj_root()
129-
self.configure_cxx_stdlib_under_test()
129+
self.cxx_stdlib_under_test = self.get_lit_conf('cxx_stdlib_under_test', 'libc++')
130130
self.cxx_library_root = self.get_lit_conf('cxx_library_root', self.libcxx_obj_root)
131131
self.abi_library_root = self.get_lit_conf('abi_library_path', None)
132132
self.cxx_runtime_root = self.get_lit_conf('cxx_runtime_root', self.cxx_library_root)
@@ -257,22 +257,6 @@ def configure_obj_root(self):
257257
else:
258258
self.libcxx_obj_root = self.project_obj_root
259259

260-
def configure_cxx_stdlib_under_test(self):
261-
self.cxx_stdlib_under_test = self.get_lit_conf(
262-
'cxx_stdlib_under_test', 'libc++')
263-
if self.cxx_stdlib_under_test not in \
264-
['libc++', 'libstdc++', 'msvc', 'cxx_default']:
265-
self.lit_config.fatal(
266-
'unsupported value for "cxx_stdlib_under_test": %s'
267-
% self.cxx_stdlib_under_test)
268-
self.config.available_features.add(self.cxx_stdlib_under_test)
269-
if self.cxx_stdlib_under_test == 'libstdc++':
270-
# Manually enable the experimental and filesystem tests for libstdc++
271-
# if the options aren't present.
272-
# FIXME this is a hack.
273-
if self.get_lit_conf('enable_experimental') is None:
274-
self.config.enable_experimental = 'true'
275-
276260
def configure_features(self):
277261
additional_features = self.get_lit_conf('additional_features')
278262
if additional_features:

libcxx/utils/libcxx/test/params.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@
2424
feature=lambda exceptions: None if exceptions else
2525
Feature(name='no-exceptions', compileFlag='-fno-exceptions')),
2626

27+
Parameter(name='stdlib', choices=['libc++', 'libstdc++', 'msvc'], type=str, default='libc++',
28+
help="The C++ Standard Library implementation being tested.",
29+
feature=lambda stdlib: Feature(name=stdlib)),
30+
2731
# Parameters to enable or disable parts of the test suite
2832
Parameter(name='enable_filesystem', choices=[True, False], type=bool, default=True,
2933
help="Whether to enable tests for the C++ <filesystem> library.",

0 commit comments

Comments
 (0)