mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-26 05:18:46 +00:00
[runtimes] Move the enable_rtti Lit parameter to the DSL
This commit is contained in:
parent
79de8f8441
commit
ff0d4367bf
@ -319,7 +319,6 @@ class Configuration(object):
|
||||
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']
|
||||
@ -406,12 +405,6 @@ class Configuration(object):
|
||||
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()
|
||||
|
@ -24,6 +24,11 @@ parameters = [
|
||||
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)),
|
||||
|
@ -83,6 +83,3 @@ class Configuration(LibcxxConfiguration):
|
||||
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
|
||||
|
@ -59,9 +59,6 @@ class Configuration(LibcxxConfiguration):
|
||||
% 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
|
||||
|
Loading…
x
Reference in New Issue
Block a user