Skip to content

Commit 4c9bede

Browse files
Zentrikvtjnashgiordanogbaraldi
authored
Bump LLVM to v19.1.7+1 (#56130)
Including #55650 till that's merged. --------- Co-authored-by: Jameson Nash <vtjnash@gmail.com> Co-authored-by: Mosè Giordano <m.giordano@ucl.ac.uk> Co-authored-by: gbaraldi <baraldigabriel@gmail.com> Co-authored-by: Mosè Giordano <765740+giordano@users.noreply.github.com>
1 parent 8a31ad6 commit 4c9bede

20 files changed

+591
-515
lines changed

deps/checksums/clang

Lines changed: 120 additions & 112 deletions
Large diffs are not rendered by default.

deps/checksums/lld

Lines changed: 120 additions & 112 deletions
Large diffs are not rendered by default.

deps/checksums/llvm

Lines changed: 242 additions & 226 deletions
Large diffs are not rendered by default.

deps/clang.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
## jll artifact
44
# Clang (paired with LLVM, only here as a JLL download)
55
CLANG_JLL_NAME := Clang
6-
CLANG_JLL_VER := 18.1.7+3
6+
CLANG_JLL_VER := 19.1.7+1

deps/lld.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
## jll artifact
44
LLD_JLL_NAME := LLD
5-
LLD_JLL_VER := 18.1.7+3
5+
LLD_JLL_VER := 19.1.7+1

deps/llvm-tools.version

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
## jll artifact
44
# LLVM_tools (downloads LLVM_jll to get things like `lit` and `opt`)
55
LLVM_TOOLS_JLL_NAME := LLVM
6-
LLVM_TOOLS_JLL_VER := 18.1.7+3
7-
LLVM_TOOLS_ASSERT_JLL_VER := 18.1.7+3
6+
LLVM_TOOLS_JLL_VER := 19.1.7+1
7+
LLVM_TOOLS_ASSERT_JLL_VER := 19.1.7+1

deps/llvm.version

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
## jll artifact
44
LLVM_JLL_NAME := libLLVM
5-
LLVM_ASSERT_JLL_VER := 18.1.7+3
5+
LLVM_ASSERT_JLL_VER := 19.1.7+1
66
## source build
77
# Version number of LLVM
8-
LLVM_VER := 18.1.7
8+
LLVM_VER := 19.1.7
99
# Git branch name in `LLVM_GIT_URL` repository
10-
LLVM_BRANCH=julia-18.1.7-2
10+
LLVM_BRANCH=julia-19.1.7-1
1111
# Git ref in `LLVM_GIT_URL` repository
12-
LLVM_SHA1=julia-18.1.7-2
12+
LLVM_SHA1=julia-19.1.7-1
1313

1414
## Following options are used to automatically fetch patchset from Julia's fork. This is
1515
## useful if you want to build an external LLVM while still applying Julia's patches.
@@ -18,6 +18,6 @@ LLVM_APPLY_JULIA_PATCHES := 0
1818
# GitHub repository to use for fetching the Julia patches to apply to LLVM source code.
1919
LLVM_JULIA_DIFF_GITHUB_REPO := https://github.com/llvm/llvm-project
2020
# Base GitHub ref for generating the diff.
21-
LLVM_BASE_REF := llvm:llvmorg-18.1.7
21+
LLVM_BASE_REF := llvm:llvmorg-19.1.7
2222
# Julia fork's GitHub ref for generating the diff.
23-
LLVM_JULIA_REF := JuliaLang:julia-18.1.7-2
23+
LLVM_JULIA_REF := JuliaLang:julia-19.1.7-1

deps/sanitizers.mk

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,23 @@
11
# Interrogate the compiler about where it is keeping its sanitizer libraries
22
ifeq ($(USECLANG),1)
3-
SANITIZER_LIB_PATH := $(shell LANG=C $(CC) -print-runtime-dir)
3+
SANITIZER_LIB_PATH := $(shell LANG=C $(CC) -print-runtime-dir)\:$(subst $(eval ) ,:,$(abspath $(wildcard $(shell LANG=C $(CC) -print-resource-dir)/lib/*/)))
44
else
55
SANITIZER_LIB_PATH := $(dir $(shell LANG=C $(CC) -print-file-name=libasan.so))
66
endif
77

88
# Given a colon-separated list of paths in $(2), find the location of the library given in $(1)
99
define pathsearch_all
10-
$(wildcard $(addsuffix /$(1),$(subst :, ,$(2))))
10+
$(firstword $(wildcard $(addsuffix /$(1),$(subst :, ,$(2)))))
1111
endef
1212

1313
define copy_sanitizer_lib
1414
install-sanitizers: $$(addprefix $$(build_libdir)/, $$(notdir $$(call pathsearch_all,$(1),$$(SANITIZER_LIB_PATH)))) | $$(build_shlibdir)
15-
$$(addprefix $$(build_shlibdir)/,$(2)): $$(addprefix $$(SANITIZER_LIB_PATH)/,$(2)) | $$(build_shlibdir)
15+
@result=$$(call pathsearch_all,$(1),$$(SANITIZER_LIB_PATH)); \
16+
if [ -z "$$$$result" ]; then \
17+
echo "Sanitizer library $(1) not found in $$(SANITIZER_LIB_PATH)"; \
18+
exit 1; \
19+
fi
20+
$$(addprefix $$(build_shlibdir)/,$(2)): $$(addprefix $$(dir $$(call pathsearch_all,$(1),$$(SANITIZER_LIB_PATH))),$(2)) | $$(build_shlibdir)
1621
-cp $$< $$@
1722
$(if $(filter $(OS), Linux), \
1823
-$(PATCHELF) $(PATCHELF_SET_RPATH_ARG) '$$$$ORIGIN' $$@ , 0)

src/Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ FLAGS += -Wall -Wno-strict-aliasing -fno-omit-frame-pointer -fvisibility=hidden
2222
-Wno-comment -Wpointer-arith -Wundef
2323
ifeq ($(USEGCC),1) # GCC bug #25509 (void)__attribute__((warn_unused_result))
2424
FLAGS += -Wno-unused-result
25+
# GCC is throwing warnings like `warning: 'int __builtin_memcmp_eq(const void*, const void*, long unsigned int)' specified bound 18446744073709551615 exceeds maximum object size 9223372036854775807` in llvm's StringRef.h == seemingly because it doesn't realise the size can't be 0.
26+
FLAGS += -Wno-stringop-overflow
27+
FLAGS += -Wno-stringop-overread
2528
endif
2629
JCFLAGS += -Wold-style-definition -Wstrict-prototypes -Wc++-compat
2730

src/cgmemmgr.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,15 +182,17 @@ static intptr_t get_anon_hdl(void) JL_NOTSAFEPOINT
182182
pid_t pid = getpid();
183183
// `shm_open` can't be mapped exec on mac
184184
# ifndef _OS_DARWIN_
185+
int shm_open_errno;
185186
do {
186187
snprintf(shm_name, sizeof(shm_name),
187188
"julia-codegen-%d-%d", (int)pid, rand());
188189
fd = shm_open(shm_name, O_RDWR | O_CREAT | O_EXCL, S_IRWXU);
190+
shm_open_errno = errno; // check_fd_or_close trashes errno, so save beforehand
189191
if (check_fd_or_close(fd)) {
190192
shm_unlink(shm_name);
191193
return fd;
192194
}
193-
} while (errno == EEXIST);
195+
} while (shm_open_errno == EEXIST);
194196
# endif
195197
FILE *tmpf = tmpfile();
196198
if (tmpf) {

0 commit comments

Comments
 (0)