[libcxx] Fix exception raised during downstream bare-metal libunwind tests

Fix for the following exception.

AttributeError: 'TestingConfig' object has no attribute 'target_triple'

Related revision: https://reviews.llvm.org/D102012

'TestingConfig' object has no attribute 'target_triple'

Reviewed By: #libunwind, miyuki, danielkiss, mstorsjo

Differential Revision: https://reviews.llvm.org/D103140
This commit is contained in:
Amilendra Kodithuwakku 2021-06-16 13:18:01 +01:00
parent 7fff39d9b0
commit 5636402bc0
1 changed files with 2 additions and 1 deletions

View File

@ -44,7 +44,8 @@ class Configuration(LibcxxConfiguration):
# generated by default on all Targets.
self.cxx.compile_flags += ['-funwind-tables']
# Make symbols available in the tests.
if 'linux' in self.config.target_triple:
triple = self.get_lit_conf('target_triple', None)
if 'linux' in triple:
self.cxx.link_flags += ['-Wl,--export-dynamic']
if not self.get_lit_bool('enable_threads', True):
self.cxx.compile_flags += ['-D_LIBUNWIND_HAS_NO_THREADS']