Skip to content
Browse files

Put both src and obj clang paths on plugin include path

Supports building against Clang where the build dir != src dir.
  • Loading branch information...
1 parent f23c6c0 commit 8239c1422d4b39ca3595bccb47bc3c452a0fe8f4 @martine martine committed Feb 8, 2012
Showing with 5 additions and 3 deletions.
  1. +5 −3 xref-tools/cxx-clang/Makefile
View
8 xref-tools/cxx-clang/Makefile
@@ -1,13 +1,15 @@
LLVM_LIBS := $(shell llvm-config --libdir)
-CXXFLAGS := -Wall -Werror -g -I$(shell llvm-config --includedir) \
- -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -fPIC -fno-exceptions -fno-rtti
+CXXFLAGS := $(shell llvm-config --cflags) -Wall \
+ -fno-exceptions -fno-rtti \
+ -I$(shell llvm-config --src-root)/tools/clang/include \
+ -I$(shell llvm-config --obj-root)/tools/clang/include
LDFLAGS := -fPIC -g -Wl,-R -Wl,'$$ORIGIN' -L$(LLVM_LIBS) -shared
prebuild: libclang-index-plugin.so
can-use:
@if [ -z "$$(which llvm-config)" -o \
- ! -d $$(llvm-config --includedir)/clang ]; then \
+ ! -d $(shell llvm-config --src-root)/tools/clang/include ]; then \
echo "no"; \
else \
echo "yes"; \

0 comments on commit 8239c14

Please sign in to comment.
Something went wrong with that request. Please try again.