Skip to content

Commit ad5fc5b

Browse files
authored
Merge branch 'master' into clarify-git-gc-trim-experimental
2 parents 5087d7b + f277bcd commit ad5fc5b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+1103
-290
lines changed

Compiler/src/abstractlattice.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,10 @@ that should be forwarded along with constant propagation.
227227
end
228228
@nospecializeinfer function is_const_prop_profitable_arg(𝕃::ConstsLattice, @nospecialize t)
229229
if isa(t, Const)
230-
# don't consider mutable values useful constants
230+
# don't consider mutable values useful constants unless they have const fields
231231
val = t.val
232-
return isa(val, Symbol) || isa(val, Type) || isa(val, Method) || isa(val, CodeInstance) || !ismutable(val)
232+
return isa(val, Symbol) || isa(val, Type) || isa(val, Method) || isa(val, CodeInstance) ||
233+
!ismutable(val) || (typeof(val).name.constfields != C_NULL)
233234
end
234235
isa(t, PartialTypeVar) && return false # this isn't forwardable
235236
return is_const_prop_profitable_arg(widenlattice(𝕃), t)

Compiler/src/ssair/ir.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@ end
609609
elseif isa(stmt, EnterNode)
610610
op == 1 || throw(BoundsError())
611611
stmt = EnterNode(stmt.catch_dest, v)
612-
elseif isa(stmt, Union{AnySSAValue, GlobalRef})
612+
elseif isa(stmt, Union{AnySSAValue, Argument, GlobalRef})
613613
op == 1 || throw(BoundsError())
614614
stmt = v
615615
elseif isa(stmt, UpsilonNode)
@@ -640,7 +640,7 @@ end
640640
function userefs(@nospecialize(x))
641641
relevant = (isa(x, Expr) && is_relevant_expr(x)) ||
642642
isa(x, GotoIfNot) || isa(x, ReturnNode) || isa(x, SSAValue) || isa(x, OldSSAValue) || isa(x, NewSSAValue) ||
643-
isa(x, PiNode) || isa(x, PhiNode) || isa(x, PhiCNode) || isa(x, UpsilonNode) || isa(x, EnterNode)
643+
isa(x, PiNode) || isa(x, PhiNode) || isa(x, PhiCNode) || isa(x, UpsilonNode) || isa(x, EnterNode) || isa(x, Argument)
644644
return UseRefIterator(x, relevant)
645645
end
646646

Compiler/src/ssair/passes.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ end
99
function is_known_invoke_or_call(@nospecialize(x), @nospecialize(func), ir::Union{IRCode,IncrementalCompact})
1010
isinvoke = isexpr(x, :invoke)
1111
(isinvoke || isexpr(x, :call)) || return false
12-
ft = argextype(x.args[isinvoke ? 2 : 1], ir)
12+
narg = isinvoke ? 2 : 1
13+
length(x.args) < narg && return false
14+
ft = argextype(x.args[narg], ir)
1315
return singleton_type(ft) === func
1416
end
1517

