Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: make libunwind linked dynamically #36697

Merged
merged 1 commit into from
Jul 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -940,17 +940,17 @@ LIBUNWIND:=
else
ifeq ($(USE_SYSTEM_LIBUNWIND), 1)
ifneq ($(OS),Darwin)
LIBUNWIND:=-lunwind-generic -lunwind
LIBUNWIND:=-lunwind
# Only for linux since we want to use not yet released libunwind features
JCFLAGS+=-DSYSTEM_LIBUNWIND
JCPPFLAGS+=-DSYSTEM_LIBUNWIND
endif
else
ifeq ($(OS),Darwin)
LIBUNWIND:=$(build_libdir)/libosxunwind.a
LIBUNWIND:=-losxunwind
JCPPFLAGS+=-DLIBOSXUNWIND
else
LIBUNWIND:=$(build_libdir)/libunwind-generic.a $(build_libdir)/libunwind.a
LIBUNWIND:=-lunwind
endif
endif
endif
Expand Down Expand Up @@ -1206,12 +1206,12 @@ OSLIBS += -lelf -lkvm -lrt -lpthread
OSLIBS += -lgcc_s

OSLIBS += -Wl,--export-dynamic -Wl,--version-script=$(JULIAHOME)/src/julia.expmap \
$(NO_WHOLE_ARCHIVE) $(LIBUNWIND)
$(NO_WHOLE_ARCHIVE)
endif

ifeq ($(OS), Darwin)
SHLIB_EXT := dylib
OSLIBS += -framework CoreFoundation $(LIBUNWIND)
OSLIBS += -framework CoreFoundation
WHOLE_ARCHIVE := -Xlinker -all_load
NO_WHOLE_ARCHIVE :=
JLDFLAGS :=
Expand Down
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,11 @@ endif
ifeq ($(USE_LLVM_SHLIB),1)
JL_PRIVATE_LIBS-$(USE_SYSTEM_LLVM) += libLLVM libLLVM-9jl
endif
ifeq ($(OS),Darwin)
JL_PRIVATE_LIBS-$(USE_SYSTEM_LIBUNWIND) += libosxunwind
else
JL_PRIVATE_LIBS-$(USE_SYSTEM_LIBUNWIND) += libunwind
endif

ifeq ($(USE_SYSTEM_LIBM),0)
JL_PRIVATE_LIBS-$(USE_SYSTEM_OPENLIBM) += libopenlibm
Expand Down
6 changes: 5 additions & 1 deletion deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,11 @@ ifneq ($(OS), WINNT)
DEP_LIBS += libwhich
endif

DEP_LIBS_STAGED := $(filter-out suitesparse-wrapper osxunwind,$(DEP_LIBS)) # unlist targets that have not been converted to use the staged-install
# unlist targets that have not been converted to use the staged-install
DEP_LIBS_STAGED := $(filter-out suitesparse-wrapper,$(DEP_LIBS))
ifneq ($(USE_BINARYBUILDER_LIBUNWIND),1)
DEP_LIBS_STAGED := $(filter-out osxunwind,$(DEP_LIBS))
endif


## Common build target prefixes
Expand Down
2 changes: 1 addition & 1 deletion deps/Versions.make
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ OPENLIBM_VER = 0.7.0
OPENLIBM_BB_REL = 0
UNWIND_VER = 1.3.1
UNWIND_BB_REL = 4
OSXUNWIND_VER = 0.0.5
OSXUNWIND_VER = 0.0.6
OSXUNWIND_BB_REL = 0
GMP_VER = 6.2.0
GMP_BB_REL = 1
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
57ee184943cd407bcb0d19d0f8616565
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b46997d83216da569a2337e4ff7da60e3332c9323b60ce2d9352ea0f84aff1b5d7cc849e20c5de387c422d9cb07b4d064b73a278f11d9dadfa6d2f9b28c5fde2
1 change: 0 additions & 1 deletion deps/checksums/libosxunwind-0.0.5.tar.gz/md5

This file was deleted.

1 change: 0 additions & 1 deletion deps/checksums/libosxunwind-0.0.5.tar.gz/sha512

This file was deleted.

1 change: 1 addition & 0 deletions deps/checksums/libosxunwind-0.0.6.tar.gz/md5
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
62ce12eb88867fe3974904dbf06fb8e9
1 change: 1 addition & 0 deletions deps/checksums/libosxunwind-0.0.6.tar.gz/sha512
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
901d1d0e9826b9e691991932897dac3185cd72e668658a319ba71a7f4ab6ac7ae328aa7e67d4c5cbce1a1b7a306d98a754544e8a7530a82d00406e9e42761425
2 changes: 1 addition & 1 deletion deps/unwind.mk
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ UNWIND_BB_NAME := LibUnwind.v$(UNWIND_VER)

$(eval $(call bb-install,unwind,UNWIND,false))

OSXUNWIND_BB_URL_BASE := https://github.com/JuliaPackaging/Yggdrasil/releases/download/LibOSXUnwind-$(OSXUNWIND_VER)-$(OSXUNWIND_BB_REL)
OSXUNWIND_BB_URL_BASE := https://github.com/JuliaBinaryWrappers/LibOSXUnwind_jll.jl/releases/download/LibOSXUnwind-v$(OSXUNWIND_VER)+$(OSXUNWIND_BB_REL)
OSXUNWIND_BB_NAME := LibOSXUnwind.v$(OSXUNWIND_VER)

$(eval $(call bb-install,osxunwind,OSXUNWIND,false))
Expand Down
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ CLANG_LDFLAGS += -Wl,-undefined,dynamic_lookup
endif


COMMON_LIBS := -L$(build_shlibdir) -L$(build_libdir) $(LIBUV) $(LIBUTF8PROC) $(NO_WHOLE_ARCHIVE) $(LLVMLINK) $(OSLIBS) $(LIBUNWIND)
COMMON_LIBS := -L$(build_shlibdir) -L$(build_libdir) $(LIBUV) $(LIBUTF8PROC) $(NO_WHOLE_ARCHIVE) $(LIBUNWIND) $(LLVMLINK) $(OSLIBS)
DEBUG_LIBS := $(WHOLE_ARCHIVE) $(BUILDDIR)/flisp/libflisp-debug.a $(WHOLE_ARCHIVE) $(BUILDDIR)/support/libsupport-debug.a $(COMMON_LIBS)
RELEASE_LIBS := $(WHOLE_ARCHIVE) $(BUILDDIR)/flisp/libflisp.a $(WHOLE_ARCHIVE) $(BUILDDIR)/support/libsupport.a $(COMMON_LIBS)

Expand Down