From 4664916017ef0619f32371dd7ad225ca0f648d62 Mon Sep 17 00:00:00 2001 From: Louis Dionne Date: Thu, 18 Apr 2019 20:59:49 +0000 Subject: [PATCH] [libc++] Link against libc++abi in the libc++abi tests PR27405 llvm-svn: 358712 --- libcxx/utils/libcxx/test/config.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libcxx/utils/libcxx/test/config.py b/libcxx/utils/libcxx/test/config.py index 53f2507..c618c29 100644 --- a/libcxx/utils/libcxx/test/config.py +++ b/libcxx/utils/libcxx/test/config.py @@ -818,7 +818,11 @@ class Configuration(object): elif cxx_abi == 'libsupc++': self.cxx.link_flags += ['-lsupc++'] elif cxx_abi == 'libcxxabi': - if self.target_info.allow_cxxabi_link(): + # If the C++ library requires explicitly linking to libc++abi, or + # if we're testing libc++abi itself (the test configs are shared), + # then link it. + testing_libcxxabi = self.get_lit_conf('name', '') == 'libc++abi' + if self.target_info.allow_cxxabi_link() or testing_libcxxabi: libcxxabi_shared = self.get_lit_bool('libcxxabi_shared', default=True) if libcxxabi_shared: self.cxx.link_flags += ['-lc++abi'] -- 2.7.4