Compiler/test/codegen.jl

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,3 +1047,25 @@ f57872() = (Core.isdefinedglobal(@__MODULE__, Base.compilerbarrier(:const, :x578
10471047
@noinline f_mutateany(@nospecialize x) = x[] = 1
10481048
g_mutateany() = (y = Ref(0); f_mutateany(y); y[])
10491049
@test g_mutateany() === 1
1050+
1051+
# 58470 tbaa for unionselbyte of heap allocated mutables
1052+
mutable struct Wrapper58470
1053+
x::Union{Nothing,Int}
1054+
end
1055+
1056+
function findsomething58470(dict, inds)
1057+
default = Wrapper58470(nothing)
1058+
for i in inds
1059+
x = get(dict, i, default).x
1060+
if !isnothing(x)
1061+
return x
1062+
end
1063+
end
1064+
return nothing
1065+
end
1066+
1067+
let io = IOBuffer()
1068+
code_llvm(io, findsomething58470, Tuple{Dict{Int64, Wrapper58470}, Vector{Int}}, dump_module=true, raw=true, optimize=false)
1069+
str = String(take!(io))
1070+
@test !occursin("jtbaa_unionselbyte", str)
1071+
end

Compiler/test/irpasses.jl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2111,3 +2111,13 @@ let src = code_typed1(()) do
21112111
end
21122112
@test count(iscall((src, isdefined)), src.code) == 0
21132113
end
2114+
# We should successfully fold the default values of a ScopedValue
2115+
const svalconstprop = ScopedValue(1)
2116+
foosvalconstprop() = svalconstprop[]
2117+
2118+
let src = code_typed1(foosvalconstprop, ())
2119+
function is_constfield_load(expr)
2120+
iscall((src, getfield))(expr) && expr.args[3] in (:(:has_default), :(:default))
2121+
end
2122+
@test count(is_constfield_load, src.code) == 0
2123+
end

Compiler/test/ssair.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,7 @@ let
459459
@test stmt.cond === v
460460
elseif isa(stmt, ReturnNode) || isa(stmt, UpsilonNode)
461461
@test stmt.val === v
462-
elseif isa(stmt, SSAValue) || isa(stmt, NewSSAValue)
462+
elseif isa(stmt, SSAValue) || isa(stmt, NewSSAValue) || isa(stmt, Argument)
463463
@test stmt === v
464464
elseif isa(stmt, PiNode)
465465
@test stmt.val === v && stmt.typ === typeof(stmt)
@@ -508,6 +508,7 @@ let
508508
GotoNode(5),
509509
SSAValue(7),
510510
NewSSAValue(9),
511+
Argument(1),
511512
ReturnNode(SSAValue(11)),
512513
]
513514

Make.inc

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ USE_SYSTEM_LIBGIT2:=0
5959
USE_SYSTEM_PATCHELF:=0
6060
USE_SYSTEM_LIBWHICH:=0
6161
USE_SYSTEM_ZLIB:=0
62+
USE_SYSTEM_ZSTD:=0
6263
USE_SYSTEM_P7ZIP:=0
6364
USE_SYSTEM_LLD:=0
6465

@@ -373,11 +374,15 @@ $(1)_rel_eval = $(call rel_path,$(2),$($(1)))
373374
$(1)_rel = $$(call hit_cache,$(1)_rel_eval)
374375
endef
375376
$(foreach D,libdir private_libdir datarootdir libexecdir private_libexecdir docdir sysconfdir includedir,$(eval $(call cache_rel_path,$(D),$(bindir))))
376-
$(foreach D,build_libdir build_private_libdir,$(eval $(call cache_rel_path,$(D),$(build_bindir))))
377+
$(foreach D,build_libdir build_private_libdir ,$(eval $(call cache_rel_path,$(D),$(build_bindir))))
377378

378379
# Save a special one: reverse_private_libdir_rel: usually just `../`, but good to be general:
379380
reverse_private_libdir_rel_eval = $(call rel_path,$(private_libdir),$(libdir))
380381
reverse_private_libdir_rel = $(call hit_cache,reverse_private_libdir_rel_eval)
382+
reverse_private_libexecdir_rel_eval = $(call rel_path,$(private_libexecdir),$(private_libdir))
383+
reverse_private_libexecdir_rel = $(call hit_cache,reverse_private_libexecdir_rel_eval)
384+
reverse_build_private_libexecdir_rel_eval = $(call rel_path,$(build_private_libexecdir),$(build_libdir))
385+
reverse_build_private_libexecdir_rel = $(call hit_cache,reverse_build_private_libexecdir_rel_eval)
381386

382387
INSTALL_F := $(JULIAHOME)/contrib/install.sh 644
383388
INSTALL_M := $(JULIAHOME)/contrib/install.sh 755
@@ -1417,7 +1422,7 @@ CSL_NEXT_GLIBCXX_VERSION=GLIBCXX_3\.4\.34|GLIBCXX_3\.5\.|GLIBCXX_4\.
14171422
# Note: we explicitly _do not_ define `CSL` here, since it requires some more
14181423
# advanced techniques to decide whether it should be installed from a BB source
14191424
# or not. See `deps/csl.mk` for more detail.
1420-
BB_PROJECTS := BLASTRAMPOLINE OPENBLAS LLVM LIBSUITESPARSE OPENLIBM GMP OPENSSL LIBSSH2 NGHTTP2 MPFR CURL LIBGIT2 PCRE LIBUV LIBUNWIND DSFMT OBJCONV ZLIB P7ZIP LLD LIBTRACYCLIENT BOLT
1425+
BB_PROJECTS := BLASTRAMPOLINE OPENBLAS LLVM LIBSUITESPARSE OPENLIBM GMP OPENSSL LIBSSH2 NGHTTP2 MPFR CURL LIBGIT2 PCRE LIBUV LIBUNWIND DSFMT OBJCONV ZLIB ZSTD P7ZIP LLD LIBTRACYCLIENT BOLT
14211426

14221427
ifeq (${USE_THIRD_PARTY_GC},mmtk)
14231428
BB_PROJECTS += MMTK_JULIA

Makefile

Lines changed: 76 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ default: $(JULIA_BUILD_MODE) # contains either "debug" or "release"
2626
all: debug release
2727

2828
# sort is used to remove potential duplicates
29-
DIRS := $(sort $(build_bindir) $(build_depsbindir) $(build_libdir) $(build_private_libdir) $(build_libexecdir) $(build_includedir) $(build_includedir)/julia $(build_sysconfdir)/julia $(build_datarootdir)/julia $(build_datarootdir)/julia/stdlib $(build_man1dir))
29+
DIRS := $(sort $(build_bindir) $(build_depsbindir) $(build_libdir) $(build_private_libdir) $(build_private_libexecdir) $(build_libexecdir) $(build_includedir) $(build_includedir)/julia $(build_sysconfdir)/julia $(build_datarootdir)/julia $(build_datarootdir)/julia/stdlib $(build_man1dir))
3030
ifneq ($(BUILDROOT),$(JULIAHOME))
3131
BUILDDIRS := $(BUILDROOT) $(addprefix $(BUILDROOT)/,base src src/flisp src/support src/clangsa cli doc deps stdlib test test/clangsa test/embedding test/gcext test/llvmpasses)
3232
BUILDDIRMAKE := $(addsuffix /Makefile,$(BUILDDIRS)) $(BUILDROOT)/sysimage.mk $(BUILDROOT)/pkgimage.mk
@@ -203,6 +203,12 @@ endif
203203

204204
# private libraries, that are installed in $(prefix)/lib/julia
205205
JL_PRIVATE_LIBS-0 := libccalltest libccalllazyfoo libccalllazybar libllvmcalltest
206+
JL_PRIVATE_LIBS-1 := # libraries from USE_SYSTEM=1
207+
JL_PRIVATE_EXES := 7z
208+
ifeq ($(OS),WINNT)
209+
JL_PRIVATE_EXES += 7z.dll
210+
endif
211+
JL_PRIVATE_TOOLS :=
206212
ifeq ($(JULIA_BUILD_MODE),release)
207213
JL_PRIVATE_LIBS-0 += libjulia-internal libjulia-codegen
208214
else ifeq ($(JULIA_BUILD_MODE),debug)
@@ -232,9 +238,12 @@ JL_PRIVATE_LIBS-$(USE_SYSTEM_ZLIB) += zlib
232238
else
233239
JL_PRIVATE_LIBS-$(USE_SYSTEM_ZLIB) += libz
234240
endif
241+
JL_PRIVATE_LIBS-$(USE_SYSTEM_ZLIB) += libzstd
242+
JL_PRIVATE_EXES += zstd$(EXE) zstdmt$(EXE)
235243
ifeq ($(USE_LLVM_SHLIB),1)
236244
JL_PRIVATE_LIBS-$(USE_SYSTEM_LLVM) += libLLVM $(LLVM_SHARED_LIB_NAME)
237245
endif
246+
JL_PRIVATE_TOOLS += lld$(EXE) dsymutil$(EXE)
238247
JL_PRIVATE_LIBS-$(USE_SYSTEM_LIBUNWIND) += libunwind
239248

240249
ifeq ($(USE_SYSTEM_LIBM),0)
@@ -313,45 +322,41 @@ install: $(build_depsbindir)/stringreplace $(BUILDROOT)/doc/_build/html/en/index
313322

314323
$(INSTALL_M) $(JULIA_EXECUTABLE_$(JULIA_BUILD_MODE)) $(DESTDIR)$(bindir)/
315324
ifeq ($(OS),WINNT)
316-
-$(INSTALL_M) $(wildcard $(build_bindir)/*.dll) $(DESTDIR)$(bindir)/
325+
$(INSTALL_M) $(wildcard $(build_bindir)/*.dll) $(DESTDIR)$(bindir)/
317326
ifeq ($(JULIA_BUILD_MODE),release)
318-
-$(INSTALL_M) $(build_libdir)/libjulia.dll.a $(DESTDIR)$(libdir)/
319-
-$(INSTALL_M) $(build_libdir)/libjulia-internal.dll.a $(DESTDIR)$(libdir)/
327+
$(INSTALL_M) $(build_libdir)/libjulia.dll.a $(DESTDIR)$(libdir)/
328+
$(INSTALL_M) $(build_libdir)/libjulia-internal.dll.a $(DESTDIR)$(libdir)/
320329
else ifeq ($(JULIA_BUILD_MODE),debug)
321-
-$(INSTALL_M) $(build_libdir)/libjulia-debug.dll.a $(DESTDIR)$(libdir)/
322-
-$(INSTALL_M) $(build_libdir)/libjulia-internal-debug.dll.a $(DESTDIR)$(libdir)/
330+
$(INSTALL_M) $(build_libdir)/libjulia-debug.dll.a $(DESTDIR)$(libdir)/
331+
$(INSTALL_M) $(build_libdir)/libjulia-internal-debug.dll.a $(DESTDIR)$(libdir)/
323332
endif
324-
-$(INSTALL_M) $(wildcard $(build_private_libdir)/*.a) $(DESTDIR)$(private_libdir)/
325-
-rm -f $(DESTDIR)$(private_libdir)/sys-o.a
333+
$(INSTALL_M) $(filter-out %-bc.a %-o.a,$(wildcard $(build_private_libdir)/lib*.a)) $(DESTDIR)$(private_libdir)/
326334

327-
# We have a single exception; we want 7z.dll to live in private_libexecdir,
328-
# not bindir, so that 7z.exe can find it.
329-
-mv $(DESTDIR)$(bindir)/7z.dll $(DESTDIR)$(private_libexecdir)/
330-
-$(INSTALL_M) $(build_bindir)/libopenlibm.dll.a $(DESTDIR)$(libdir)/
331-
-$(INSTALL_M) $(build_libdir)/libssp.dll.a $(DESTDIR)$(libdir)/
335+
$(INSTALL_M) $(build_bindir)/libopenlibm.dll.a $(DESTDIR)$(libdir)/
336+
$(INSTALL_M) $(build_libdir)/libssp.dll.a $(DESTDIR)$(libdir)/
332337
else
333338

334339
# Copy over .dSYM directories directly for Darwin
335340
ifneq ($(DARWIN_FRAMEWORK),1)
336341
ifeq ($(OS),Darwin)
337342
ifeq ($(JULIA_BUILD_MODE),release)
338-
-cp -a $(build_libdir)/libjulia.*.dSYM $(DESTDIR)$(libdir)
339-
-cp -a $(build_libdir)/libjulia-internal.*.dSYM $(DESTDIR)$(private_libdir)
340-
-cp -a $(build_libdir)/libjulia-codegen.*.dSYM $(DESTDIR)$(private_libdir)
341-
-cp -a $(build_private_libdir)/sys.dylib.dSYM $(DESTDIR)$(private_libdir)
343+
cp -a $(build_libdir)/libjulia.*.dSYM $(DESTDIR)$(libdir)
344+
cp -a $(build_libdir)/libjulia-internal.*.dSYM $(DESTDIR)$(private_libdir)
345+
cp -a $(build_libdir)/libjulia-codegen.*.dSYM $(DESTDIR)$(private_libdir)
346+
cp -a $(build_private_libdir)/sys.dylib.dSYM $(DESTDIR)$(private_libdir)
342347
else ifeq ($(JULIA_BUILD_MODE),debug)
343-
-cp -a $(build_libdir)/libjulia-debug.*.dSYM $(DESTDIR)$(libdir)
344-
-cp -a $(build_libdir)/libjulia-internal-debug.*.dSYM $(DESTDIR)$(private_libdir)
345-
-cp -a $(build_libdir)/libjulia-codegen-debug.*.dSYM $(DESTDIR)$(private_libdir)
346-
-cp -a $(build_private_libdir)/sys-debug.dylib.dSYM $(DESTDIR)$(private_libdir)
348+
cp -a $(build_libdir)/libjulia-debug.*.dSYM $(DESTDIR)$(libdir)
349+
cp -a $(build_libdir)/libjulia-internal-debug.*.dSYM $(DESTDIR)$(private_libdir)
350+
cp -a $(build_libdir)/libjulia-codegen-debug.*.dSYM $(DESTDIR)$(private_libdir)
351+
cp -a $(build_private_libdir)/sys-debug.dylib.dSYM $(DESTDIR)$(private_libdir)
347352
endif
348353
endif
349354

350355
# Copy over shared library file for libjulia.*
351356
for suffix in $(JL_TARGETS) ; do \
352357
for lib in $(build_libdir)/lib$${suffix}.*$(SHLIB_EXT)*; do \
353358
if [ "$${lib##*.}" != "dSYM" ]; then \
354-
$(INSTALL_M) $$lib $(DESTDIR)$(libdir) ; \
359+
$(INSTALL_M) $$lib $(DESTDIR)$(libdir) || exit 1; \
355360
fi \
356361
done \
357362
done
@@ -371,26 +376,24 @@ endif
371376
for suffix in $(JL_PRIVATE_LIBS-0) ; do \
372377
for lib in $(build_libdir)/$${suffix}.*$(SHLIB_EXT)*; do \
373378
if [ "$${lib##*.}" != "dSYM" ]; then \
374-
$(INSTALL_M) $$lib $(DESTDIR)$(private_libdir) ; \
379+
$(INSTALL_M) $$lib $(DESTDIR)$(private_libdir) || exit 1; \
375380
fi \
376381
done \
377382
done
378383
for suffix in $(JL_PRIVATE_LIBS-1) ; do \
379384
for lib in $(build_private_libdir)/$${suffix}.$(SHLIB_EXT)*; do \
380385
if [ "$${lib##*.}" != "dSYM" ]; then \
381-
$(INSTALL_M) $$lib $(DESTDIR)$(private_libdir) ; \
386+
$(INSTALL_M) $$lib $(DESTDIR)$(private_libdir) || exit 1; \
382387
fi \
383388
done \
384389
done
385390
endif
386-
# Install `7z` into private_libexecdir
387-
$(INSTALL_M) $(build_bindir)/7z$(EXE) $(DESTDIR)$(private_libexecdir)/
388-
389-
# Install `lld` into private_libexecdir
390-
$(INSTALL_M) $(build_depsbindir)/lld$(EXE) $(DESTDIR)$(private_libexecdir)/
391-
392-
# Install `dsymutil` into private_libexecdir/
393-
$(INSTALL_M) $(build_depsbindir)/dsymutil$(EXE) $(DESTDIR)$(private_libexecdir)/
391+
for exe in $(JL_PRIVATE_EXES) ; do \
392+
$(INSTALL_M) $(build_private_libexecdir)/$$exe $(DESTDIR)$(private_libexecdir) || exit 1; \
393+
done
394+
for exe in $(JL_PRIVATE_TOOLS) ; do \
395+
$(INSTALL_M) $(build_depsbindir)/$$exe $(DESTDIR)$(private_libexecdir) || exit 1; \
396+
done
394397

395398
# Copy public headers
396399
cp -R -L $(build_includedir)/julia/* $(DESTDIR)$(includedir)/julia
@@ -442,13 +445,13 @@ ifneq ($(private_libdir_rel),$(build_private_libdir_rel))
442445
ifeq ($(OS), Darwin)
443446
ifneq ($(DARWIN_FRAMEWORK),1)
444447
for j in $(JL_TARGETS) ; do \
445-
install_name_tool -rpath @executable_path/$(build_private_libdir_rel) @executable_path/$(private_libdir_rel) $(DESTDIR)$(bindir)/$$j; \
446-
install_name_tool -add_rpath @executable_path/$(build_libdir_rel) @executable_path/$(libdir_rel) $(DESTDIR)$(bindir)/$$j; \
448+
install_name_tool -rpath @executable_path/$(build_private_libdir_rel) @executable_path/$(private_libdir_rel) $(DESTDIR)$(bindir)/$$j || exit 1; \
449+
install_name_tool -rpath @executable_path/$(build_libdir_rel) @executable_path/$(libdir_rel) $(DESTDIR)$(bindir)/$$j || exit 1; \
447450
done
448451
endif
449452
else ifneq (,$(findstring $(OS),Linux FreeBSD))
450453
for j in $(JL_TARGETS) ; do \
451-
$(PATCHELF) $(PATCHELF_SET_RPATH_ARG) '$$ORIGIN/$(private_libdir_rel):$$ORIGIN/$(libdir_rel)' $(DESTDIR)$(bindir)/$$j; \
454+
$(PATCHELF) $(PATCHELF_SET_RPATH_ARG) '$$ORIGIN/$(private_libdir_rel):$$ORIGIN/$(libdir_rel)' $(DESTDIR)$(bindir)/$$j || exit 1; \
452455
done
453456
endif
454457

@@ -471,11 +474,11 @@ endif
471474
ifeq ($(OS), Darwin)
472475
ifneq ($(DARWIN_FRAMEWORK),1)
473476
ifeq ($(JULIA_BUILD_MODE),release)
474-
install_name_tool -add_rpath @loader_path/$(reverse_private_libdir_rel)/ $(DESTDIR)$(private_libdir)/libjulia-internal.$(SHLIB_EXT)
475-
install_name_tool -add_rpath @loader_path/$(reverse_private_libdir_rel)/ $(DESTDIR)$(private_libdir)/libjulia-codegen.$(SHLIB_EXT)
477+
install_name_tool -add_rpath @loader_path/$(reverse_private_libdir_rel) $(DESTDIR)$(private_libdir)/libjulia-internal.$(SHLIB_EXT)
478+
install_name_tool -add_rpath @loader_path/$(reverse_private_libdir_rel) $(DESTDIR)$(private_libdir)/libjulia-codegen.$(SHLIB_EXT)
476479
else ifeq ($(JULIA_BUILD_MODE),debug)
477-
install_name_tool -add_rpath @loader_path/$(reverse_private_libdir_rel)/ $(DESTDIR)$(private_libdir)/libjulia-internal-debug.$(SHLIB_EXT)
478-
install_name_tool -add_rpath @loader_path/$(reverse_private_libdir_rel)/ $(DESTDIR)$(private_libdir)/libjulia-codegen-debug.$(SHLIB_EXT)
480+
install_name_tool -add_rpath @loader_path/$(reverse_private_libdir_rel) $(DESTDIR)$(private_libdir)/libjulia-internal-debug.$(SHLIB_EXT)
481+
install_name_tool -add_rpath @loader_path/$(reverse_private_libdir_rel) $(DESTDIR)$(private_libdir)/libjulia-codegen-debug.$(SHLIB_EXT)
479482
endif
480483
endif
481484
else ifneq (,$(findstring $(OS),Linux FreeBSD))
@@ -486,11 +489,43 @@ else ifeq ($(JULIA_BUILD_MODE),debug)
486489
$(PATCHELF) $(PATCHELF_SET_RPATH_ARG) '$$ORIGIN:$$ORIGIN/$(reverse_private_libdir_rel)' $(DESTDIR)$(private_libdir)/libjulia-internal-debug.$(SHLIB_EXT)
487490
$(PATCHELF) $(PATCHELF_SET_RPATH_ARG) '$$ORIGIN:$$ORIGIN/$(reverse_private_libdir_rel)' $(DESTDIR)$(private_libdir)/libjulia-codegen-debug.$(SHLIB_EXT)
488491
endif
492+
endif
493+
494+
ifeq ($(OS), Darwin)
495+
ifneq ($(DARWIN_FRAMEWORK),1)
496+
for j in $(JL_PRIVATE_TOOLS) ; do \
497+
[ -L $(DESTDIR)$(private_libexecdir)/$$j ] && continue; \
498+
install_name_tool -rpath @loader_path/$(build_libdir_rel) @executable_path/$(reverse_private_libexecdir_rel) $(DESTDIR)$(private_libexecdir)/$$j || exit 1; \
499+
done
500+
endif
501+
else ifneq (,$(findstring $(OS),Linux FreeBSD))
502+
for j in $(JL_PRIVATE_TOOLS) ; do \
503+
[ -L $(DESTDIR)$(private_libexecdir)/$$j ] && continue; \
504+
$(PATCHELF) $(PATCHELF_SET_RPATH_ARG) '$$ORIGIN/$(reverse_private_libexecdir_rel)' $(DESTDIR)$(private_libexecdir)/$$j || exit 1; \
505+
done
506+
endif
507+
508+
ifneq ($(reverse_private_libexecdir_rel),$(reverse_build_private_libexecdir_rel))
509+
ifeq ($(OS), Darwin)
510+
ifneq ($(DARWIN_FRAMEWORK),1)
511+
for j in $(JL_PRIVATE_EXES) ; do \
512+
[ $$j = 7z ] && continue; \
513+
[ -L $(DESTDIR)$(private_libexecdir)/$$j ] && continue; \
514+
install_name_tool -rpath @executable_path/$(reverse_build_private_libexecdir_rel) @executable_path/$(reverse_private_libexecdir_rel) $(DESTDIR)$(private_libexecdir)/$$j || exit 1; \
515+
done
516+
endif
517+
else ifneq (,$(findstring $(OS),Linux FreeBSD))
518+
for j in $(JL_PRIVATE_EXES) ; do \
519+
[ $$j = 7z ] && continue; \
520+
[ -L $(DESTDIR)$(private_libexecdir)/$$j ] && continue; \
521+
$(PATCHELF) $(PATCHELF_SET_RPATH_ARG) '$$ORIGIN/$(reverse_private_libexecdir_rel)' $(DESTDIR)$(private_libexecdir)/$$j || exit 1; \
522+
done
523+
endif
489524
endif
490525

491526
# Fix rpaths for dependencies. This should be fixed in BinaryBuilder later.
492527
ifeq ($(OS), Linux)
493-
-$(PATCHELF) $(PATCHELF_SET_RPATH_ARG) '$$ORIGIN' $(DESTDIR)$(private_shlibdir)/libLLVM.$(SHLIB_EXT)
528+
$(PATCHELF) $(PATCHELF_SET_RPATH_ARG) '$$ORIGIN' $(DESTDIR)$(private_shlibdir)/libLLVM.$(SHLIB_EXT)
494529
endif
495530
ifneq ($(LOADER_BUILD_DEP_LIBS),$(LOADER_INSTALL_DEP_LIBS))
496531
# Next, overwrite relative path to libjulia-internal in our loader if $$(LOADER_BUILD_DEP_LIBS) != $$(LOADER_INSTALL_DEP_LIBS)
@@ -511,7 +546,7 @@ ifeq ($(OS),FreeBSD)
511546
# don't set libgfortran's RPATH, it won't be able to find its friends on systems
512547
# that don't have the exact GCC port installed used for the build.
513548
for lib in $(DESTDIR)$(private_libdir)/libgfortran*$(SHLIB_EXT)*; do \
514-
$(PATCHELF) $(PATCHELF_SET_RPATH_ARG) '$$ORIGIN' $$lib; \
549+
$(PATCHELF) $(PATCHELF_SET_RPATH_ARG) '$$ORIGIN' $$lib || exit 1; \
515550
done
516551
endif
517552

NEWS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ Standard library changes
6262

6363
#### REPL
6464

65+
* The display of `AbstractChar`s in the main REPL mode now includes LaTeX input information like what is shown in help mode ([#58181]).
66+
6567
#### Test
6668

6769
* Test failures when using the `@test` macro now show evaluated arguments for all function calls ([#57825], [#57839]).

THIRDPARTY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ Julia bundles the following external programs and libraries:
6767

6868
- [7-Zip](https://www.7-zip.org/license.txt)
6969
- [ZLIB](https://zlib.net/zlib_license.html)
70+
- [ZSTD](https://github.com/facebook/zstd/blob/v1.5.7/LICENSE)
7071

7172
On some platforms, distributions of Julia contain SSL certificate authority certificates,
7273
released under the [Mozilla Public License](https://en.wikipedia.org/wiki/Mozilla_Public_License).

0 commit comments

Comments
 (0)