diff options
author | Asiri Rathnayake <asiri.rathnayake@arm.com> | 2016-05-31 12:01:32 +0000 |
---|---|---|
committer | Asiri Rathnayake <asiri.rathnayake@arm.com> | 2016-05-31 12:01:32 +0000 |
commit | 4174e8b402ba05e3b3e003b1066f1eae6fbeb24b (patch) | |
tree | 00a63addfb8fc122d9d3f275d22d2541ea4a63e2 /test/libcxxabi | |
parent | 436072f52ff05d69f626a9c7a309a1464758f129 (diff) |
[libcxxabi] Introduce a -fno-exceptions libc++abi libary variant
Currently there is only support for a -fno-exceptions libc++ build. This is
problematic for functions such as std::terminate() which are defined in
libc++abi and using any of those functions throws away most of the benefits
of using -fno-exceptions (code-size). This patch introduces a -fno-exceptions
libc++abi build to address this issue.
This new variant of libc++abi cannot be linked against any with-exceptions
code as some symbols necessary for handling exceptions are missing in this
library.
Differential revision: http://reviews.llvm.org/D20677
Reviewers: EricWF, mclow.lists, bcraig
git-svn-id: https://llvm.org/svn/llvm-project/libcxxabi/trunk@271267 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/libcxxabi')
-rw-r--r-- | test/libcxxabi/test/config.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/libcxxabi/test/config.py b/test/libcxxabi/test/config.py index 766cdfa..c8a6af0 100644 --- a/test/libcxxabi/test/config.py +++ b/test/libcxxabi/test/config.py @@ -35,12 +35,17 @@ class Configuration(LibcxxConfiguration): def configure_features(self): super(Configuration, self).configure_features() + if not self.get_lit_bool('enable_exceptions', True): + self.config.available_features.add('libcxxabi-no-exceptions') if self.get_lit_bool('thread_atexit', True): self.config.available_features.add('thread_atexit') def configure_compile_flags(self): self.cxx.compile_flags += ['-DLIBCXXABI_NO_TIMER'] - self.cxx.compile_flags += ['-funwind-tables'] + if self.get_lit_bool('enable_exceptions', True): + self.cxx.compile_flags += ['-funwind-tables'] + else: + self.cxx.compile_flags += ['-fno-exceptions', '-DLIBCXXABI_HAS_NO_EXCEPTIONS'] if not self.get_lit_bool('enable_threads', True): self.cxx.compile_flags += ['-DLIBCXXABI_HAS_NO_THREADS=1'] super(Configuration, self).configure_compile_flags() |