fix build when sanitizers are enabled and jemalloc is disabled
authorIgor Sugak <sugak@fb.com>
Thu, 30 Nov 2017 22:48:24 +0000 (14:48 -0800)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Thu, 30 Nov 2017 22:51:07 +0000 (14:51 -0800)
Summary: Add preprocessor checks to guard jemalloc headers if any sanitizer is enabled.

Reviewed By: yfeldblum

Differential Revision: D6441578

fbshipit-source-id: 85364fca5af33c95cd05f232d1e3f9cbac9a4120

folly/experimental/JemallocNodumpAllocator.h
folly/memory/test/MallctlHelperTest.cpp

index 93b14f7..16d6aec 100644 (file)
 
 #pragma once
 
 
 #pragma once
 
+#include <folly/CPortability.h>
 #include <folly/portability/Config.h>
 
 #include <folly/portability/Config.h>
 
-#ifdef FOLLY_HAVE_LIBJEMALLOC
+#if defined(FOLLY_HAVE_LIBJEMALLOC) && !defined(FOLLY_SANITIZE)
 
 #include <folly/portability/SysMman.h>
 #include <jemalloc/jemalloc.h>
 
 #include <folly/portability/SysMman.h>
 #include <jemalloc/jemalloc.h>
index dc447a7..0b5444c 100644 (file)
  */
 
 #include <folly/memory/MallctlHelper.h>
  */
 
 #include <folly/memory/MallctlHelper.h>
+#include <folly/CPortability.h>
 #include <folly/init/Init.h>
 #include <folly/memory/Malloc.h>
 #include <folly/portability/GTest.h>
 
 #include <folly/init/Init.h>
 #include <folly/memory/Malloc.h>
 #include <folly/portability/GTest.h>
 
-#ifdef FOLLY_HAVE_LIBJEMALLOC
+#if defined(FOLLY_HAVE_LIBJEMALLOC) && !defined(FOLLY_SANITIZE)
 #include <jemalloc/jemalloc.h>
 #endif
 
 #include <jemalloc/jemalloc.h>
 #endif