From 062e6ee121519e4970b441829755eca95cc5e991 Mon Sep 17 00:00:00 2001 From: Eric Fiselier Date: Thu, 23 Oct 2014 02:54:15 +0000 Subject: [PATCH] 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. llvm-svn: 220463 --- libcxx/test/lit.cfg | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libcxx/test/lit.cfg b/libcxx/test/lit.cfg index d60c96939198..ff308b6ea7d5 100644 --- a/libcxx/test/lit.cfg +++ b/libcxx/test/lit.cfg @@ -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')