[asan] Add CMake hook to override shadow scale in compiler_rt
authorWalter Lee <waltl@google.com>
Mon, 13 Nov 2017 14:02:27 +0000 (14:02 +0000)
committerWalter Lee <waltl@google.com>
Mon, 13 Nov 2017 14:02:27 +0000 (14:02 +0000)
commit52b2bd7845497c36e45b87a42f737c5cc925b537
tree5ee32686a8e54c0ff16e451afa325b32d046587b
parentd6b0ecb79514e4c188e725e33b4bc92f5213f602
[asan] Add CMake hook to override shadow scale in compiler_rt

Allow user to override shadow scale in compiler_rt by passing
-DCOMPILER_RT_ASAN_SHADOW_SCALE=n to CMake.  Propagate the override
shadow scale value via a compiler define to compiler-rt and asan
tests.  Tests will use the define to partially disable unsupported
tests.  Set "-mllvm -asan-mapping-scale=<n>" for compiler_rt tests.

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

llvm-svn: 318038
compiler-rt/CMakeLists.txt
compiler-rt/lib/asan/CMakeLists.txt
compiler-rt/lib/asan/asan_mapping.h
compiler-rt/lib/asan/tests/CMakeLists.txt
compiler-rt/test/lit.common.cfg
compiler-rt/test/lit.common.configured.in