From 78c8f0fcc09552b319b2e7fe3eced157fd2b12d9 Mon Sep 17 00:00:00 2001 From: Jeff Bezanson Date: Wed, 6 Oct 2021 16:28:07 -0400 Subject: [PATCH] fix LLVM link to include new zlib dependency --- deps/llvm.mk | 4 ++-- src/Makefile | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/deps/llvm.mk b/deps/llvm.mk index 6301acb101b46..3b29eb5f65044 100644 --- a/deps/llvm.mk +++ b/deps/llvm.mk @@ -83,7 +83,7 @@ LLVM_CXXFLAGS += $(CXXFLAGS) LLVM_CPPFLAGS += $(CPPFLAGS) LLVM_LDFLAGS += $(LDFLAGS) LLVM_CMAKE += -DLLVM_TARGETS_TO_BUILD:STRING="$(LLVM_TARGETS)" -DCMAKE_BUILD_TYPE="$(LLVM_CMAKE_BUILDTYPE)" -LLVM_CMAKE += -DLLVM_ENABLE_ZLIB=OFF -DLLVM_ENABLE_LIBXML2=OFF -DLLVM_HOST_TRIPLE="$(or $(XC_HOST),$(BUILD_MACHINE))" +LLVM_CMAKE += -DLLVM_ENABLE_ZLIB=ON -DLLVM_ENABLE_LIBXML2=OFF -DLLVM_HOST_TRIPLE="$(or $(XC_HOST),$(BUILD_MACHINE))" LLVM_CMAKE += -DCOMPILER_RT_ENABLE_IOS=OFF -DCOMPILER_RT_ENABLE_WATCHOS=OFF -DCOMPILER_RT_ENABLE_TVOS=OFF ifeq ($(USE_POLLY_ACC),1) LLVM_CMAKE += -DPOLLY_ENABLE_GPGPU_CODEGEN=ON @@ -283,7 +283,7 @@ $(eval $(call LLVM_PATCH,llvm7-symver-jlprefix)) endif # declare that all patches must be applied before running ./configure -$(LLVM_BUILDDIR_withtype)/build-configured: | $(LLVM_PATCH_PREV) +$(LLVM_BUILDDIR_withtype)/build-configured: | $(LLVM_PATCH_PREV) $(build_prefix)/manifest/zlib $(LLVM_BUILDDIR_withtype)/build-configured: $(SRCCACHE)/$(LLVM_SRC_DIR)/source-extracted | $(llvm_python_workaround) mkdir -p $(dir $@) diff --git a/src/Makefile b/src/Makefile index cde0faab53f7f..81aba88e3a397 100644 --- a/src/Makefile +++ b/src/Makefile @@ -135,8 +135,8 @@ FLAGS += -DLLVM_SHLIB endif # USE_LLVM_SHLIB == 1 endif -RT_LLVM_LINK_ARGS := $(shell $(LLVM_CONFIG_HOST) --libs $(RT_LLVM_LIBS) --link-static) -RT_LLVMLINK += $(LLVM_LDFLAGS) $(RT_LLVM_LINK_ARGS) $($(LLVM_LDFLAGS) $(shell $(LLVM_CONFIG_HOST) --system-libs 2> /dev/null) +RT_LLVM_LINK_ARGS := $(shell $(LLVM_CONFIG_HOST) --libs $(RT_LLVM_LIBS) --system-libs --link-static) +RT_LLVMLINK += $(LLVM_LDFLAGS) $(RT_LLVM_LINK_ARGS) ifeq ($(OS), WINNT) RT_LLVMLINK += -luuid -lole32 endif @@ -147,7 +147,7 @@ CLANG_LDFLAGS += -Wl,-undefined,dynamic_lookup endif COMMON_LIBPATHS := -L$(build_libdir) -L$(build_shlibdir) -RT_LIBS := $(LIBUV) $(LIBUTF8PROC) $(NO_WHOLE_ARCHIVE) $(RT_LLVMLINK) $(LIBUNWIND) $(OSLIBS) +RT_LIBS := $(LIBUV) $(LIBUTF8PROC) $(NO_WHOLE_ARCHIVE) $(LIBUNWIND) $(RT_LLVMLINK) $(OSLIBS) CG_LIBS := $(NO_WHOLE_ARCHIVE) $(LIBUV) $(LIBUNWIND) $(CG_LLVMLINK) $(OSLIBS) RT_DEBUG_LIBS := $(COMMON_LIBPATHS) $(WHOLE_ARCHIVE) $(BUILDDIR)/flisp/libflisp-debug.a $(WHOLE_ARCHIVE) $(BUILDDIR)/support/libsupport-debug.a -ljulia-debug $(RT_LIBS) CG_DEBUG_LIBS := $(COMMON_LIBPATHS) $(WHOLE_ARCHIVE) $(WHOLE_ARCHIVE) $(CG_LIBS) -ljulia-debug -ljulia-internal-debug