Skip to content

Commit d924a7a

Browse files
author
Davide Lasagna
committed
merge with upstream
2 parents e2ca636 + 758aebc commit d924a7a

File tree

417 files changed

+9921
-8480
lines changed

Some content is hidden

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

417 files changed

+9921
-8480
lines changed

Make.inc

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ USE_INTEL_JITEVENTS ?= 0
5555
USEICC ?= 0
5656
USEIFC ?= 0
5757

58+
JULIA_THREADS := 1 # Enable threading with one thread
59+
5860
ifeq ($(USE_MKL), 1)
5961
$(warning "The julia make variable USE_MKL has been renamed to USE_INTEL_MKL")
6062
USE_INTEL_MKL := 1
@@ -125,7 +127,33 @@ else
125127
NO_GIT := 1
126128
endif
127129

130+
# Julia's Semantic Versioning system labels the three decimal places in a version number as
131+
# the major, minor and patch versions. Typically the major version would be incremented
132+
# whenever a backwards-incompatible change is made, the minor version would be incremented
133+
# whenever major backwards-compatible changes are made, and the patch version would be
134+
# incremented whenever smaller changes are made. However, before v1.0.0, the major
135+
# version number is always zero and the meanings shift down a place; the minor version
136+
# number becomes the major version number, the patch version number becomes the minor
137+
# version number, and there is no patch version number to speak of. In this case, the
138+
# version v0.4.1 has backwards-compatible changes as compared to v0.4.0, and the
139+
# version v0.5.0 has major backwards-incompatible changes as compared to v0.4.X.
128140
JULIA_VERSION := $(shell cat $(JULIAHOME)/VERSION)
141+
JULIA_MAJOR_VERSION := $(shell echo $(JULIA_VERSION) | cut -d'-' -f 1 | cut -d'.' -f 1)
142+
JULIA_MINOR_VERSION := $(shell echo $(JULIA_VERSION) | cut -d'-' -f 1 | cut -d'.' -f 2)
143+
JULIA_PATCH_VERSION := $(shell echo $(JULIA_VERSION) | cut -d'-' -f 1 | cut -d'.' -f 3)
144+
145+
# libjulia's SONAME will follow the format libjulia.so.$(SOMAJOR). Before v1.0.0,
146+
# SOMAJOR will be a two-decimal value, e.g. libjulia.so.0.5, whereas at and beyond
147+
# v1.0.0, SOMAJOR will be simply the major version number, e.g. libjulia.so.1
148+
# The file itself will ultimately symlink to libjulia.so.$(SOMAJOR).$(SOMINOR)
149+
ifeq ($(JULIA_MAJOR_VERSION),0)
150+
SOMAJOR := $(JULIA_MAJOR_VERSION).$(JULIA_MINOR_VERSION)
151+
SOMINOR := $(JULIA_PATCH_VERSION)
152+
else
153+
SOMAJOR := $(JULIA_MAJOR_VERSION)
154+
SOMINOR := $(JULIA_MINOR_VERSION)
155+
endif
156+
129157
ifneq ($(NO_GIT), 1)
130158
JULIA_COMMIT := $(shell git rev-parse --short=10 HEAD)
131159
else
@@ -194,6 +222,7 @@ BUILD_LLVM_CLANG := 0
194222
# set to 1 to get lldb (often does not work, no chance with llvm3.2 and earlier)
195223
# see http://lldb.llvm.org/build.html for dependencies
196224
BUILD_LLDB := 0
225+
USE_POLLY := 0
197226

198227
# Cross-compile
199228
#XC_HOST := i686-w64-mingw32
@@ -606,6 +635,16 @@ else
606635
ISX86:=0
607636
endif
608637

638+
# If we are running on powerpc64, set certain options automatically
639+
ifneq (,$(findstring powerpc64,$(ARCH)))
640+
JCFLAGS += -fsigned-char
641+
642+
override LLVM_VER:=3.8.0
643+
override OPENBLAS_DYNAMIC_ARCH:=0
644+
override OPENBLAS_TARGET_ARCH:=POWER8
645+
646+
endif
647+
609648
# If we are running on ARM, set certain options automatically
610649
ifneq (,$(findstring arm,$(ARCH)))
611650
JCFLAGS += -fsigned-char
@@ -870,7 +909,7 @@ endif
870909

