[PATCH] D23796: [libcxx] Make it possible to test static builds of libc++ on OSX

Asiri Rathnayake via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 23 05:20:40 PDT 2016


rmaprath created this revision.
rmaprath added reviewers: EricWF, mclow.lists.
rmaprath added a subscriber: cfe-commits.

Being used to doing static builds and being a complete noob to OSX, this really confused me.

Currently if you build `libc++` (in-tree) like so:
```
-DLIBCXX_ENABLE_SHARED=OFF -DLIBCXXABI_ENABLE_SHARED=OFF -DLIBUNWIND_ENABLE_SHARED=OFF
```
The `libc++` test runs will fail due to missing symbols corresponding to `libc++abi`. This patch should fix it.

https://reviews.llvm.org/D23796

Files:
  test/libcxx/test/target_info.py

Index: test/libcxx/test/target_info.py
===================================================================
--- test/libcxx/test/target_info.py
+++ test/libcxx/test/target_info.py
@@ -108,7 +108,12 @@
         # libc++ yet so we still need to explicitly link libc++abi when testing
         # libc++abi
         # See PR22654.
-        if(self.full_config.get_lit_conf('name', '') == 'libc++abi'):
+        lit_conf_name = self.full_config.get_lit_conf('name', '')
+        if(lit_conf_name == 'libc++abi'):
+            return True
+        # Needs explicit linking of libc++abi for static libc++ builds
+        if(lit_conf_name == 'libc++' and
+           not self.full_config.get_lit_bool('enable_shared', True)):
             return True
         # Don't link libc++abi explicitly on OS X because the symbols
         # should be available in libc++ directly.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D23796.68971.patch
Type: text/x-patch
Size: 864 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160823/eec13f53/attachment.bin>


More information about the cfe-commits mailing list