[libcxx] r220463 - Add -ldl to libc++ tests when sanitizers are used.

Eric Fiselier eric at efcs.ca
Wed Oct 22 19:54:15 PDT 2014


Author: ericwf
Date: Wed Oct 22 21:54:15 2014
New Revision: 220463

URL: http://llvm.org/viewvc/llvm-project?rev=220463&view=rev
Log:
Add -ldl to libc++ tests when sanitizers are used.

Clang 3.6 no longer links the sanitizer runtime library dependancies when
-nodefaultlibs is used. This patch manually links in a missing dependancy.

Modified:
    libcxx/trunk/test/lit.cfg

Modified: libcxx/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/test/lit.cfg?rev=220463&r1=220462&r2=220463&view=diff
==============================================================================
--- libcxx/trunk/test/lit.cfg (original)
+++ libcxx/trunk/test/lit.cfg Wed Oct 22 21:54:15 2014
@@ -431,6 +431,8 @@ class Configuration(object):
         san = self.get_lit_conf('llvm_use_sanitizer', '').strip()
         if san:
             self.compile_flags += ['-fno-omit-frame-pointer']
+            if not sys.platform.startswith('freebsd'):
+                self.link_flags += ['-ldl']
             if san == 'Address':
                 self.compile_flags += ['-fsanitize=address']
                 self.config.available_features.add('asan')





More information about the cfe-commits mailing list