diff --git a/tools/llvm-shlib/Makefile b/tools/llvm-shlib/Makefile index 1d356701822..6b358b674a2 100644 --- a/tools/llvm-shlib/Makefile +++ b/tools/llvm-shlib/Makefile @@ -72,6 +72,8 @@ endif ifeq ($(HOST_OS),Linux) # Don't allow unresolved symbols. LLVMLibsOptions += -Wl,--no-undefined + # Add soname to the library. + LLVMLibsOptions += -Wl,--soname,lib$(LIBRARYNAME)$(SHLIBEXT) endif ifeq ($(HOST_OS),SunOS)