forked from OSchip/llvm-project
[sanitizer] Fix crypt.cpp test on Darwin
llvm-svn: 374115
This commit is contained in:
parent
4805c817c3
commit
f3ae951c09
|
@ -1,4 +1,4 @@
|
||||||
// RUN: %clangxx -O0 -g %s -o %t -lcrypt && %run %t
|
// RUN: %clangxx -O0 -g %s -o %t && %run %t
|
||||||
|
|
||||||
// crypt is missing from Android.
|
// crypt is missing from Android.
|
||||||
// UNSUPPORTED: android
|
// UNSUPPORTED: android
|
||||||
|
|
|
@ -46,10 +46,13 @@ if default_tool_options_str:
|
||||||
config.environment[tool_options] = default_tool_options_str
|
config.environment[tool_options] = default_tool_options_str
|
||||||
default_tool_options_str += ':'
|
default_tool_options_str += ':'
|
||||||
|
|
||||||
|
extra_link_flags = []
|
||||||
|
|
||||||
if config.host_os in ['Linux']:
|
if config.host_os in ['Linux']:
|
||||||
extra_link_flags = ["-ldl"]
|
extra_link_flags += ["-ldl"]
|
||||||
else:
|
|
||||||
extra_link_flags = []
|
if config.host_os in ['Linux', 'NetBSD', 'FreeBSD']:
|
||||||
|
extra_link_flags += ["-lcrypt"]
|
||||||
|
|
||||||
clang_cflags = config.debug_info_flags + tool_cflags + [config.target_cflags]
|
clang_cflags = config.debug_info_flags + tool_cflags + [config.target_cflags]
|
||||||
clang_cflags += extra_link_flags
|
clang_cflags += extra_link_flags
|
||||||
|
|
Loading…
Reference in New Issue