summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/libclang/Makefile5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/libclang/Makefile b/tools/libclang/Makefile
index 1fff166bbf..f2d29ee6ec 100644
--- a/tools/libclang/Makefile
+++ b/tools/libclang/Makefile
@@ -23,6 +23,11 @@ USEDLIBS = clangARCMigrate.a clangRewrite.a clangFrontend.a clangDriver.a \
include $(CLANG_LEVEL)/Makefile
+# Add soname to the library.
+ifeq ($(HOST_OS), $(filter $(HOST_OS), Linux FreeBSD OpenBSD GNU))
+ LDFLAGS += -Wl,-soname,lib$(LIBRARYNAME)$(SHLIBEXT)
+endif
+
##===----------------------------------------------------------------------===##
# FIXME: This is copied from the 'lto' makefile. Should we share this?
##===----------------------------------------------------------------------===##