Skip to content

Commit dc2313e

Browse files
committed
Merge branch 'master' into structured_opnorm
2 parents e0fa431 + caf65e0 commit dc2313e

File tree

343 files changed

+5919
-2987
lines changed

Some content is hidden

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

343 files changed

+5919
-2987
lines changed

.travis.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ matrix:
4040
- gfortran-5
4141
- os: osx
4242
env: ARCH="x86_64"
43-
osx_image: xcode8
43+
osx_image: xcode8.3
4444
cache: ccache
4545
branches:
4646
only:
@@ -138,9 +138,9 @@ script:
138138
- popd
139139
# test that the embedding code works on our installation
140140
- mkdir /tmp/embedding-test &&
141-
make check -C /tmp/julia/share/julia/test/embedding \
142-
JULIA="/tmp/julia/bin/julia" \
143-
BIN=/tmp/embedding-test \
141+
make check -C /tmp/julia/share/julia/test/embedding
142+
JULIA="/tmp/julia/bin/julia"
143+
BIN=/tmp/embedding-test
144144
"$(cd julia2 && make print-CC)"
145145
# restore initial state and prepare for travis caching
146146
- mv julia2 julia &&

Make.inc

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -284,16 +284,10 @@ OPENBLAS_DYNAMIC_ARCH := 1
284284
override CROSS_COMPILE:=$(XC_HOST)-
285285
ifneq (,$(findstring mingw,$(XC_HOST)))
286286
override OS := WINNT
287-
STD_LIB_PATH := $(shell LANG=C $(CROSS_COMPILE)gcc -print-search-dirs | grep programs | sed -e "s/^programs: =//")
288-
STD_LIB_PATH := $(STD_LIB_PATH):$(shell LANG=C $(CROSS_COMPILE)gcc -print-search-dirs | grep libraries | sed -e "s/^libraries: =//")
289-
ifneq (,$(findstring CYGWIN,$(BUILD_OS))) # the cygwin-mingw32 compiler lies about it search directory paths
290-
STD_LIB_PATH := $(shell echo '$(STD_LIB_PATH)' | sed -e "s!/lib/!/bin/!g")
291-
endif
292287
else
293288
$(error "unknown XC_HOST variable set")
294289
endif
295290
endif
296-
STD_LIB_PATH ?= $(PATH)
297291

298292
JLDOWNLOAD := $(JULIAHOME)/deps/tools/jldownload
299293
JLCHECKSUM := $(JULIAHOME)/deps/tools/jlchecksum
@@ -1169,7 +1163,6 @@ endif
11691163
# Make tricks
11701164

11711165
define dir_target
1172-
$$(subst $$(abspath $(JULIAHOME))/,,$$(abspath $(1))): $$(abspath $(1))
11731166
$$(abspath $(1)):
11741167
@mkdir -p $$@
11751168
endef
@@ -1188,7 +1181,6 @@ ifeq ($(BUILD_OS), WINNT)
11881181
else
11891182
-rm -r $$(abspath $(2)/$(3))
11901183
endif
1191-
$$(subst $$(abspath $(JULIAHOME))/,,$$(abspath $(2)/$(3))): $$(abspath $(2)/$(3))
11921184
$$(abspath $(2)/$(3)): | $$(abspath $(2))
11931185
ifeq ($$(BUILD_OS), WINNT)
11941186
@cmd //C mklink //J $$(call mingw_to_dos,$(2)/$(3),cd $(2) &&) $$(call mingw_to_dos,$(1),)
@@ -1222,8 +1214,6 @@ endif
12221214

12231215
exec = $(shell $(call spawn,$(1)))
12241216

1225-
pathsearch = $(firstword $(wildcard $(addsuffix /$(1),$(subst :, ,$(2)))))
1226-
12271217
JULIA_BUILD_MODE := release
12281218
JULIA_LIBSUFFIX:=
12291219
ifeq (,$(findstring release,$(MAKECMDGOALS)))
@@ -1277,7 +1267,13 @@ PRINT_JULIA = echo '$(subst ','\'',$(1))'; $(1)
12771267

12781268
endif
12791269

1270+
define newline # a literal \n
1271+
1272+
1273+
endef
1274+
12801275
# Makefile debugging trick:
12811276
# call print-VARIABLE to see the runtime value of any variable
1277+
# (hardened against any special characters appearing in the output)
12821278
print-%:
1283-
@echo '$*=$($*)'
1279+
@echo '$*=$(subst ','\'',$(subst $(newline),\n,$($*)))'

