llvm-project/compiler-rt/lib/scudo
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
..
CMakeLists.txt [CMake] Add compiler-rt header files to the list of sources for targets 2018-07-10 13:00:17 +00:00
scudo_allocator.cpp [scudo] Move noinline functions definitions out of line 2018-06-19 15:36:30 +00:00
scudo_allocator.h [scudo] Add C++17 aligned new/delete operators support 2018-06-12 14:42:40 +00:00
scudo_allocator_combined.h [scudo] Adding an interface function to print allocator stats 2018-04-25 18:52:29 +00:00
scudo_allocator_secondary.h [scudo] Add verbose failures in place of CHECK(0) 2018-06-15 16:45:19 +00:00
scudo_crc32.cpp [scudo] CRC32 optimizations 2017-05-09 15:12:38 +00:00
scudo_crc32.h [sanitizer] Add Scudo to the sanitizer lint checks. 2017-11-08 16:42:29 +00:00
scudo_errors.cpp [scudo] Add verbose failures in place of CHECK(0) 2018-06-15 16:45:19 +00:00
scudo_errors.h [scudo] Add verbose failures in place of CHECK(0) 2018-06-15 16:45:19 +00:00
scudo_flags.cpp [scudo] Allow options to be defined at compile time 2018-02-08 16:29:48 +00:00
scudo_flags.h [scudo] 32-bit and hardware agnostic support 2016-11-30 17:32:20 +00:00
scudo_flags.inc [scudo] Quarantine overhaul 2017-07-24 15:29:38 +00:00
scudo_interface_internal.h [scudo] Adding an interface function to print allocator stats 2018-04-25 18:52:29 +00:00
scudo_malloc.cpp [scudo] Get rid of builtin-declaration-mismatch warnings 2018-07-03 19:03:46 +00:00
scudo_new_delete.cpp [scudo] Add verbose failures in place of CHECK(0) 2018-06-15 16:45:19 +00:00
scudo_platform.h [scudo] Enable Scudo memory hooks for Fuchsia. 2018-07-02 19:48:01 +00:00
scudo_termination.cpp [scudo] Make logging more consistent 2018-03-07 16:22:16 +00:00
scudo_tsd.h [scudo] Improve the scalability of the shared TSD model 2018-06-11 14:50:31 +00:00
scudo_tsd_exclusive.cpp [scudo] Improve the scalability of the shared TSD model 2018-06-11 14:50:31 +00:00
scudo_tsd_exclusive.inc [scudo] Improve the scalability of the shared TSD model 2018-06-11 14:50:31 +00:00
scudo_tsd_shared.cpp [scudo] Improve the scalability of the shared TSD model 2018-06-11 14:50:31 +00:00
scudo_tsd_shared.inc [scudo] Improve the scalability of the shared TSD model 2018-06-11 14:50:31 +00:00
scudo_utils.cpp [scudo] Add some logs for Android 2018-07-06 16:50:12 +00:00
scudo_utils.h [scudo] Minor code generation improvement 2017-12-08 16:36:37 +00:00