871910
# Threads
872911
ifneq ($(JULIA_THREADS), 0)
873-
JCPPFLAGS += -DJULIA_ENABLE_THREADING
912+
JCPPFLAGS += -DJULIA_ENABLE_THREADING -DJULIA_NUM_THREADS=$(JULIA_THREADS)
874913
endif
875914

876915
# Intel VTune Amplifier

Make.powerpc

Lines changed: 0 additions & 35 deletions
This file was deleted.

Makefile

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -153,14 +153,15 @@ release-candidate: release testall
153153
@echo 1. Remove deprecations in base/deprecated.jl
154154
@echo 2. Update references to the julia version in the source directories, such as in README.md
155155
@echo 3. Bump VERSION
156-
@echo 4. Create tag, push to github "\(git tag v\`cat VERSION\` && git push --tags\)" #"` # These comments deal with incompetent syntax highlighting rules
157-
@echo 5. Clean out old .tar.gz files living in deps/, "\`git clean -fdx\`" seems to work #"`
158-
@echo 6. Replace github release tarball with tarballs created from make light-source-dist and make full-source-dist
159-
@echo 7. Follow packaging instructions in DISTRIBUTING.md to create binary packages for all platforms
160-
@echo 8. Upload to AWS, update http://julialang.org/downloads and http://status.julialang.org/stable links
161-
@echo 9. Update checksums on AWS for tarball and packaged binaries
162-
@echo 10. Announce on mailing lists
163-
@echo 11. Change master to release-0.X in base/version.jl and base/version_git.sh as in 4cb1e20
156+
@echo 4. Increase SOMAJOR and SOMINOR if needed.
157+
@echo 5. Create tag, push to github "\(git tag v\`cat VERSION\` && git push --tags\)" #"` # These comments deal with incompetent syntax highlighting rules
158+
@echo 6. Clean out old .tar.gz files living in deps/, "\`git clean -fdx\`" seems to work #"`
159+
@echo 7. Replace github release tarball with tarballs created from make light-source-dist and make full-source-dist
160+
@echo 8. Follow packaging instructions in DISTRIBUTING.md to create binary packages for all platforms
161+
@echo 9. Upload to AWS, update http://julialang.org/downloads and http://status.julialang.org/stable links
162+
@echo 10. Update checksums on AWS for tarball and packaged binaries
163+
@echo 11. Announce on mailing lists
164+
@echo 12. Change master to release-0.X in base/version.jl and base/version_git.sh as in 4cb1e20
164165
@echo
165166

166167
$(build_man1dir)/julia.1: $(JULIAHOME)/doc/man/julia.1 | $(build_man1dir)
@@ -331,14 +332,14 @@ else
331332