Makefile

Lines changed: 31 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ all: debug release
1010
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))
1111
ifneq ($(BUILDROOT),$(JULIAHOME))
1212
BUILDDIRS := $(BUILDROOT) $(addprefix $(BUILDROOT)/,base src ui doc deps stdlib test test/embedding test/llvmpasses)
13-
BUILDDIRMAKE := $(addsuffix /Makefile,$(BUILDDIRS))
13+
BUILDDIRMAKE := $(addsuffix /Makefile,$(BUILDDIRS)) $(BUILDROOT)/sysimage.mk
1414
DIRS := $(DIRS) $(BUILDDIRS)
1515
$(BUILDDIRMAKE): | $(BUILDDIRS)
1616
@# add Makefiles to the build directories for convenience (pointing back to the source location of each)
@@ -74,16 +74,13 @@ julia-src-release julia-src-debug : julia-src-% : julia-deps julia_flisp.boot.in
7474
julia-ui-release julia-ui-debug : julia-ui-% : julia-src-%
7575
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/ui julia-$*
7676

77-
julia-sysimg : julia-base julia-ui-$(JULIA_BUILD_MODE)
78-
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT) $(build_private_libdir)/sys.ji JULIA_EXECUTABLE='$(JULIA_EXECUTABLE)'
77+
julia-sysimg-ji : julia-stdlib julia-base julia-ui-$(JULIA_BUILD_MODE) | $(build_private_libdir)
78+
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT) -f sysimage.mk sysimg-ji JULIA_EXECUTABLE='$(JULIA_EXECUTABLE)'
7979

80-
julia-sysimg-release : julia-stdlib julia-sysimg julia-ui-release
81-
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT) $(build_private_libdir)/sys.$(SHLIB_EXT)
80+
julia-sysimg-release julia-sysimg-debug : julia-sysimg-% : julia-sysimg-ji julia-ui-%
81+
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT) -f sysimage.mk sysimg-$*
8282

83-
julia-sysimg-debug : julia-stdlib julia-sysimg julia-ui-debug
84-
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT) $(build_private_libdir)/sys-debug.$(SHLIB_EXT)
85-
86-
julia-debug julia-release : julia-% : julia-ui-% julia-sysimg-% julia-symlink julia-libccalltest julia-libllvmcalltest julia-base-cache
83+
julia-debug julia-release : julia-% : julia-sysimg-% julia-symlink julia-libccalltest julia-libllvmcalltest julia-base-cache
8784

8885
debug release : % : julia-%
8986

