[Sanitizer] include sanitizer_common headers when building interception library
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@173930 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/interception/CMakeLists.txt b/lib/interception/CMakeLists.txt
index f456a25..d516e60 100644
--- a/lib/interception/CMakeLists.txt
+++ b/lib/interception/CMakeLists.txt
@@ -10,6 +10,8 @@
mach_override/mach_override.c
)
+include_directories(..)
+
# Only add this C file if we're building on a Mac. Other source files can be
# harmlessly compiled on any platform, but the C file is complained about due
# to pedantic rules about empty translation units.
diff --git a/lib/interception/Makefile.mk b/lib/interception/Makefile.mk
index 1412a01..19d289f 100644
--- a/lib/interception/Makefile.mk
+++ b/lib/interception/Makefile.mk
@@ -18,6 +18,7 @@
# FIXME: use automatic dependencies?
Dependencies := $(wildcard $(Dir)/*.h)
Dependencies += $(wildcard $(Dir)/mach_override/*.h)
+Dependencies += $(wildcard $(Dir)/../sanitizer_common/*.h)
# Define a convenience variable for all the interception functions.
InterceptionFunctions := $(Sources:%.cc=%)
diff --git a/lib/interception/interception.h b/lib/interception/interception.h
index 63c5a00..bff8104 100644
--- a/lib/interception/interception.h
+++ b/lib/interception/interception.h
@@ -19,7 +19,7 @@
# error "Interception doesn't work on this operating system."
#endif
-#include "../sanitizer_common/sanitizer_internal_defs.h"
+#include "sanitizer_common/sanitizer_internal_defs.h"
// These typedefs should be used only in the interceptor definitions to replace
// the standard system types (e.g. SSIZE_T instead of ssize_t)
diff --git a/lib/tsan/rtl/Makefile.mk b/lib/tsan/rtl/Makefile.mk
index a6a7fc8..f32b39b 100644
--- a/lib/tsan/rtl/Makefile.mk
+++ b/lib/tsan/rtl/Makefile.mk
@@ -20,6 +20,7 @@
Dependencies := $(wildcard $(Dir)/*.h)
Dependencies += $(wildcard $(Dir)/../../interception/*.h)
Dependencies += $(wildcard $(Dir)/../../interception/mach_override/*.h)
+Dependencies += $(wildcard $(Dir)/../../sanitizer_common/*.h)
# Define a convenience variable for all the tsan functions.
TsanFunctions += $(Sources:%.cc=%) $(AsmSources:%.S=%)