diff options
Diffstat (limited to 'test/asan/lit.cfg')
-rw-r--r-- | test/asan/lit.cfg | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/test/asan/lit.cfg b/test/asan/lit.cfg index c4da7152d..6bcbfdae4 100644 --- a/test/asan/lit.cfg +++ b/test/asan/lit.cfg @@ -26,9 +26,14 @@ config.test_source_root = os.path.dirname(__file__) # GCC-ASan doesn't link in all the necessary libraries automatically, so # we have to do it ourselves. if config.compiler_id == 'GNU': - extra_linkflags = ["-pthread", "-lstdc++", "-ldl"] + extra_linkflags = ["-pthread", "-lstdc++"] else: extra_linkflags = [] + +# There is no libdl on FreeBSD. +if config.compiler_id == 'GNU' and config.host_os != 'FreeBSD': + extra_linkflags += ["-ldl"] + # Setup default compiler flags used with -fsanitize=address option. # FIXME: Review the set of required flags and check if it can be reduced. target_cflags = [get_required_attr(config, "target_cflags")] + extra_linkflags |