summaryrefslogtreecommitdiff
path: root/test/asan/TestCases/Darwin/reexec-insert-libraries-env.cc
diff options
context:
space:
mode:
authorTimur Iskhodzhanov <timurrrr@google.com>2014-05-14 14:41:38 +0000
committerTimur Iskhodzhanov <timurrrr@google.com>2014-05-14 14:41:38 +0000
commit95b74edef69316968ec58ccba6b76a5c7a6795fc (patch)
tree6b3bb106c88a0fe26ed9eeb2e6da6ba922056309 /test/asan/TestCases/Darwin/reexec-insert-libraries-env.cc
parent56812ee8727bd45f1995a44a4cabd802c0a18159 (diff)
downloadcompiler-rt-95b74edef69316968ec58ccba6b76a5c7a6795fc.tar.gz
[ASan tests] Get rid of SharedLibs/
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@208780 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/asan/TestCases/Darwin/reexec-insert-libraries-env.cc')
-rw-r--r--test/asan/TestCases/Darwin/reexec-insert-libraries-env.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/asan/TestCases/Darwin/reexec-insert-libraries-env.cc b/test/asan/TestCases/Darwin/reexec-insert-libraries-env.cc
index db6005cba..59ddd634b 100644
--- a/test/asan/TestCases/Darwin/reexec-insert-libraries-env.cc
+++ b/test/asan/TestCases/Darwin/reexec-insert-libraries-env.cc
@@ -3,12 +3,14 @@
// https://code.google.com/p/address-sanitizer/issues/detail?id=159
// RUN: %clangxx_asan %s -o %t
-// RUN: %clangxx %p/../SharedLibs/darwin-dummy-shared-lib-so.cc \
+// RUN: %clangxx -DSHARED_LIB %s \
// RUN: -dynamiclib -o darwin-dummy-shared-lib-so.dylib
// FIXME: the following command line may hang in the case of a regression.
// RUN: DYLD_INSERT_LIBRARIES=darwin-dummy-shared-lib-so.dylib \
// RUN: %run %t 2>&1 | FileCheck %s || exit 1
+
+#if !defined(SHARED_LIB)
#include <stdio.h>
#include <stdlib.h>
@@ -18,3 +20,6 @@ int main() {
// CHECK: {{DYLD_INSERT_LIBRARIES=.*darwin-dummy-shared-lib-so.dylib.*}}
return 0;
}
+#else // SHARED_LIB
+void foo() {}
+#endif // SHARED_LIB