tools/llvm: Do not build with symbols
[minix3.git] / sys / external / bsd / compiler_rt / dist / lib / lsan / tests / lsan_testlib.cc
blob363cc14f1941ba53e76b0e2b2f2c32cbb103825e
1 //===-- lsan_testlib.cc ---------------------------------------------------===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file is a part of LeakSanitizer.
11 // Standalone LSan tool as a shared library, to be used with LD_PRELOAD.
13 //===----------------------------------------------------------------------===//
14 /* Usage:
15 clang++ ../sanitizer_common/sanitizer_*.cc ../interception/interception_*.cc \
16 lsan*.cc tests/lsan_testlib.cc -I. -I.. -g -ldl -lpthread -fPIC -shared -O2 \
17 -o lsan.so
18 LD_PRELOAD=./lsan.so /your/app
20 #include "lsan.h"
22 __attribute__((constructor))
23 void constructor() {
24 __lsan::Init();