332333
# Copy over .dSYM directories directly
333334
ifeq ($(OS),Darwin)
334-
-cp -a $(build_libdir)/*.dSYM $(DESTDIR)$(private_libdir)
335+
-cp -a $(build_libdir)/*.dSYM $(DESTDIR)$(libdir)
335336
-cp -a $(build_private_libdir)/*.dSYM $(DESTDIR)$(private_libdir)
336337
endif
337338

338339
for suffix in $(JL_LIBS) ; do \
339340
for lib in $(build_libdir)/lib$${suffix}*.$(SHLIB_EXT)*; do \
340341
if [ "$${lib##*.}" != "dSYM" ]; then \
341-
$(INSTALL_M) $$lib $(DESTDIR)$(private_libdir) ; \
342+
$(INSTALL_M) $$lib $(DESTDIR)$(libdir) ; \
342343
fi \
343344
done \
344345
done
@@ -410,8 +411,8 @@ else ifeq ($(OS), Linux)
410411
endif
411412

412413
# Overwrite JL_SYSTEM_IMAGE_PATH in julia library
413-
$(call stringreplace,$(DESTDIR)$(private_libdir)/libjulia.$(SHLIB_EXT),sys.$(SHLIB_EXT)$$,$(private_libdir_rel)/sys.$(SHLIB_EXT))
414-
$(call stringreplace,$(DESTDIR)$(private_libdir)/libjulia-debug.$(SHLIB_EXT),sys-debug.$(SHLIB_EXT)$$,$(private_libdir_rel)/sys-debug.$(SHLIB_EXT))
414+
$(call stringreplace,$(DESTDIR)$(libdir)/libjulia.$(SHLIB_EXT),sys.$(SHLIB_EXT)$$,$(private_libdir_rel)/sys.$(SHLIB_EXT))
415+
$(call stringreplace,$(DESTDIR)$(libdir)/libjulia-debug.$(SHLIB_EXT),sys-debug.$(SHLIB_EXT)$$,$(private_libdir_rel)/sys-debug.$(SHLIB_EXT))
415416
endif
416417

417418
mkdir -p $(DESTDIR)$(sysconfdir)
@@ -450,7 +451,7 @@ ifneq ($(OS), WINNT)
450451
-$(JULIAHOME)/contrib/fixup-libgfortran.sh $(DESTDIR)$(private_libdir)
451452
endif
452453
ifeq ($(OS), Linux)
453-
-$(JULIAHOME)/contrib/fixup-libstdc++.sh $(DESTDIR)$(private_libdir)
454+
-$(JULIAHOME)/contrib/fixup-libstdc++.sh $(DESTDIR)$(libdir) $(DESTDIR)$(private_libdir)
454455
# We need to bundle ca certs on linux now that we're using libgit2 with ssl
455456
ifeq ($(shell [ -e $(shell openssl version -d | cut -d '"' -f 2)/cert.pem ] && echo exists),exists)
456457
-cp $(shell openssl version -d | cut -d '"' -f 2)/cert.pem $(DESTDIR)$(datarootdir)/julia/

NEWS.md

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ Command-line option changes
5858
Compiler/Runtime improvements
5959
-----------------------------
6060

61+
* Machine SIMD types can be represented in Julia as a homogeneous tuple of `VecElement` ([#15244]).
62+
6163
Breaking changes
6264
----------------
6365

@@ -82,10 +84,13 @@ Breaking changes
8284
is now divided among the fields `code`, `slotnames`, `slottypes`, `slotflags`,
8385
`gensymtypes`, `rettype`, `nargs`, and `isva` in the `LambdaInfo` type ([#15609]).
8486

87+
* Juxtaposition of numeric literals ending in `.` (e.g. `1.x`) is no longer
88+
allowed ([#15731]).
89+
8590
Library improvements
8691
--------------------
8792

88-
* Most of the combinatorics functions have been moved from `Base`
93+
* Most of the combinatorics functions have been moved from `Base`
8994
to the [Combinatorics.jl package](https://github.com/JuliaLang/Combinatorics.jl) ([#13897]).
9095

9196
* Packages:
@@ -153,7 +158,23 @@ Library improvements
153158

154159
* `extrema` can now operate over a region ([#15550]).
155160

156-
* The new `Base.StackTraces` module makes stack traces easier to use programmatically. ([#14469])
161+
* The new `Base.StackTraces` module makes stack traces easier to use programmatically ([#14469]).
162+
163+
* There is now a default no-op `flush(io)` function for all `IO` types ([#16403]).
164+
165+
* Concatenating dense and sparse matrices now returns a sparse matrix ([#15172]).
166+
167+
* The `libjulia` library is now properly versioned and installed to the public `<prefix>/lib`
168+
directory, instead of the private `<prefix>/lib/julia` directory ([#16362]).
169+
170+
* System reflection is now more consistently exposed from Sys and not Base.
171+
`OS_NAME` has been replaced by `Sys.KERNEL` and always reports the name of the kernel (as reported by `uname`).
172+
The `@windows_only` and `@osx` family of macros have been replaced with functions such as `is_windows()` and
173+
or `is_apple()`. There's now also an `@static` macro that will evaluate the condition of an if-statement at
174+
compile time, for when a static branch is required ([#16219]).
175+
176+
* Prime number related functions have been moved from `Base` to the
177+
[Primes.jl package](https://github.com/JuliaMath/Primes.jl) ([#16481]).
157178

158179
Deprecated or removed
159180
---------------------
@@ -217,11 +238,16 @@ Deprecated or removed
217238
[#14759]: https://github.com/JuliaLang/julia/issues/14759
218239
[#14798]: https://github.com/JuliaLang/julia/issues/14798
219240
[#15032]: https://github.com/JuliaLang/julia/issues/15032
241+
[#15172]: https://github.com/JuliaLang/julia/issues/15172
220242
[#15192]: https://github.com/JuliaLang/julia/issues/15192
221243
[#15242]: https://github.com/JuliaLang/julia/issues/15242
222244
[#15258]: https://github.com/JuliaLang/julia/issues/15258
223245
[#15409]: https://github.com/JuliaLang/julia/issues/15409
224246
[#15431]: https://github.com/JuliaLang/julia/issues/15431
225247
[#15550]: https://github.com/JuliaLang/julia/issues/15550
226248
[#15609]: https://github.com/JuliaLang/julia/issues/15609
249+
[#15731]: https://github.com/JuliaLang/julia/issues/15731
227250
[#15763]: https://github.com/JuliaLang/julia/issues/15763
251+
[#16219]: https://github.com/JuliaLang/julia/issues/16219
252+
[#16362]: https://github.com/JuliaLang/julia/issues/16362
253+
[#16403]: https://github.com/JuliaLang/julia/issues/16403

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ By default you will be building the latest unstable version of Julia. However, m
7272

7373
git checkout release-0.4
7474

75-
Now run `make` to build the `julia` executable. To perform a parallel build, use `make -j N` and supply the maximum number of concurrent processes.
75+
Now run `make` to build the `julia` executable. To perform a parallel build, use `make -j N` and supply the maximum number of concurrent processes. (See [Platform Specific Build Notes](https://github.com/JuliaLang/julia#platform-specific-build-notes) for details.)
7676
When compiled the first time, it will automatically download and build its [external dependencies](#Required-Build-Tools-External-Libraries).
7777
This takes a while, but only has to be done once. If the defaults in the build do not work for you, and you need to set specific make parameters, you can save them in `Make.user`. The build will automatically check for the existence of `Make.user` and use it if it exists.
7878
Building Julia requires 1.5GiB of disk space and approximately 700MiB of virtual memory.

base/Enums.jl

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ macro enum(T,syms...)
3434
throw(ArgumentError("invalid type expression for enum $T"))
3535
end
3636
typename = T
37-
vals = Array(Tuple{Symbol,Integer},0)
37+
vals = Array{Tuple{Symbol,Integer}}(0)
3838
lo = hi = 0
3939
i = Int32(-1)
4040
hasexpr = false
@@ -93,16 +93,22 @@ macro enum(T,syms...)
9393
end
9494
end
9595
function Base.show(io::IO,x::$(esc(typename)))
96-
if Base.limit_output(io)
96+
if get(io, :compact, false)
9797
print(io, x)
9898
else
9999
print(io, x, "::", $(esc(typename)), " = ", Int(x))
100100
end
101101
end
102-
function Base.writemime(io::IO,::MIME"text/plain",::Type{$(esc(typename))})
103-
print(io, "Enum ", $(esc(typename)), ":")
104-
for (sym, i) in $vals
105-
print(io, "\n", sym, " = ", i)
102+
function Base.show(io::IO,t::Type{$(esc(typename))})
103+
if get(io, :multiline, false)
104+
print(io, "Enum ")
105+
Base.show_datatype(io, t)
106+
print(io, ":")
107+
for (sym, i) in $vals
108+
print(io, "\n", sym, " = ", i)
109+
end
110+
else
111+
Base.show_datatype(io, t)
106112
end
107113
end
108114
end

0 commit comments

Comments
 (0)