Skip to content

Commit 71df630

Browse files
authored
Merge branch 'master' into sds/getprop_pairs
2 parents d2941ce + 2ee8c87 commit 71df630

File tree

461 files changed

+12495
-5935
lines changed

Some content is hidden

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

461 files changed

+12495
-5935
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ from Julia's root directory. This will rebuild the Julia system image, then inst
9090

9191
> **Note**
9292
>
93-
> When making changes to any of Julia's documentation it is recommended that you run `make docs` to check the your changes are valid and do not produce any errors before opening a pull request.
93+
> When making changes to any of Julia's documentation it is recommended that you run `make docs` to check that your changes are valid and do not produce any errors before opening a pull request.
9494
9595
Below are outlined the three most common types of documentation changes and the steps required to perform them. Please note that the following instructions do not cover the full range of features provided by Documenter.jl. Refer to [Documenter's documentation](https://juliadocs.github.io/Documenter.jl/stable) if you encounter anything that is not covered by the sections below.
9696

HISTORY.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ New library features
113113
inserting or consuming the first dimension depending on the ratio of `sizeof(T)` and `sizeof(S)`.
114114
* New `append!(vector, collections...)` and `prepend!(vector, collections...)` methods accept multiple
115115
collections to be appended or prepended ([#36227]).
116-
* The postfix operator `'ᵀ` can now be used as an alias for `transpose` ([#38062]).
117116
* `keys(io::IO)` has been added, which returns all keys of `io` if `io` is an `IOContext` and an empty
118117
`Base.KeySet` otherwise ([#37753]).
119118
* `count` now accepts an optional `init` argument to control the accumulation type ([#37461]).
@@ -163,6 +162,10 @@ Standard library changes
163162
results table ([#38042]).
164163
* `@testset` now supports the option `verbose` to show the test result summary
165164
of the children even if they all pass ([#33755]).
165+
* In `LinearIndices(::Tuple)` and `CartesianIndices(::Tuple)`, integers (as opposed to ranges of integers) in the
166+
argument tuple now consistently describe 1-based ranges, e.g, `CartesianIndices((3, 1:3))` is equivalent to
167+
`CartesianIndices((1:3, 1:3))`. This is how tuples of integers have always been documented to work, but a
168+
bug had caused erroneous behaviors with heterogeneous tuples containing both integers and ranges ([#37829], [#37928]).
166169

167170
#### Package Manager
168171

Make.inc

Lines changed: 25 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -60,25 +60,9 @@ USE_SYSTEM_P7ZIP:=0
6060
# Link to the LLVM shared library
6161
USE_LLVM_SHLIB := 1
6262

63-
## Settings for various Intel tools
64-
# Set to 1 to use MKL
65-
USE_INTEL_MKL ?= 0
66-
# Set to 1 to use Intel LIBM
67-
USE_INTEL_LIBM ?= 0
68-
# Set to 1 to enable profiling with Intel VTune Amplifier
69-
USE_INTEL_JITEVENTS ?= 0
70-
# Set to 1 to use Intel C, C++, and FORTRAN compilers
71-
USEICC ?= 0
72-
USEIFC ?= 0
73-
7463
# Enable threading with one thread
7564
JULIA_THREADS := 1
7665

77-
ifeq ($(USE_MKL), 1)
78-
$(warning "The julia make variable USE_MKL has been renamed to USE_INTEL_MKL")
79-
USE_INTEL_MKL := 1
80-
endif
81-
8266
# Set to 1 to enable profiling with OProfile
8367
USE_OPROFILE_JITEVENTS ?= 0
8468

@@ -488,26 +472,15 @@ USEGCC := 0
488472
USECLANG := 1
489473
endif
490474

475+
# Note: Supporting only macOS Mavericks and above
491476
ifeq ($(OS), Darwin)
492-
DARWINVER := $(shell uname -r | cut -b 1-2)
493-
DARWINVER_GTE11 := $(shell expr $(DARWINVER) \>= 11)
494-
DARWINVER_GTE13 := $(shell expr $(DARWINVER) \>= 13)
495-
ifeq ($(DARWINVER_GTE11),0) # Snow Leopard specific configuration
496-
USEGCC := 1
497-
USECLANG := 0
498-
MACOSX_VERSION_MIN := 10.6
499-
OPENBLAS_TARGET_ARCH:=NEHALEM
500-
OPENBLAS_DYNAMIC_ARCH:=0
501-
USE_SYSTEM_LIBUNWIND:=1
502-
else
503-
ifeq ($(DARWINVER_GTE13),0) # Lion / Mountain Lion specific configuration
477+
APPLE_ARCH := $(shell uname -m)
504478
USEGCC := 0
505479
USECLANG := 1
506-
MACOSX_VERSION_MIN := 10.6
507-
else # Newer versions
508-
USEGCC := 0
509-
USECLANG := 1
510-
endif
480+
ifneq ($(APPLE_ARCH),arm64)
481+
MACOSX_VERSION_MIN := 10.9
482+
else
483+
MACOSX_VERSION_MIN := 11.0
511484
endif
512485
endif
513486

@@ -520,7 +493,7 @@ CXX := $(CROSS_COMPILE)g++
520493
JCFLAGS := -std=gnu99 -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64
521494
# AArch64 needs this flag to generate the .eh_frame used by libunwind
522495
JCPPFLAGS := -fasynchronous-unwind-tables
523-
JCXXFLAGS := -pipe $(fPIC) -fno-rtti
496+
JCXXFLAGS := -pipe $(fPIC) -fno-rtti -std=c++14
524497
ifneq ($(OS), WINNT)
525498
# Do not enable on windows to avoid warnings from libuv.
526499
JCXXFLAGS += -pedantic
@@ -535,13 +508,10 @@ CXX := $(CROSS_COMPILE)clang++
535508
JCFLAGS := -std=gnu99 -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64
536509
# AArch64 needs this flag to generate the .eh_frame used by libunwind
537510
JCPPFLAGS := -fasynchronous-unwind-tables
538-
JCXXFLAGS := -pipe $(fPIC) -fno-rtti -pedantic
511+
JCXXFLAGS := -pipe $(fPIC) -fno-rtti -pedantic -std=c++14
539512
DEBUGFLAGS := -O0 -g -DJL_DEBUG_BUILD -fstack-protector
540513
SHIPFLAGS := -O3 -g
541514
ifeq ($(OS), Darwin)
542-
ifeq ($(MACOSX_VERSION_MIN),)
543-
MACOSX_VERSION_MIN := 10.9
544-
endif
545515
CC += -mmacosx-version-min=$(MACOSX_VERSION_MIN)
546516
CXX += -mmacosx-version-min=$(MACOSX_VERSION_MIN)
547517
FC += -mmacosx-version-min=$(MACOSX_VERSION_MIN)
@@ -559,7 +529,7 @@ CC := icc
559529
CXX := icpc
560530
JCFLAGS := -std=gnu11 -pipe $(fPIC) -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -fp-model precise -fp-model except -no-ftz
561531
JCPPFLAGS :=
562-
JCXXFLAGS := -pipe $(fPIC) -fno-rtti
532+
JCXXFLAGS := -pipe $(fPIC) -fno-rtti -std=c++14
563533
DEBUGFLAGS := -O0 -g -DJL_DEBUG_BUILD -fstack-protector
564534
SHIPFLAGS := -O3 -g -falign-functions
565535
endif
@@ -927,6 +897,8 @@ endif
927897
ifneq (,$(findstring aarch64,$(ARCH)))
928898
OPENBLAS_DYNAMIC_ARCH:=0
929899
OPENBLAS_TARGET_ARCH:=ARMV8
900+
USE_BLAS64:=1
901+
BINARY:=64
930902
ifeq ($(OS),Darwin)
931903
# Apple Chips are all at least A12Z
932904
MCPU:=apple-a12
@@ -1016,8 +988,8 @@ JCPPFLAGS+=-DSYSTEM_LIBUNWIND
1016988
endif
1017989
else
1018990
ifeq ($(OS),Darwin)
1019-
LIBUNWIND:=-losxunwind
1020-
JCPPFLAGS+=-DLIBOSXUNWIND
991+
LIBUNWIND:=-lunwind
992+
JCPPFLAGS+=-DLLVMLIBUNWIND
1021993
else
1022994
LIBUNWIND:=-lunwind
1023995
endif
@@ -1081,11 +1053,7 @@ endif
10811053
# Use ILP64 BLAS interface when building openblas from source on 64-bit architectures
10821054
ifeq ($(BINARY), 64)
10831055
ifeq ($(USE_SYSTEM_BLAS), 1)
1084-
ifeq ($(USE_INTEL_MKL), 1)
1085-
USE_BLAS64 ?= 1
1086-
else # non MKL system blas is most likely LP64
10871056
USE_BLAS64 ?= 0
1088-
endif
10891057
else
10901058
USE_BLAS64 ?= 1
10911059
endif
@@ -1173,13 +1141,15 @@ USE_BINARYBUILDER ?= 0
11731141
endif
11741142

11751143
# Auto-detect triplet once, create different versions that we use as defaults below for each BB install target
1176-
BB_TRIPLET_LIBGFORTRAN_CXXABI := $(shell $(call invoke_python,$(JULIAHOME)/contrib/normalize_triplet.py) $(or $(XC_HOST),$(XC_HOST),$(BUILD_MACHINE)) "$(shell $(FC) --version | head -1)" "$(or $(shell echo '\#include <string>' | $(CXX) $(CXXFLAGS) -x c++ -dM -E - | grep _GLIBCXX_USE_CXX11_ABI | awk '{ print $$3 }' ),1)")
1144+
FC_VERSION := $(shell $(FC) --version 2>/dev/null | head -1)
1145+
FC_OR_CC_VERISON := $(or $(FC_VERSION),$(shell $(CC) --version 2>/dev/null | head -1))
1146+
BB_TRIPLET_LIBGFORTRAN_CXXABI := $(shell $(call invoke_python,$(JULIAHOME)/contrib/normalize_triplet.py) $(or $(XC_HOST),$(XC_HOST),$(BUILD_MACHINE)) "$(FC_OR_CC_VERSION)" "$(or $(shell echo '\#include <string>' | $(CXX) $(CXXFLAGS) -x c++ -dM -E - | grep _GLIBCXX_USE_CXX11_ABI | awk '{ print $$3 }' ),1)")
11771147
BB_TRIPLET_LIBGFORTRAN := $(subst $(SPACE),-,$(filter-out cxx%,$(subst -,$(SPACE),$(BB_TRIPLET_LIBGFORTRAN_CXXABI))))
11781148
BB_TRIPLET_CXXABI := $(subst $(SPACE),-,$(filter-out libgfortran%,$(subst -,$(SPACE),$(BB_TRIPLET_LIBGFORTRAN_CXXABI))))
11791149
BB_TRIPLET := $(subst $(SPACE),-,$(filter-out cxx%,$(filter-out libgfortran%,$(subst -,$(SPACE),$(BB_TRIPLET_LIBGFORTRAN_CXXABI)))))
11801150

11811151
# This is the set of projects that BinaryBuilder dependencies are hooked up for.
1182-
BB_PROJECTS := OPENBLAS LLVM SUITESPARSE OPENLIBM GMP MBEDTLS LIBSSH2 NGHTTP2 MPFR CURL LIBGIT2 PCRE LIBUV LIBUNWIND DSFMT OBJCONV ZLIB P7ZIP CSL
1152+
BB_PROJECTS := BLASTRAMPOLINE OPENBLAS LLVM SUITESPARSE OPENLIBM GMP MBEDTLS LIBSSH2 NGHTTP2 MPFR CURL LIBGIT2 PCRE LIBUV LIBUNWIND DSFMT OBJCONV ZLIB P7ZIP CSL
11831153
define SET_BB_DEFAULT
11841154
# First, check to see if BB is disabled on a global setting
11851155
ifeq ($$(USE_BINARYBUILDER),0)
@@ -1196,6 +1166,14 @@ endef
11961166
$(foreach proj,$(BB_PROJECTS),$(eval $(call SET_BB_DEFAULT,$(proj))))
11971167

11981168

1169+
# Warn if the user tries to build something that requires `gfortran` but they don't have it installed.
1170+
ifeq ($(FC_VERSION),)
1171+
ifneq ($(USE_BINARYBUILDER_OPENBLAS)$(USE_BINARYBUILDER_SUITESPARSE),11)
1172+
$(error "Attempting to build OpenBLAS or SuiteSparse without a functioning fortran compiler!")
1173+
endif
1174+
endif
1175+
1176+
11991177
# OS specific stuff
12001178

12011179
# install_name_tool
@@ -1335,63 +1313,13 @@ ifeq ($(USE_PERF_JITEVENTS), 1)
13351313
JCPPFLAGS += -DJL_USE_PERF_JITEVENTS
13361314
endif
13371315

1338-
1339-
# Intel libraries
1340-
1341-
ifeq ($(USE_INTEL_LIBM), 1)
1342-
USE_SYSTEM_LIBM := 1
1343-
LIBM := -L$(MKLROOT)/../compiler/lib/intel64 -limf
1344-
LIBMNAME := libimf
1345-
endif
1346-
1347-
ifeq ($(USE_INTEL_MKL), 1)
1348-
ifeq ($(USE_BLAS64), 1)
1349-
export MKL_INTERFACE_LAYER := ILP64
1350-
MKLLIB := $(MKLROOT)/lib/intel64
1351-
else
1352-
MKLLIB := $(MKLROOT)/lib/ia32
1353-
endif
1354-
USE_SYSTEM_BLAS:=1
1355-
USE_SYSTEM_LAPACK:=1
1356-
LIBBLASNAME := libmkl_rt
1357-
LIBLAPACKNAME := libmkl_rt
1358-
MKL_LDFLAGS := -L$(MKLLIB) -lmkl_rt
1359-
ifneq ($(strip $(MKLLIB)),)
1360-
ifeq ($(OS), Linux)
1361-
RPATH_MKL := -Wl,-rpath,$(MKLLIB)
1362-
RPATH += $(RPATH_MKL)
1363-
MKL_LDFLAGS += $(RPATH_MKL)
1364-
endif
1365-
endif
1366-
LIBBLAS := $(MKL_LDFLAGS)
1367-
LIBLAPACK := $(MKL_LDFLAGS)
1368-
endif
1369-
13701316
ifeq ($(HAVE_SSP),1)
13711317
JCPPFLAGS += -DHAVE_SSP=1
13721318
ifeq ($(USEGCC),1)
13731319
OSLIBS += -lssp
13741320
endif
13751321
endif
13761322

1377-
# ATLAS
1378-
1379-
# ATLAS must have been previously installed to usr/lib/libatlas
1380-
# (built as a shared library, for your platform, single threaded)
1381-
USE_ATLAS := 0
1382-
ATLAS_LIBDIR := $(build_libdir)
1383-
#or ATLAS_LIBDIR := /path/to/system/atlas/lib
1384-
1385-
ifeq ($(USE_ATLAS), 1)
1386-
USE_BLAS64 := 0
1387-
USE_SYSTEM_BLAS := 1
1388-
USE_SYSTEM_LAPACK := 1
1389-
LIBBLAS := -L$(ATLAS_LIBDIR) -lsatlas
1390-
LIBLAPACK := $(LIBBLAS)
1391-
LIBBLASNAME := libsatlas
1392-
LIBLAPACKNAME := $(LIBBLASNAME)
1393-
endif
1394-
13951323
# Renaming OpenBLAS symbols, see #4923 and #8734
13961324
ifeq ($(USE_SYSTEM_BLAS), 0)
13971325
ifeq ($(USE_BLAS64), 1)

Makefile

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ julia-libllvmcalltest: julia-deps
7575
julia-src-release julia-src-debug : julia-src-% : julia-deps julia_flisp.boot.inc.phony julia-cli-%
7676
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/src $*
7777

78-
julia-cli-release julia-cli-debug: julia-cli-% :
78+
julia-cli-release julia-cli-debug: julia-cli-% : julia-deps
7979
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/cli $*
8080

8181
julia-sysimg-ji : julia-stdlib julia-base julia-cli-$(JULIA_BUILD_MODE) julia-src-$(JULIA_BUILD_MODE) | $(build_private_libdir)
@@ -84,7 +84,7 @@ julia-sysimg-ji : julia-stdlib julia-base julia-cli-$(JULIA_BUILD_MODE) julia-sr
8484
julia-sysimg-bc : julia-stdlib julia-base julia-cli-$(JULIA_BUILD_MODE) julia-src-$(JULIA_BUILD_MODE) | $(build_private_libdir)
8585
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT) -f sysimage.mk sysimg-bc JULIA_EXECUTABLE='$(JULIA_EXECUTABLE)'
8686

87-
julia-sysimg-release julia-sysimg-debug : julia-sysimg-% : julia-sysimg-ji julia-cli-%
87+
julia-sysimg-release julia-sysimg-debug : julia-sysimg-% : julia-sysimg-ji julia-src-%
8888
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT) -f sysimage.mk sysimg-$*
8989

9090
julia-debug julia-release : julia-% : julia-sysimg-% julia-src-% julia-symlink julia-libccalltest julia-libllvmcalltest julia-base-cache
@@ -164,7 +164,7 @@ JL_TARGETS += julia-debug
164164
endif
165165

166166
# private libraries, that are installed in $(prefix)/lib/julia
167-
JL_PRIVATE_LIBS-0 := libccalltest libllvmcalltest libjulia-internal
167+
JL_PRIVATE_LIBS-0 := libccalltest libllvmcalltest libjulia-internal libblastrampoline
168168
ifeq ($(BUNDLE_DEBUG_LIBS),1)
169169
JL_PRIVATE_LIBS-0 += libjulia-internal-debug
170170
endif
@@ -190,11 +190,7 @@ endif
190190
ifeq ($(USE_LLVM_SHLIB),1)
191191
JL_PRIVATE_LIBS-$(USE_SYSTEM_LLVM) += libLLVM libLLVM-11jl
192192
endif
193-
ifeq ($(OS),Darwin)
194-
JL_PRIVATE_LIBS-$(USE_SYSTEM_LIBUNWIND) += libosxunwind
195-
else
196193
JL_PRIVATE_LIBS-$(USE_SYSTEM_LIBUNWIND) += libunwind
197-
endif
198194

199195
ifeq ($(USE_SYSTEM_LIBM),0)
200196
JL_PRIVATE_LIBS-$(USE_SYSTEM_OPENLIBM) += libopenlibm
@@ -347,20 +343,20 @@ else ifneq (,$(findstring $(OS),Linux FreeBSD))
347343
done
348344
endif
349345

350-
# Overwrite JL_SYSTEM_IMAGE_PATH in julia library
351-
if [ $(DARWIN_FRAMEWORK) = 0 ]; then \
352-
RELEASE_TARGET=$(DESTDIR)$(libdir)/libjulia.$(SHLIB_EXT); \
353-
DEBUG_TARGET=$(DESTDIR)$(libdir)/libjulia-debug.$(SHLIB_EXT); \
346+
# Overwrite JL_SYSTEM_IMAGE_PATH in libjulia-internal
347+
if [ "$(DARWIN_FRAMEWORK)" = "0" ]; then \
348+
RELEASE_TARGET=$(DESTDIR)$(private_libdir)/libjulia-internal.$(SHLIB_EXT); \
349+
DEBUG_TARGET=$(DESTDIR)$(private_libdir)/libjulia-internal-debug.$(SHLIB_EXT); \
354350
else \
355351
RELEASE_TARGET=$(DESTDIR)$(prefix)/$(framework_dylib); \
356352
DEBUG_TARGET=$(DESTDIR)$(prefix)/$(framework_dylib)_debug; \
357353
fi; \
358354
$(call stringreplace,$${RELEASE_TARGET},sys.$(SHLIB_EXT)$$,$(private_libdir_rel)/sys.$(SHLIB_EXT)); \
359-
if [ $(BUNDLE_DEBUG_LIBS) = 1 ]; then \
355+
if [ "$(BUNDLE_DEBUG_LIBS)" = "1" ]; then \
360356
$(call stringreplace,$${DEBUG_TARGET},sys-debug.$(SHLIB_EXT)$$,$(private_libdir_rel)/sys-debug.$(SHLIB_EXT)); \
361357
fi;
362358
endif
363-
359+
364360
# Set rpath for libjulia-internal, which is moving from `../lib` to `../lib/julia`. We only need to do this for Linux/FreeBSD
365361
ifneq (,$(findstring $(OS),Linux FreeBSD))
366362
$(PATCHELF) --set-rpath '$$ORIGIN:$$ORIGIN/$(reverse_private_libdir_rel)' $(DESTDIR)$(private_libdir)/libjulia-internal.$(SHLIB_EXT)
@@ -452,7 +448,7 @@ endif
452448
echo "base/version_git.jl" > light-source-dist.tmp
453449

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

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

481477
# Create file full-source-dist.tmp to hold all the filenames that go into the tarball
482478
cp light-source-dist.tmp full-source-dist.tmp

0 commit comments

Comments
 (0)