From: Sylvestre Ledru Date: Sun, 15 Apr 2012 23:17:25 +0000 (+0000) Subject: Like for LLVM / shlib, we also provide a SONAME to libclang.so X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0740a25e9be2dd98f44a73f58cade13b1f068c6e;p=clang Like for LLVM / shlib, we also provide a SONAME to libclang.so git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154779 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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? ##===----------------------------------------------------------------------===##