diff --git a/Makefile.rules b/Makefile.rules index d05970c18ab..5273e44ee0e 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -1063,8 +1063,9 @@ ifeq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW)) LLVMLibsOptions += -Wl,--enable-auto-import,--enable-runtime-pseudo-reloc \ -L $(SharedLibDir) endif -LLVMLibsOptions += -lLLVM-$(LLVMVersion) -LLVMLibsPaths += $(SharedLibDir)/$(SharedPrefix)LLVM-$(LLVMVersion)$(SHLIBEXT) +LLVM_SO_NAME = LLVM-$(LLVM_VERSION_MAJOR).$(LLVM_VERSION_MINOR)$(LLVM_VERSION_SUFFIX) +LLVMLibsOptions += -l$(LLVM_SO_NAME) +LLVMLibsPaths += $(SharedLibDir)/$(SharedPrefix)$(LLVM_SO_NAME)$(SHLIBEXT) else ifndef NO_LLVM_CONFIG @@ -1180,7 +1181,12 @@ LibName.O := $(LibDir)/$(LIBRARYNAME).o #--------------------------------------------------------- ifdef SHARED_LIBRARY -all-local:: $(LibName.SO) +all-local:: $(AliasName.SO) + +$(AliasName.SO): $(LibName.SO) +ifdef SHARED_ALIAS + $(Verb) $(AliasTool) $(BaseLibName.SO) $(AliasName.SO) +endif ifdef EXPORTED_SYMBOL_FILE $(LibName.SO): $(NativeExportsFile) @@ -1238,6 +1244,9 @@ endif uninstall-local:: $(Echo) Uninstalling $(BuildMode) Shared Library $(DestSharedLib) -$(Verb) $(RM) -f $(DestSharedLib) +ifdef SHARED_ALIAS + -$(Verb) $(RM) -f $(DestSharedAlias) +endif endif endif diff --git a/tools/llvm-shlib/Makefile b/tools/llvm-shlib/Makefile index 7bbc24cae7a..19077a3858a 100644 --- a/tools/llvm-shlib/Makefile +++ b/tools/llvm-shlib/Makefile @@ -9,8 +9,8 @@ LEVEL := ../.. -LIBRARYNAME = LLVM-$(LLVMVersion) -LIBRARYALIASNAME = LLVM-$(LLVM_VERSION_MAJOR).$(LLVM_VERSION_MINOR)$(LLVM_VERSION_SUFFIX) +LIBRARYNAME = LLVM-$(LLVM_VERSION_MAJOR).$(LLVM_VERSION_MINOR)$(LLVM_VERSION_SUFFIX) +LIBRARYALIASNAME = LLVM-$(LLVMVersion) NO_BUILD_ARCHIVE := 1 LINK_LIBS_IN_SHARED := 1