When building clang, we pass in CPPFLAGS via the command line, which (I believe) makes this not work. CPP.Flags works nicely to get around this.
http://reviews.llvm.org/D4891 Files: tools/c-index-test/Makefile Index: tools/c-index-test/Makefile =================================================================== --- tools/c-index-test/Makefile +++ tools/c-index-test/Makefile @@ -34,15 +34,16 @@ clangAnalysis.a clangEdit.a clangAST.a clangLex.a \ clangBasic.a -include $(CLANG_LEVEL)/Makefile - -LIBS += $(LIBXML2_LIBS) - # Headers in $(LIBXML2_INC) should not be checked with clang's -Wdocumentation. # Use -isystem instead of -I then. # FIXME: Could autoconf detect clang or availability of -isystem? ifneq ($(findstring -Wdocumentation,$(OPTIMIZE_OPTION)),) -CPPFLAGS += $(subst -I,-isystem ,$(LIBXML2_INC)) +CPP.Flags += $(subst -I,-isystem ,$(LIBXML2_INC)) else -CPPFLAGS += $(LIBXML2_INC) +CPP.Flags += $(LIBXML2_INC) endif + +include $(CLANG_LEVEL)/Makefile + +LIBS = $(LIBXML2_LIBS) +
Index: tools/c-index-test/Makefile =================================================================== --- tools/c-index-test/Makefile +++ tools/c-index-test/Makefile @@ -34,15 +34,16 @@ clangAnalysis.a clangEdit.a clangAST.a clangLex.a \ clangBasic.a -include $(CLANG_LEVEL)/Makefile - -LIBS += $(LIBXML2_LIBS) - # Headers in $(LIBXML2_INC) should not be checked with clang's -Wdocumentation. # Use -isystem instead of -I then. # FIXME: Could autoconf detect clang or availability of -isystem? ifneq ($(findstring -Wdocumentation,$(OPTIMIZE_OPTION)),) -CPPFLAGS += $(subst -I,-isystem ,$(LIBXML2_INC)) +CPP.Flags += $(subst -I,-isystem ,$(LIBXML2_INC)) else -CPPFLAGS += $(LIBXML2_INC) +CPP.Flags += $(LIBXML2_INC) endif + +include $(CLANG_LEVEL)/Makefile + +LIBS = $(LIBXML2_LIBS) +
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
