summaryrefslogtreecommitdiff
path: root/lib/asan/CMakeLists.txt
diff options
context:
space:
mode:
authorWalter Lee <waltl@google.com>2017-11-13 14:02:27 +0000
committerWalter Lee <waltl@google.com>2017-11-13 14:02:27 +0000
commitf8005d62ca3331389e2bb9489710e177ba94da74 (patch)
tree4b23b3724779ccbb9a6618bf2c6119d308215a84 /lib/asan/CMakeLists.txt
parent1ad28c758255a9594220c5210bbc6fed26e6da07 (diff)
[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 git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@318038 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/asan/CMakeLists.txt')
-rw-r--r--lib/asan/CMakeLists.txt1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/asan/CMakeLists.txt b/lib/asan/CMakeLists.txt
index 9291e7109..da82e485b 100644
--- a/lib/asan/CMakeLists.txt
+++ b/lib/asan/CMakeLists.txt
@@ -40,6 +40,7 @@ set(ASAN_PREINIT_SOURCES
include_directories(..)
set(ASAN_CFLAGS ${SANITIZER_COMMON_CFLAGS})
+set(ASAN_COMMON_DEFINITIONS ${COMPILER_RT_ASAN_SHADOW_SCALE_DEFINITION})
append_rtti_flag(OFF ASAN_CFLAGS)