[libc++abi] Change LIBCXXABI_NO_TIMER to LIBCXXABI_USE_TIMER

Instead of always defining LIBCXXABI_NO_TIMER to run the tests, only
define LIBCXXABI_USE_TIMER when we want to enable the timer. This makes
the libc++abi testing configuration simpler.

As a fly-by fix, remove the unused LIBUNWIND_NO_TIMER macro from libunwind.

Differential Revision: https://reviews.llvm.org/D111667
This commit is contained in:
Louis Dionne 2021-10-12 14:15:33 -04:00
parent a3936a6c19
commit df3de7647e
3 changed files with 4 additions and 6 deletions

View File

@ -44,7 +44,6 @@ class Configuration(LibcxxConfiguration):
def configure_compile_flags(self):
self.cxx.compile_flags += [
'-DLIBCXXABI_NO_TIMER',
'-D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS',
]
if self.get_lit_bool('enable_exceptions', True):

View File

@ -9,8 +9,8 @@
#ifndef TIMER_H
#define TIMER_H
// Define LIBCXXABI_NO_TIMER to disable testing with a timer.
#ifndef LIBCXXABI_NO_TIMER
// Define LIBCXXABI_USE_TIMER to enable testing with a timer.
#if defined(LIBCXXABI_USE_TIMER)
#include <chrono>
#include <cstdio>
@ -38,7 +38,7 @@ private:
TimePoint m_start;
};
#else /* LIBCXXABI_NO_TIMER */
#else /* LIBCXXABI_USE_TIMER */
class timer
{
@ -49,6 +49,6 @@ public:
~timer() {}
};
#endif /* LIBCXXABI_NO_TIMER */
#endif /* LIBCXXABI_USE_TIMER */
#endif /* TIMER_H */

View File

@ -39,7 +39,6 @@ class Configuration(LibcxxConfiguration):
self.config.available_features.add('libunwind-arm-ehabi')
def configure_compile_flags(self):
self.cxx.compile_flags += ['-DLIBUNWIND_NO_TIMER']
# Stack unwinding tests need unwinding tables and these are not
# generated by default on all Targets.
self.cxx.compile_flags += ['-funwind-tables']