Skip to content

Commit

Permalink
Update CSL (JuliaLang#40287)
Browse files Browse the repository at this point in the history
* deps: upgrade CSL

This adds the `.so` files, particularly for libatomic that we need on FreeBSD

* build: define uninstall targets even for deps that are not always installed

Most commonly csl, llvm-tools, and clang, but there were other ones in
the wrong lists also.
  • Loading branch information
vtjnash committed Apr 1, 2021
1 parent 56623b8 commit 82dc402
Show file tree
Hide file tree
Showing 9 changed files with 139 additions and 127 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ endif
echo "base/version_git.jl" > light-source-dist.tmp

# Download all stdlibs and include the tarball filenames in light-source-dist.tmp
@$(MAKE) -C stdlib getall NO_GIT=1
@$(MAKE) -C stdlib getall DEPS_GIT=0 USE_BINARYBUILDER=0
-ls stdlib/srccache/*.tar.gz >> light-source-dist.tmp
-ls stdlib/*/StdlibArtifacts.toml >> light-source-dist.tmp

Expand All @@ -472,7 +472,7 @@ source-dist:
# Make tarball with Julia code plus all dependencies
full-source-dist: light-source-dist.tmp
# Get all the dependencies downloaded
@$(MAKE) -C deps getall NO_GIT=1
@$(MAKE) -C deps getall DEPS_GIT=0 USE_BINARYBUILDER=0

# Create file full-source-dist.tmp to hold all the filenames that go into the tarball
cp light-source-dist.tmp full-source-dist.tmp
Expand Down
10 changes: 6 additions & 4 deletions contrib/refresh_checksums.mk
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ endef
# if $(3) is "assert", we set BINARYBUILDER_LLVM_ASSERTS=1
define checksum_dep
checksum-$(1)-$(2)-$(3):
-$(MAKE) $(QUIET_MAKE) -C "$(JULIAHOME)/deps" $(call make_flags,$(1),$(2),$(3)) checksum-$(1)
-+$(MAKE) $(QUIET_MAKE) -C "$(JULIAHOME)/deps" $(call make_flags,$(1),$(2),$(3)) checksum-$(1)
.PHONY: checksum-$(1)-$(2)-$(3)

# Add this guy to his project target
Expand Down Expand Up @@ -79,25 +79,27 @@ $(foreach triplet,$(CLANG_TRIPLETS),$(eval $(call checksum_dep,llvm,$(triplet),a

# External stdlibs
checksum-stdlibs:
-$(MAKE) $(QUIET_MAKE) -C "$(JULIAHOME)/stdlib" checksumall
-+$(MAKE) $(QUIET_MAKE) -C "$(JULIAHOME)/stdlib" checksumall
all: checksum-stdlibs
.PHONY: checksum-stdlibs

# doc unicode data
checksum-doc-unicodedata:
-$(MAKE) $(QUIET_MAKE) -C "$(JULIAHOME)/doc" checksum-unicodedata
-+$(MAKE) $(QUIET_MAKE) -C "$(JULIAHOME)/doc" checksum-unicodedata
all: checksum-doc-unicodedata
.PHONY: checksum-doc-unicodedata

# Special LLVM source hashes for optional targets
checksum-llvm-special-src:
-$(MAKE) $(QUIET_MAKE) -C "$(JULIAHOME)/deps" USE_BINARYBUILDER_LLVM=0 DEPS_GIT=0 BUILD_LLDB=1 BUILD_LLVM_CLANG=1 BUILD_CUSTOM_LIBCXX=1 USECLANG=1 checksum-llvm
-+$(MAKE) $(QUIET_MAKE) -C "$(JULIAHOME)/deps" USE_BINARYBUILDER_LLVM=0 DEPS_GIT=0 BUILD_LLDB=1 BUILD_LLVM_CLANG=1 BUILD_CUSTOM_LIBCXX=1 USECLANG=1 checksum-llvm
all: checksum-llvm-special-src
.PHONY: checksum-llvm-special-src

# merge substring project names to avoid races
pack-checksum-llvm-tools: | pack-checksum-llvm
pack-checksum-llvm: | checksum-llvm-tools
pack-checksum-csl: | pack-checksum-compilersupportlibraries
pack-checksum-compilersupportlibraries: | checksum-csl

# define how to pack parallel checksums into a single file format
pack-checksum-%: FORCE
Expand Down
45 changes: 26 additions & 19 deletions deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -166,12 +166,26 @@ ifneq ($(OS), WINNT)
DEP_LIBS += libwhich
endif

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

# list all targets
DEP_LIBS_STAGED_ALL := llvm llvm-tools clang llvmunwind unwind libuv pcre \
openlibm dsfmt blastrampoline openblas lapack gmp mpfr patchelf utf8proc \
objconv mbedtls libssh2 nghttp2 curl libgit2 libwhich zlib p7zip csl \
suitesparse suitesparse-wrapper
DEP_LIBS_ALL := $(DEP_LIBS_STAGED_ALL)

ifneq ($(USE_BINARYBUILDER_OPENBLAS),0)
DEP_LIBS_ALL := $(filter-out lapack,$(DEP_LIBS_ALL))
endif

ifeq ($(USE_BINARYBUILDER_LLVM),0)
DEP_LIBS_ALL := $(filter-out clang llvm-tools,$(DEP_LIBS_ALL))
endif

ifeq ($(USE_BINARYBUILDER_SUITESPARSE),0)
DEP_LIBS_STAGED := $(filter-out suitesparse,$(DEP_LIBS_STAGED))
endif

## Common build target prefixes

Expand All @@ -183,21 +197,14 @@ compile: $(addprefix compile-, $(DEP_LIBS))
check: $(addprefix check-, $(DEP_LIBS))
fastcheck: $(addprefix fastcheck-, $(DEP_LIBS))
stage: $(addprefix stage-, $(DEP_LIBS_STAGED))
install: $(addprefix install-, $(DEP_LIBS))
cleanall: $(addprefix clean-, $(DEP_LIBS))
distcleanall: $(addprefix distclean-, $(DEP_LIBS))
rm -rf $(build_prefix)
getall: get-llvm get-libuv get-pcre get-openlibm get-dsfmt get-blastrampoline get-openblas get-lapack get-suitesparse get-unwind get-gmp get-mpfr get-patchelf get-utf8proc get-objconv get-mbedtls get-libssh2 get-nghttp2 get-curl get-libgit2 get-libwhich get-zlib get-p7zip get-csl

# If we're building for MacOS, no matter what, `getall` should include `llvmunwind`
ifeq ($(OS),Darwin)
getall: get-llvmunwind
endif
install: version-check $(addprefix install-, $(DEP_LIBS))
version-check: $(addprefix version-check-, $(DEP_LIBS_STAGED))

# Same if we're building a purely-source archive, always include `llvmunwind`
ifeq ($(USE_BINARYBUILDER_LLVMUNWIND),0)
getall: get-llvmunwind
endif
uninstall: $(addprefix uninstall-, $(DEP_LIBS_STAGED_ALL))
cleanall: $(addprefix clean-, $(DEP_LIBS_ALL))
distcleanall: $(addprefix distclean-, $(DEP_LIBS_ALL))
rm -rf $(build_prefix)
getall: $(addprefix get-, $(DEP_LIBS_ALL))

include $(SRCDIR)/csl.mk
include $(SRCDIR)/llvm.mk
Expand Down
Loading

0 comments on commit 82dc402

Please sign in to comment.