Skip to content

Commit 317b2cf

Browse files
vtjnashKristofferC
authored andcommitted
build: make libunwind linked dynamically (#36697)
Not sure why this was first linked statically, as the commit that introduced this simply had the message "restoring stuff that seems to have been clobbered by the revert of the unintended merge to master". Nearly all other libraries that we use are linked dynamically. (cherry picked from commit 9267bbf)
1 parent 9ab68f9 commit 317b2cf

File tree

12 files changed

+22
-11
lines changed

12 files changed

+22
-11
lines changed

Make.inc

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -928,17 +928,17 @@ LIBUNWIND:=
928928
else
929929
ifeq ($(USE_SYSTEM_LIBUNWIND), 1)
930930
ifneq ($(OS),Darwin)
931-
LIBUNWIND:=-lunwind-generic -lunwind
931+
LIBUNWIND:=-lunwind
932932
# Only for linux since we want to use not yet released libunwind features
933933
JCFLAGS+=-DSYSTEM_LIBUNWIND
934934
JCPPFLAGS+=-DSYSTEM_LIBUNWIND
935935
endif
936936
else
937937
ifeq ($(OS),Darwin)
938-
LIBUNWIND:=$(build_libdir)/libosxunwind.a
938+
LIBUNWIND:=-losxunwind
939939
JCPPFLAGS+=-DLIBOSXUNWIND
940940
else
941-
LIBUNWIND:=$(build_libdir)/libunwind-generic.a $(build_libdir)/libunwind.a
941+
LIBUNWIND:=-lunwind
942942
endif
943943
endif
944944
endif
@@ -1194,12 +1194,12 @@ OSLIBS += -lelf -lkvm -lrt -lpthread
11941194
OSLIBS += -lgcc_s
11951195

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

12001200
ifeq ($(OS), Darwin)
12011201
SHLIB_EXT := dylib
1202-
OSLIBS += -framework CoreFoundation $(LIBUNWIND)
1202+
OSLIBS += -framework CoreFoundation
12031203
WHOLE_ARCHIVE := -Xlinker -all_load
12041204
NO_WHOLE_ARCHIVE :=
12051205
JLDFLAGS :=

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,11 @@ endif
181181
ifeq ($(USE_LLVM_SHLIB),1)
182182
JL_PRIVATE_LIBS-$(USE_SYSTEM_LLVM) += libLLVM libLLVM-9jl
183183
endif
184+
ifeq ($(OS),Darwin)
185+
JL_PRIVATE_LIBS-$(USE_SYSTEM_LIBUNWIND) += libosxunwind
186+
else
187+
JL_PRIVATE_LIBS-$(USE_SYSTEM_LIBUNWIND) += libunwind
188+
endif
184189

185190
ifeq ($(USE_SYSTEM_LIBM),0)
186191
JL_PRIVATE_LIBS-$(USE_SYSTEM_OPENLIBM) += libopenlibm

deps/Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,11 @@ ifneq ($(OS), WINNT)
157157
DEP_LIBS += libwhich
158158
endif
159159

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

162166

163167
## Common build target prefixes

deps/Versions.make

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ OPENLIBM_VER = 0.7.0
1313
OPENLIBM_BB_REL = 0
1414
UNWIND_VER = 1.3.1
1515
UNWIND_BB_REL = 4
16-
OSXUNWIND_VER = 0.0.5
16+
OSXUNWIND_VER = 0.0.6
1717
OSXUNWIND_BB_REL = 0
1818
GMP_VER = 6.1.2
1919
GMP_BB_REL = 4
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
57ee184943cd407bcb0d19d0f8616565
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
b46997d83216da569a2337e4ff7da60e3332c9323b60ce2d9352ea0f84aff1b5d7cc849e20c5de387c422d9cb07b4d064b73a278f11d9dadfa6d2f9b28c5fde2

deps/checksums/libosxunwind-0.0.5.tar.gz/md5

Lines changed: 0 additions & 1 deletion
This file was deleted.

deps/checksums/libosxunwind-0.0.5.tar.gz/sha512

Lines changed: 0 additions & 1 deletion
This file was deleted.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
62ce12eb88867fe3974904dbf06fb8e9
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
901d1d0e9826b9e691991932897dac3185cd72e668658a319ba71a7f4ab6ac7ae328aa7e67d4c5cbce1a1b7a306d98a754544e8a7530a82d00406e9e42761425

0 commit comments

Comments
 (0)