Skip to content

Commit c7ca319

Browse files
Kenotkelman
authored andcommitted
Don't introduce spurious libLLVM dependency into julia binary (JuliaLang#17486)
* Don't introduce spurious libLLVM dependency into julia binary This causes problems with the new RPATH handling since we now omit lib/julia from the executable's RPATH. Fix this by not forcing the executable to link against libLLVM, since we don't require it. Fixes JuliaLang#17484. * Provide link-time rpath Unlike ld.so, ld does not understand `$ORIGIN`, so provide the full path to it at link time to make sure it can find the appropriate dependencies.
1 parent 93ee8dd commit c7ca319

File tree

2 files changed

+2
-16
lines changed

2 files changed

+2
-16
lines changed

Make.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ else ifeq ($(OS), Darwin)
846846
RPATH_ORIGIN := -Wl,-rpath,'@loader_path/'
847847
RPATH_LIB := -Wl,-rpath,'@loader_path/' -Wl,-rpath,'@loader_path/julia/'
848848
else
849-
RPATH := -Wl,-rpath,'$$ORIGIN/$(build_libdir_rel)' -Wl,-z,origin
849+
RPATH := -Wl,-rpath,'$$ORIGIN/$(build_libdir_rel)' -Wl,-rpath-link,$(build_shlibdir) -Wl,-z,origin
850850
RPATH_ORIGIN := -Wl,-rpath,'$$ORIGIN' -Wl,-z,origin
851851
RPATH_LIB := -Wl,-rpath,'$$ORIGIN' -Wl,-rpath,'$$ORIGIN/julia' -Wl,-z,origin
852852
endif

ui/Makefile

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -23,21 +23,7 @@ OBJS := $(SRCS:%=$(BUILDDIR)/%.o)
2323
DOBJS := $(SRCS:%=$(BUILDDIR)/%.dbg.obj)
2424
DEBUGFLAGS += $(FLAGS)
2525
SHIPFLAGS += $(FLAGS)
26-
27-
ifeq ($(USE_LLVM_SHLIB),1)
28-
ifeq ($(LLVM_USE_CMAKE),1)
29-
LLVMLINK := $(shell $(LLVM_CONFIG_HOST) --ldflags) -lLLVM
30-
else
31-
ifeq ($(OS),WINNT)
32-
LLVMLINK := $(shell $(LLVM_CONFIG_HOST) --ldflags) -lLLVM-$(LLVM_VER_SHORT)
33-
else
34-
LLVMLINK := $(shell $(LLVM_CONFIG_HOST) --ldflags) -lLLVM-$(shell $(LLVM_CONFIG_HOST) --version)
35-
endif # OS == WINNT
36-
endif # LLVM_USE_CMAKE == 1
37-
else
38-
LLVMLINK :=
39-
endif # USE_LLVM_SHLIB == 1
40-
JLDFLAGS += $(LDFLAGS) $(NO_WHOLE_ARCHIVE) $(OSLIBS) $(LLVMLINK) $(RPATH)
26+
JLDFLAGS += $(LDFLAGS) $(NO_WHOLE_ARCHIVE) $(OSLIBS) $(RPATH)
4127

4228
ifeq ($(USE_SYSTEM_LIBM),0)
4329
ifneq ($(UNTRUSTED_SYSTEM_LIBM),0)

0 commit comments

Comments
 (0)