build/Make: Add support for INCLUDE_BUILD_DIR make variable, to specify that
component needs to include files from its ObjDir.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143648 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/Makefile.rules b/Makefile.rules
index 54c3780..c0ded8e 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -631,6 +631,10 @@
 	         $(LLVM_OBJ_ROOT) $(LLVM_SRC_ROOT))) \
 	         $(CPP.BaseFlags)
 
+ifeq ($(INCLUDE_BUILD_DIR),1)
+  CPP.Flags   += -I$(ObjDir)
+endif
+
 # SHOW_DIAGNOSTICS support.
 ifeq ($(SHOW_DIAGNOSTICS),1)
   Compile.Wrapper := env CC_LOG_DIAGNOSTICS=1 \