[libcxx-commits] [libcxxabi] ff0d436 - [runtimes] Move the enable_rtti Lit parameter to the DSL
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jul 16 09:56:31 PDT 2020
Author: Louis Dionne
Date: 2020-07-16T12:56:00-04:00
New Revision: ff0d4367bf0b219fb69612f856892701eb2b1a8c
URL: https://github.com/llvm/llvm-project/commit/ff0d4367bf0b219fb69612f856892701eb2b1a8c
DIFF: https://github.com/llvm/llvm-project/commit/ff0d4367bf0b219fb69612f856892701eb2b1a8c.diff
LOG: [runtimes] Move the enable_rtti Lit parameter to the DSL
Added:
Modified:
libcxx/utils/libcxx/test/config.py
libcxx/utils/libcxx/test/params.py
libcxxabi/test/libcxxabi/test/config.py
libunwind/test/libunwind/test/config.py
Removed:
################################################################################
diff --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py
index b88b085d408f..50973e3fe47a 100644
--- a/libcxx/utils/libcxx/test/config.py
+++ b/libcxx/utils/libcxx/test/config.py
@@ -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']
@@ -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()
diff --git a/libcxx/utils/libcxx/test/params.py b/libcxx/utils/libcxx/test/params.py
index 864a5108fc09..f541ed6bf3cf 100644
--- a/libcxx/utils/libcxx/test/params.py
+++ b/libcxx/utils/libcxx/test/params.py
@@ -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)),
diff --git a/libcxxabi/test/libcxxabi/test/config.py b/libcxxabi/test/libcxxabi/test/config.py
index b9b2b6e90c6a..45fb0f5d7afc 100644
--- a/libcxxabi/test/libcxxabi/test/config.py
+++ b/libcxxabi/test/libcxxabi/test/config.py
@@ -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
diff --git a/libunwind/test/libunwind/test/config.py b/libunwind/test/libunwind/test/config.py
index 31f6148879c5..977f9a0fb3f9 100644
--- a/libunwind/test/libunwind/test/config.py
+++ b/libunwind/test/libunwind/test/config.py
@@ -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
More information about the libcxx-commits
mailing list