[ASan] Fix init-order-dlopen.cc to pass under Mac OS.

llvm-svn: 182010
This commit is contained in:
Alexander Potapenko 2013-05-16 14:51:01 +00:00
parent c533b559d0
commit 12d09f3a3d
1 changed files with 5 additions and 1 deletions

View File

@ -3,7 +3,11 @@
// RUN: %clangxx_asan -m64 -O0 %p/SharedLibs/init-order-dlopen-so.cc \
// RUN: -fPIC -shared -o %t-so.so
// RUN: %clangxx_asan -m64 -O0 %s -o %t -Wl,--export-dynamic
// If the linker doesn't support --export-dynamic (which is ELF-specific),
// try to link without that option.
// FIXME: find a better solution.
// RUN: %clangxx_asan -m64 -O0 %s -o %t -Wl,--export-dynamic || \
// RUN: %clangxx_asan -m64 -O0 %s -o %t
// RUN: ASAN_OPTIONS=check_initialization_order=true:strict_init_order=true %t 2>&1 | FileCheck %s
#include <dlfcn.h>
#include <pthread.h>