summaryrefslogtreecommitdiff
path: root/compilerplugins/Makefile-clang.mk
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@collabora.com>2019-06-25 09:37:18 +0200
committerLuboš Luňák <l.lunak@collabora.com>2019-06-25 19:47:42 +0200
commit6583b2fb941d90fd4701d3635458cd44d759dc93 (patch)
treeda3eb30baf8adfdda51ee1c4fbd667e17a18d36b /compilerplugins/Makefile-clang.mk
parentabee0de4f1af9ea14aa6a0c29ba07ba7ff6e61f0 (diff)
help compilerplugins generator find clang shared libs, if needed
Change-Id: I892aa42bc1e94823ab52cdfd6a855bf90106306d Reviewed-on: https://gerrit.libreoffice.org/74681 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Diffstat (limited to 'compilerplugins/Makefile-clang.mk')
-rw-r--r--compilerplugins/Makefile-clang.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/compilerplugins/Makefile-clang.mk b/compilerplugins/Makefile-clang.mk
index 263fd949979f..050c206e121d 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -208,6 +208,12 @@ CLANGTOOLLIBS = -lclangTooling -lclangDriver -lclangFrontend -lclangParse -lclan
-lclangAST -lclangLex -lclangSerialization -lclangBasic $(shell $(LLVMCONFIG) --ldflags --libs --system-libs)
# Path to the clang system headers (no idea if there's a better way to get it).
CLANGTOOLDEFS = -DCLANGSYSINCLUDE=$(shell $(LLVMCONFIG) --libdir)/clang/$(shell $(LLVMCONFIG) --version | sed 's/svn//')/include
+ifneq ($(OS),WNT)
+ifneq ($(CLANGDIR),/usr)
+# Help the generator find Clang shared libs, if Clang is built so and installed in a non-standard prefix.
+CLANGTOOLLIBS += -Wl,--rpath,$(shell $(LLVMCONFIG) --libdir)
+endif
+endif
$(CLANGOUTDIR)/sharedvisitor/generator$(CLANG_EXE_EXT): $(CLANGINDIR)/sharedvisitor/generator.cxx \
| $(CLANGOUTDIR)/sharedvisitor