Skip to content

Commit

Permalink
[runtimes] Move the enable_rtti Lit parameter to the DSL
Browse files Browse the repository at this point in the history
  • Loading branch information
ldionne committed Jul 16, 2020
1 parent 79de8f8 commit ff0d436
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 13 deletions.
7 changes: 0 additions & 7 deletions libcxx/utils/libcxx/test/config.py
Expand Up @@ -319,7 +319,6 @@ def configure_default_compile_flags(self):
self.configure_compile_flags_header_includes()
self.target_info.add_cxx_compile_flags(self.cxx.compile_flags)
# Configure feature flags.
self.configure_compile_flags_rtti()
enable_32bit = self.get_lit_bool('enable_32bit', False)
if enable_32bit:
self.cxx.flags += ['-m32']
Expand Down Expand Up @@ -406,12 +405,6 @@ def configure_config_site_header(self):
return
self.cxx.compile_flags += ['-include', config_site_header]

def configure_compile_flags_rtti(self):
enable_rtti = self.get_lit_bool('enable_rtti', True)
if not enable_rtti:
self.config.available_features.add('-fno-rtti')
self.cxx.compile_flags += ['-fno-rtti']

def configure_link_flags(self):
# Configure library path
self.configure_link_flags_cxx_library_path()
Expand Down
5 changes: 5 additions & 0 deletions libcxx/utils/libcxx/test/params.py
Expand Up @@ -24,6 +24,11 @@
feature=lambda exceptions: None if exceptions else
Feature(name='no-exceptions', compileFlag='-fno-exceptions')),

Parameter(name='enable_rtti', choices=[True, False], type=bool, default=True,
help="Whether to enable RTTI when compiling the test suite.",
feature=lambda rtti: None if rtti else
Feature(name='-fno-rtti', compileFlag='-fno-rtti')),

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)),
Expand Down
3 changes: 0 additions & 3 deletions libcxxabi/test/libcxxabi/test/config.py
Expand Up @@ -83,6 +83,3 @@ def configure_compile_flags_header_includes(self):
self.lit_config.fatal("libunwind_headers='%s' is not a directory."
% libunwind_headers)
self.cxx.compile_flags += ['-I' + libunwind_headers]

def configure_compile_flags_rtti(self):
pass
3 changes: 0 additions & 3 deletions libunwind/test/libunwind/test/config.py
Expand Up @@ -59,9 +59,6 @@ def configure_compile_flags_header_includes(self):
% libunwind_headers)
self.cxx.compile_flags += ['-I' + libunwind_headers]

def configure_compile_flags_rtti(self):
pass

def configure_link_flags_cxx_library(self):
# libunwind tests should not link with libc++
pass
Expand Down

0 comments on commit ff0d436

Please sign in to comment.