Skip to content

Commit

Permalink
deps/gmp: add function to Make.inc
Browse files Browse the repository at this point in the history
  • Loading branch information
inkydragon committed Jul 6, 2022
1 parent be65cdf commit db94619
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 7 additions & 1 deletion Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -1279,7 +1279,13 @@ JLDFLAGS += -Wl,--large-address-aware
endif
JCPPFLAGS += -D_WIN32_WINNT=0x0502
UNTRUSTED_SYSTEM_LIBM := 1
endif
# Use hard links for files on windows, rather than soft links
# https://stackoverflow.com/questions/3648819/how-to-make-a-symbolic-link-with-cygwin-in-windows-7
# Usage: $(WIN_MAKE_HARD_LINK) <source> <target>
WIN_MAKE_HARD_LINK := cp --dereference --link --force
else
WIN_MAKE_HARD_LINK := true -ignore
endif # $(OS) == WINNT

# Threads
ifneq ($(JULIA_THREADS), 0)
Expand Down
8 changes: 1 addition & 7 deletions deps/gmp.mk
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,10 @@ ifeq ($(OS),$(BUILD_OS))
endif
echo 1 > $@

# Windows doesn't like soft link, use hard link
ifeq ($(OS), WINNT)
WIN_ADD_HARD_LINK_CMD := cp -f --link $(build_bindir)/libgmp-*.dll $(build_bindir)/libgmp.dll
else
WIN_ADD_HARD_LINK_CMD := true -ignore
endif
$(eval $(call staged-install, \
gmp,gmp-$(GMP_VER), \
MAKE_INSTALL,,, \
$$(WIN_ADD_HARD_LINK_CMD) && \
$$(WIN_MAKE_HARD_LINK) $(build_bindir)/libgmp-*.dll $(build_bindir)/libgmp.dll && \
$$(INSTALL_NAME_CMD)libgmp.$$(SHLIB_EXT) $$(build_shlibdir)/libgmp.$$(SHLIB_EXT)))

clean-gmp:
Expand Down

0 comments on commit db94619

Please sign in to comment.