hanchenye-llvm-project/compiler-rt/lib/lsan
Dan Liew b1f95697c1 [CMake] Add compiler-rt header files to the list of sources for targets
when building with an IDE so that header files show up in the UI.
This massively improves the development workflow in IDEs.

To implement this a new function `compiler_rt_process_sources(...)` has
been added that adds header files to the list of sources when the
generator is an IDE. For non-IDE generators (e.g. Ninja/Makefile) no
changes are made to the list of source files.

The function can be passed a list of headers via the
`ADDITIONAL_HEADERS` argument. For each runtime library a list of
explicit header files has been added and passed via
`ADDITIONAL_HEADERS`. For `tsan` and `sanitizer_common` a list of
headers was already present but it was stale and has been updated
to reflect the current state of the source tree.

The original version of this patch used file globbing (`*.{h,inc,def}`)
to find the headers but the approach was changed due to this being a
CMake anti-pattern (if the list of headers changes CMake won't
automatically re-generate if globbing is used).

The LLVM repo contains a similar function named `llvm_process_sources()`
but we don't use it here for several reasons:

* It depends on the `LLVM_ENABLE_OPTION` cache variable which is
  not set in standalone compiler-rt builds.
* We would have to `include(LLVMProcessSources)` which I'd like to
  avoid because it would include a bunch of stuff we don't need.

Differential Revision: https://reviews.llvm.org/D48422

llvm-svn: 336663
2018-07-10 13:00:17 +00:00
..
.clang-format [sanitizer] Remove unneeded blank lines 2018-05-09 00:44:26 +00:00
CMakeLists.txt [CMake] Add compiler-rt header files to the list of sources for targets 2018-07-10 13:00:17 +00:00
lsan.cc [lsan] Respect log_path option in standalone LSan 2018-01-22 09:30:27 +00:00
lsan.h
lsan_allocator.cc [Sanitizers] Move pvalloc overflow tests to common. 2018-06-11 17:33:53 +00:00
lsan_allocator.h [Sanitizers] Move pvalloc overflow tests to common. 2018-06-11 17:33:53 +00:00
lsan_common.cc [lsan] Do not check for leaks in the forked process 2018-06-05 18:15:57 +00:00
lsan_common.h [lsan] Report unsuspended threads 2018-05-09 23:02:14 +00:00
lsan_common_linux.cc
lsan_common_mac.cc [sanitizer] Remove reserving constructor from InternalMmapVector 2018-05-07 05:56:24 +00:00
lsan_flags.inc
lsan_interceptors.cc [Lsan] intercept thr_exit on FreeBSD 2018-06-20 20:13:25 +00:00
lsan_linux.cc
lsan_mac.cc
lsan_malloc_mac.cc [Sanitizers] Add more standard compliant posix_memalign implementation for LSan. 2018-03-12 21:59:06 +00:00
lsan_preinit.cc
lsan_thread.cc [lsan] Report unsuspended threads 2018-05-09 23:02:14 +00:00
lsan_thread.h
weak_symbols.txt