[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

GitOrigin-RevId: 5636402bc0c92eec2faf46edb0fb733d78fa259e
diff --git a/test/libunwind/test/config.py b/test/libunwind/test/config.py
index e3e1dfc..b3f12bf 100644
--- a/test/libunwind/test/config.py
+++ b/test/libunwind/test/config.py
@@ -44,7 +44,8 @@
         # 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']