[PATCH] Use correct dylib ID in Darwin loadable modules

Lawrence Velázquez vq at larryv.me
Thu Jan 22 12:38:11 PST 2015


Ping?

vq



> On Dec 7, 2014, at 10:23 PM, Lawrence Velázquez <vq at larryv.me> wrote:
> 
> Even though loadable modules are not named using the shared-library
> prefix (e.g., "lib"), their dylib IDs currently contain the prefix
> anyway. Thus "LLVMPolly.dylib" is installed with an ID of
> "@rpath/libLLVMPolly.dylib". After this change, its ID would be
> "@rpath/LLVMPolly.dylib", as expected.
> ---
> Makefile.rules | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/Makefile.rules b/Makefile.rules
> index c8c971f..5ad7474 100644
> --- a/Makefile.rules
> +++ b/Makefile.rules
> @@ -598,7 +598,12 @@ ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))
> ifneq ($(HOST_OS),Darwin)
>   LD.Flags += $(RPATH) -Wl,'$$ORIGIN'
> else
> -  LD.Flags += -Wl,-install_name  -Wl,"@rpath/lib$(LIBRARYNAME)$(SHLIBEXT)"
> +  LD.Flags += -Wl,-install_name
> +  ifdef LOADABLE_MODULE
> +    LD.Flags += -Wl,"@rpath/$(LIBRARYNAME)$(SHLIBEXT)"
> +  else
> +    LD.Flags += -Wl,"@rpath/$(SharedPrefix)$(LIBRARYNAME)$(SHLIBEXT)"
> +  endif
> endif
> endif
> endif
> -- 
> 2.2.0
> 





More information about the llvm-commits mailing list