Skip to content

Commit

Permalink
build: make libunwind linked dynamically
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vtjnash committed Jul 16, 2020
1 parent 35f120f commit 040c196
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 3 additions & 3 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
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

0 comments on commit 040c196

Please sign in to comment.