@@ -140,83 +137,9 @@ $(build_sysconfdir)/julia/startup.jl: $(JULIAHOME)/etc/startup.jl | $(build_sysc
140137
@echo Creating usr/etc/julia/startup.jl
141138
@cp $< $@
142139

143-
$(build_datarootdir)/julia/julia-config.jl : $(JULIAHOME)/contrib/julia-config.jl | $(build_datarootdir)/julia
140+
$(build_datarootdir)/julia/julia-config.jl: $(JULIAHOME)/contrib/julia-config.jl | $(build_datarootdir)/julia
144141
$(INSTALL_M) $< $(dir $@)
145142

146-
$(build_private_libdir)/%.$(SHLIB_EXT): $(build_private_libdir)/%-o.a
147-
@$(call PRINT_LINK, $(CXX) $(LDFLAGS) -shared $(fPIC) -L$(build_private_libdir) -L$(build_libdir) -L$(build_shlibdir) -o $@ \
148-
$(WHOLE_ARCHIVE) $< $(NO_WHOLE_ARCHIVE) \
149-
$(if $(findstring -debug,$(notdir $@)),-ljulia-debug,-ljulia) \
150-
$$([ $(OS) = WINNT ] && echo '' -lssp))
151-
@$(INSTALL_NAME_CMD)$(notdir $@) $@
152-
@$(DSYMUTIL) $@
153-
154-
COMPILER_SRCS := $(addprefix $(JULIAHOME)/, \
155-
base/boot.jl \
156-
base/docs/core.jl \
157-
base/abstractarray.jl \
158-
base/abstractdict.jl \
159-
base/array.jl \
160-
base/bitarray.jl \
161-
base/bitset.jl \
162-
base/bool.jl \
163-
base/ctypes.jl \
164-
base/error.jl \
165-
base/essentials.jl \
166-
base/expr.jl \
167-
base/generator.jl \
168-
base/int.jl \
169-
base/indices.jl \
170-
base/iterators.jl \
171-
base/namedtuple.jl \
172-
base/number.jl \
173-
base/operators.jl \
174-
base/options.jl \
175-
base/pair.jl \
176-
base/pointer.jl \
177-
base/promotion.jl \
178-
base/range.jl \
179-
base/reflection.jl \
180-
base/traits.jl \
181-
base/refvalue.jl \
182-
base/tuple.jl)
183-
COMPILER_SRCS += $(shell find $(JULIAHOME)/base/compiler -name \*.jl)
184-
# sort these to remove duplicates
185-
BASE_SRCS := $(sort $(shell find $(JULIAHOME)/base -name \*.jl -and -not -name sysimg.jl) \
186-
$(shell find $(BUILDROOT)/base -name \*.jl -and -not -name sysimg.jl))
187-
STDLIB_SRCS := $(JULIAHOME)/base/sysimg.jl $(shell find $(build_datarootdir)/julia/stdlib/$(VERSDIR)/*/src -name \*.jl)
188-
RELBUILDROOT := $(shell $(JULIAHOME)/contrib/relative_path.sh "$(JULIAHOME)/base" "$(BUILDROOT)/base/")
189-
190-
$(build_private_libdir)/corecompiler.ji: $(COMPILER_SRCS) | $(build_private_libdir)
191-
@$(call PRINT_JULIA, cd $(JULIAHOME)/base && \
192-
$(call spawn,$(JULIA_EXECUTABLE)) -C "$(JULIA_CPU_TARGET)" --output-ji $(call cygpath_w,$@).tmp \
193-
--startup-file=no -g0 -O0 compiler/compiler.jl)
194-
@mv $@.tmp $@
195-
196-
COMMA:=,
197-
$(build_private_libdir)/sys.ji: $(build_private_libdir)/corecompiler.ji $(JULIAHOME)/VERSION $(BASE_SRCS) $(STDLIB_SRCS)
198-
@$(call PRINT_JULIA, cd $(JULIAHOME)/base && \
199-
if ! $(call spawn,$(JULIA_EXECUTABLE)) -g1 -O0 -C "$(JULIA_CPU_TARGET)" --output-ji $(call cygpath_w,$@).tmp $(JULIA_SYSIMG_BUILD_FLAGS) \
200-
--startup-file=no --warn-overwrite=yes --sysimage $(call cygpath_w,$<) sysimg.jl $(RELBUILDROOT); then \
201-
echo '*** This error might be fixed by running `make clean`. If the error persists$(COMMA) try `make cleanall`. ***'; \
202-
false; \
203-
fi )
204-
@mv $@.tmp $@
205-
206-
define sysimg_builder
207-
$$(build_private_libdir)/sys$1-o.a $$(build_private_libdir)/sys$1-bc.a : $$(build_private_libdir)/sys$1-%.a : $$(build_private_libdir)/sys.ji
208-
@$$(call PRINT_JULIA, cd $$(JULIAHOME)/base && \
209-
if ! $$(call spawn,$3) $2 -C "$$(JULIA_CPU_TARGET)" --output-$$* $$(call cygpath_w,$$@).tmp $$(JULIA_SYSIMG_BUILD_FLAGS) \
210-
--startup-file=no --warn-overwrite=yes --sysimage $$(call cygpath_w,$$<) $$(call cygpath_w,$$(JULIAHOME)/contrib/generate_precompile.jl) $(JULIA_PRECOMPILE); then \
211-
echo '*** This error is usually fixed by running `make clean`. If the error persists$$(COMMA) try `make cleanall`. ***'; \
212-
false; \
213-
fi )
214-
@mv $$@.tmp $$@
215-
.SECONDARY: $$(build_private_libdir)/sys$1-o.a $(build_private_libdir)/sys$1-bc.a # request Make to keep these files around
216-
endef
217-
$(eval $(call sysimg_builder,,-O3,$(JULIA_EXECUTABLE_release)))
218-
$(eval $(call sysimg_builder,-debug,-O0,$(JULIA_EXECUTABLE_debug)))
219-
220143
$(build_depsbindir)/stringreplace: $(JULIAHOME)/contrib/stringreplace.c | $(build_depsbindir)
221144
@$(call PRINT_CC, $(HOSTCC) -o $(build_depsbindir)/stringreplace $(JULIAHOME)/contrib/stringreplace.c)
222145

@@ -284,14 +207,28 @@ $(eval $(call std_so,libquadmath))
284207
endif # FreeBSD
285208

286209
ifeq ($(OS),WINNT)
210+
# find the standard .dll folders
211+
ifeq ($(XC_HOST),)
212+
STD_LIB_PATH ?= $(PATH)
213+
else
214+
STD_LIB_PATH := $(shell LANG=C $(CC) -print-search-dirs | grep programs | sed -e "s/^programs: =//")
215+
STD_LIB_PATH += :$(shell LANG=C $(CC) -print-search-dirs | grep libraries | sed -e "s/^libraries: =//")
216+
ifneq (,$(findstring CYGWIN,$(BUILD_OS))) # the cygwin-mingw32 compiler lies about it search directory paths
217+
STD_LIB_PATH := $(shell echo '$(STD_LIB_PATH)' | sed -e "s!/lib/!/bin/!g")
218+
endif
219+
endif
220+
221+
pathsearch = $(firstword $(wildcard $(addsuffix /$(1),$(subst :, ,$(2)))))
222+
287223
define std_dll
288-
julia-deps: | $$(build_bindir)/lib$(1).dll $$(build_depsbindir)/lib$(1).dll
224+
julia-deps-libs: | $$(build_bindir)/lib$(1).dll $$(build_depsbindir)/lib$(1).dll
289225
$$(build_bindir)/lib$(1).dll: | $$(build_bindir)
290-
cp $$(call pathsearch,lib$(1).dll,$$(STD_LIB_PATH)) $$(build_bindir)
226+
cp $$(or $$(call pathsearch,lib$(1).dll,$$(STD_LIB_PATH)),$$(error can't find lib$1.dll)) $$(build_bindir)
291227
$$(build_depsbindir)/lib$(1).dll: | $$(build_depsbindir)
292-
cp $$(call pathsearch,lib$(1).dll,$$(STD_LIB_PATH)) $$(build_depsbindir)
228+
cp $$(or $$(call pathsearch,lib$(1).dll,$$(STD_LIB_PATH)),$$(error can't find lib$1.dll)) $$(build_depsbindir)
293229
JL_TARGETS += $(1)
294230
endef
231+
julia-deps: julia-deps-libs
295232

296233
# Given a list of space-separated libraries, return the first library name that is
297234
# correctly found through `pathsearch`.
@@ -406,7 +343,7 @@ endif
406343
mkdir -p $(DESTDIR)$(datarootdir)/icons/hicolor/scalable/apps/
407344
$(INSTALL_F) $(JULIAHOME)/contrib/julia.svg $(DESTDIR)$(datarootdir)/icons/hicolor/scalable/apps/
408345
-touch -c $(DESTDIR)$(datarootdir)/icons/hicolor/
409-
-gtk-update-icon-cache $(DESTDIR)$(datarootdir)/icons/hicolor/
346+
-gtk-update-icon-cache --ignore-theme-index $(DESTDIR)$(datarootdir)/icons/hicolor/
410347
mkdir -p $(DESTDIR)$(datarootdir)/applications/
411348
$(INSTALL_F) $(JULIAHOME)/contrib/julia.desktop $(DESTDIR)$(datarootdir)/applications/
412349
# Install appdata file
@@ -582,9 +519,9 @@ distcleanall: cleanall
582519
@-$(MAKE) -C $(BUILDROOT)/doc cleanall
583520

584521
.PHONY: default debug release check-whitespace release-candidate \
585-
julia-debug julia-release julia-deps \
522+
julia-debug julia-release julia-stdlib julia-deps julia-deps-libs \
586523
julia-ui-release julia-ui-debug julia-src-release julia-src-debug \
587-
julia-symlink julia-base julia-sysimg julia-sysimg-release julia-sysimg-debug \
524+
julia-symlink julia-base julia-sysimg julia-sysimg-ji julia-sysimg-release julia-sysimg-debug \
588525
test testall testall1 test clean distcleanall cleanall clean-* \
589526
run-julia run-julia-debug run-julia-release run \
590527
install binary-dist light-source-dist.tmp light-source-dist \
@@ -594,8 +531,11 @@ test: check-whitespace $(JULIA_BUILD_MODE)
594531
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/test default JULIA_BUILD_MODE=$(JULIA_BUILD_MODE)
595532

596533
JULIA_SYSIMG=$(build_private_libdir)/sys$(JULIA_LIBSUFFIX).$(SHLIB_EXT)
534+
597535
testall: check-whitespace $(JULIA_BUILD_MODE)
598-
cp $(JULIA_SYSIMG) $(BUILDROOT)/local.$(SHLIB_EXT) && $(call spawn, $(JULIA_EXECUTABLE) -J $(call cygpath_w,$(BUILDROOT)/local.$(SHLIB_EXT)) -e 'true' && rm $(BUILDROOT)/local.$(SHLIB_EXT))
536+
cp $(JULIA_SYSIMG) $(BUILDROOT)/local.$(SHLIB_EXT)
537+
$(call spawn,$(JULIA_EXECUTABLE) -J $(call cygpath_w,$(BUILDROOT)/local.$(SHLIB_EXT)) -e 'true')
538+
rm $(BUILDROOT)/local.$(SHLIB_EXT)
599539
@$(MAKE) $(QUIET_MAKE) -C $(BUILDROOT)/test all JULIA_BUILD_MODE=$(JULIA_BUILD_MODE)
600540

601541
testall1: check-whitespace $(JULIA_BUILD_MODE)

NEWS.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Multi-threading changes
1616
Language changes
1717
----------------
1818

19+
* `Enum` now behaves like a scalar when used in broadcasting ([#30670]).
1920

2021
Command-line option changes
2122
---------------------------
@@ -29,23 +30,34 @@ New library functions
2930
Standard library changes
3031
------------------------
3132

32-
3333
#### LinearAlgebra
3434

3535
* Added keyword arguments `rtol`, `atol` to `pinv` and `nullspace` ([#29998]).
36+
* `UniformScaling` instances are now callable such that e.g. `I(3)` will produce a `Diagonal` matrix ([#30298]).
3637

3738
#### SparseArrays
3839

3940
* performance improvements for sparse matrix-matrix multiplication ([#30372]).
41+
* Sparse vector outer products are more performant and maintain sparsity in products of the
42+
form `kron(u, v')`, `u * v'`, and `u .* v'` where `u` and `v` are sparse vectors or column
43+
views. ([#24980])
4044

4145
#### Dates
4246

4347
* Fixed `repr` such that it displays `DateTime` as it would be entered in Julia ([#30200]).
4448

49+
#### Miscellaneous
50+
51+
* Since environment variables on Windows are case-insensitive, `ENV` now converts its keys
52+
to uppercase for display, iteration, and copying ([#30593]).
4553

4654
External dependencies
4755
---------------------
4856

57+
* libgit2 has been updated to v0.27.7 ([#30584]).
58+
* OpenBLAS has been updated to v0.3.5 ([#30583]).
59+
* MbedTLS has been updated to v2.16.0 ([#30618]).
60+
* libunwind has been updated to v1.3.1 ([#30724]).
4961

5062
Deprecated or removed
5163
---------------------

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,11 @@ This is the GitHub repository of Julia source code, including instructions for c
2828

2929
- **Homepage:** <https://julialang.org>
3030
- **Binaries:** <https://julialang.org/downloads/>
31-
- **Documentation:** <https://docs.julialang.org/>
32-
- **Packages:** <https://pkg.julialang.org/>
3331
- **Source code:** <https://github.com/JuliaLang/julia>
34-
- **Git clone URL:** <git://github.com/JuliaLang/julia.git>
32+
- **Documentation:** <https://docs.julialang.org/>
33+
- **Packages:** <https://juliaobserver.com/>
3534
- **Discussion forum:** <https://discourse.julialang.org>
36-
- **Mailing lists:** <https://julialang.org/community/>
3735
- **Slack:** <https://julialang.slack.com> (get an invite from <https://slackinvite.julialang.org>)
38-
- **Gitter:** <https://gitter.im/JuliaLang/julia>
39-
- **IRC:** <https://webchat.freenode.net/?channels=julia>
4036
- **Code coverage:** <https://coveralls.io/r/JuliaLang/julia>
4137

4238
New developers may find the notes in [CONTRIBUTING](https://github.com/JuliaLang/julia/blob/master/CONTRIBUTING.md) helpful to start contributing to the Julia codebase.

0 commit comments

Comments
 (0)