[compiler-rt] r374115 - [sanitizer] Fix crypt.cpp test on Darwin
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 8 13:50:46 PDT 2019
Author: vitalybuka
Date: Tue Oct 8 13:50:46 2019
New Revision: 374115
URL: http://llvm.org/viewvc/llvm-project?rev=374115&view=rev
Log:
[sanitizer] Fix crypt.cpp test on Darwin
Modified:
compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/crypt.cpp
compiler-rt/trunk/test/sanitizer_common/lit.common.cfg.py
Modified: compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/crypt.cpp
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/crypt.cpp?rev=374115&r1=374114&r2=374115&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/crypt.cpp (original)
+++ compiler-rt/trunk/test/sanitizer_common/TestCases/Posix/crypt.cpp Tue Oct 8 13:50:46 2019
@@ -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.
// UNSUPPORTED: android
Modified: compiler-rt/trunk/test/sanitizer_common/lit.common.cfg.py
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/sanitizer_common/lit.common.cfg.py?rev=374115&r1=374114&r2=374115&view=diff
==============================================================================
--- compiler-rt/trunk/test/sanitizer_common/lit.common.cfg.py (original)
+++ compiler-rt/trunk/test/sanitizer_common/lit.common.cfg.py Tue Oct 8 13:50:46 2019
@@ -46,10 +46,13 @@ if default_tool_options_str:
config.environment[tool_options] = default_tool_options_str
default_tool_options_str += ':'
+extra_link_flags = []
+
if config.host_os in ['Linux']:
- extra_link_flags = ["-ldl"]
-else:
- extra_link_flags = []
+ extra_link_flags += ["-ldl"]
+
+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 += extra_link_flags
More information about the llvm-commits
mailing list