llvm-project/compiler-rt/lib/lsan
Chris Bieneman 21395f9839 [CMake] Connect Compiler-RT targets to LLVM Runtimes directory
This patch builds on LLVM r279776.

In this patch I've done some cleanup and abstracted three common steps runtime components have in their CMakeLists files, and added a fourth.

The three steps I abstract are:

(1) Add a top-level target (i.e asan, msan, ...)
(2) Set the target properties for sorting files in IDE generators
(3) Make the compiler-rt target depend on the top-level target

The new step is to check if a command named "runtime_register_component" is defined, and to call it with the component name.

The runtime_register_component command is defined in llvm/runtimes/CMakeLists.txt, and presently just adds the component to a list of sub-components, which later gets used to generate target mappings.

With this patch a new workflow for runtimes builds is supported. The new workflow when building runtimes from the LLVM runtimes directory is:

> cmake [...]
> ninja runtimes-configure
> ninja asan

The "runtimes-configure" target builds all the dependencies for configuring the runtimes projects, and runs CMake on the runtimes projects. Running the runtimes CMake generates a list of targets to bind into the top-level CMake so subsequent build invocations will have access to some of Compiler-RT's targets through the top-level build.

Note: This patch does exclude some top-level targets from compiler-rt libraries because they either don't install files (sanitizer_common), or don't have a cooresponding `check` target (stats).
llvm-svn: 279863
2016-08-26 20:52:22 +00:00
..
.clang-format Tell clang-format that (most) sanitizers are written using Google style guide. 2015-11-19 22:11:10 +00:00
CMakeLists.txt [CMake] Connect Compiler-RT targets to LLVM Runtimes directory 2016-08-26 20:52:22 +00:00
lsan.cc [sanitizer] [SystemZ] Abort if the kernel might be vulnerable to CVE-2016-2143. 2016-04-27 17:42:00 +00:00
lsan.h [LSAN] Fix test swapcontext.cc on MIPS 2016-05-18 06:09:26 +00:00
lsan_allocator.cc [sanitizer] enable random shuffling the memory chunks inside the allocator, under a flag. Set this flag for the scudo allocator, add a test. 2016-08-26 00:06:03 +00:00
lsan_allocator.h [lsan] Implement the public allocator interface in standalone LSan. 2014-08-26 14:28:28 +00:00
lsan_common.cc [asan] Turn LSan-related #if’s into regular if’s in ASan initializer 2016-06-07 19:13:38 +00:00
lsan_common.h [LSan] Ignore all allocations made inside pthread_create. 2016-01-16 00:57:25 +00:00
lsan_common_linux.cc [Sanitizer] Introduce ListOfModules object and use it to replace GetListOfModules(). 2016-02-22 18:52:51 +00:00
lsan_flags.inc [LSan] Add "use_ld_allocations" flag to disable old way of DTLS handling. 2016-01-14 19:16:05 +00:00
lsan_interceptors.cc [LSan] Ignore all allocations made inside pthread_create. 2016-01-16 00:57:25 +00:00
lsan_preinit.cc [Sanitizer] Introduce SANITIZER_CAN_USE_PREINIT_ARRAY definition and use it across sanitizers. 2014-07-25 22:05:02 +00:00
lsan_thread.cc [LSan] Use __tls_get_addr interceptor to keep track of dynamic TLS. 2016-01-14 18:50:09 +00:00
lsan_thread.h [LSan] Use __tls_get_addr interceptor to keep track of dynamic TLS. 2016-01-14 18:50:09 +00:00