Skip to content

Commit

Permalink
merge with upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
Davide Lasagna committed May 28, 2016
2 parents e2ca636 + 758aebc commit d924a7a
Show file tree
Hide file tree
Showing 417 changed files with 9,921 additions and 8,480 deletions.
41 changes: 40 additions & 1 deletion Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,8 @@ USE_INTEL_JITEVENTS ?= 0
USEICC ?= 0
USEIFC ?= 0

JULIA_THREADS := 1 # Enable threading with one thread

ifeq ($(USE_MKL), 1)
$(warning "The julia make variable USE_MKL has been renamed to USE_INTEL_MKL")
USE_INTEL_MKL := 1
Expand Down Expand Up @@ -125,7 +127,33 @@ else
NO_GIT := 1
endif

# Julia's Semantic Versioning system labels the three decimal places in a version number as
# the major, minor and patch versions. Typically the major version would be incremented
# whenever a backwards-incompatible change is made, the minor version would be incremented
# whenever major backwards-compatible changes are made, and the patch version would be
# incremented whenever smaller changes are made. However, before v1.0.0, the major
# version number is always zero and the meanings shift down a place; the minor version
# number becomes the major version number, the patch version number becomes the minor
# version number, and there is no patch version number to speak of. In this case, the
# version v0.4.1 has backwards-compatible changes as compared to v0.4.0, and the
# version v0.5.0 has major backwards-incompatible changes as compared to v0.4.X.
JULIA_VERSION := $(shell cat $(JULIAHOME)/VERSION)
JULIA_MAJOR_VERSION := $(shell echo $(JULIA_VERSION) | cut -d'-' -f 1 | cut -d'.' -f 1)
JULIA_MINOR_VERSION := $(shell echo $(JULIA_VERSION) | cut -d'-' -f 1 | cut -d'.' -f 2)
JULIA_PATCH_VERSION := $(shell echo $(JULIA_VERSION) | cut -d'-' -f 1 | cut -d'.' -f 3)

# libjulia's SONAME will follow the format libjulia.so.$(SOMAJOR). Before v1.0.0,
# SOMAJOR will be a two-decimal value, e.g. libjulia.so.0.5, whereas at and beyond
# v1.0.0, SOMAJOR will be simply the major version number, e.g. libjulia.so.1
# The file itself will ultimately symlink to libjulia.so.$(SOMAJOR).$(SOMINOR)
ifeq ($(JULIA_MAJOR_VERSION),0)
SOMAJOR := $(JULIA_MAJOR_VERSION).$(JULIA_MINOR_VERSION)
SOMINOR := $(JULIA_PATCH_VERSION)
else
SOMAJOR := $(JULIA_MAJOR_VERSION)
SOMINOR := $(JULIA_MINOR_VERSION)
endif

ifneq ($(NO_GIT), 1)
JULIA_COMMIT := $(shell git rev-parse --short=10 HEAD)
else
Expand Down Expand Up @@ -194,6 +222,7 @@ BUILD_LLVM_CLANG := 0
# set to 1 to get lldb (often does not work, no chance with llvm3.2 and earlier)
# see http://lldb.llvm.org/build.html for dependencies
BUILD_LLDB := 0
USE_POLLY := 0

# Cross-compile
#XC_HOST := i686-w64-mingw32
Expand Down Expand Up @@ -606,6 +635,16 @@ else
ISX86:=0
endif

# If we are running on powerpc64, set certain options automatically
ifneq (,$(findstring powerpc64,$(ARCH)))
JCFLAGS += -fsigned-char

override LLVM_VER:=3.8.0
override OPENBLAS_DYNAMIC_ARCH:=0
override OPENBLAS_TARGET_ARCH:=POWER8

endif

# If we are running on ARM, set certain options automatically
ifneq (,$(findstring arm,$(ARCH)))
JCFLAGS += -fsigned-char
Expand Down Expand Up @@ -870,7 +909,7 @@ endif

# Threads
ifneq ($(JULIA_THREADS), 0)
JCPPFLAGS += -DJULIA_ENABLE_THREADING
JCPPFLAGS += -DJULIA_ENABLE_THREADING -DJULIA_NUM_THREADS=$(JULIA_THREADS)
endif

# Intel VTune Amplifier
Expand Down
35 changes: 0 additions & 35 deletions Make.powerpc

This file was deleted.

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

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

# Copy over .dSYM directories directly
ifeq ($(OS),Darwin)
-cp -a $(build_libdir)/*.dSYM $(DESTDIR)$(private_libdir)
-cp -a $(build_libdir)/*.dSYM $(DESTDIR)$(libdir)
-cp -a $(build_private_libdir)/*.dSYM $(DESTDIR)$(private_libdir)
endif

for suffix in $(JL_LIBS) ; do \
for lib in $(build_libdir)/lib$${suffix}*.$(SHLIB_EXT)*; do \
if [ "$${lib##*.}" != "dSYM" ]; then \
$(INSTALL_M) $$lib $(DESTDIR)$(private_libdir) ; \
$(INSTALL_M) $$lib $(DESTDIR)$(libdir) ; \
fi \
done \
done
Expand Down Expand Up @@ -410,8 +411,8 @@ else ifeq ($(OS), Linux)
endif

# Overwrite JL_SYSTEM_IMAGE_PATH in julia library
$(call stringreplace,$(DESTDIR)$(private_libdir)/libjulia.$(SHLIB_EXT),sys.$(SHLIB_EXT)$$,$(private_libdir_rel)/sys.$(SHLIB_EXT))
$(call stringreplace,$(DESTDIR)$(private_libdir)/libjulia-debug.$(SHLIB_EXT),sys-debug.$(SHLIB_EXT)$$,$(private_libdir_rel)/sys-debug.$(SHLIB_EXT))
$(call stringreplace,$(DESTDIR)$(libdir)/libjulia.$(SHLIB_EXT),sys.$(SHLIB_EXT)$$,$(private_libdir_rel)/sys.$(SHLIB_EXT))
$(call stringreplace,$(DESTDIR)$(libdir)/libjulia-debug.$(SHLIB_EXT),sys-debug.$(SHLIB_EXT)$$,$(private_libdir_rel)/sys-debug.$(SHLIB_EXT))
endif

mkdir -p $(DESTDIR)$(sysconfdir)
Expand Down Expand Up @@ -450,7 +451,7 @@ ifneq ($(OS), WINNT)
-$(JULIAHOME)/contrib/fixup-libgfortran.sh $(DESTDIR)$(private_libdir)
endif
ifeq ($(OS), Linux)
-$(JULIAHOME)/contrib/fixup-libstdc++.sh $(DESTDIR)$(private_libdir)
-$(JULIAHOME)/contrib/fixup-libstdc++.sh $(DESTDIR)$(libdir) $(DESTDIR)$(private_libdir)
# We need to bundle ca certs on linux now that we're using libgit2 with ssl
ifeq ($(shell [ -e $(shell openssl version -d | cut -d '"' -f 2)/cert.pem ] && echo exists),exists)
-cp $(shell openssl version -d | cut -d '"' -f 2)/cert.pem $(DESTDIR)$(datarootdir)/julia/
Expand Down
30 changes: 28 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ Command-line option changes
Compiler/Runtime improvements
-----------------------------

* Machine SIMD types can be represented in Julia as a homogeneous tuple of `VecElement` ([#15244]).

Breaking changes
----------------

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

* Juxtaposition of numeric literals ending in `.` (e.g. `1.x`) is no longer
allowed ([#15731]).

Library improvements
--------------------

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

* Packages:
Expand Down Expand Up @@ -153,7 +158,23 @@ Library improvements

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

* The new `Base.StackTraces` module makes stack traces easier to use programmatically. ([#14469])
* The new `Base.StackTraces` module makes stack traces easier to use programmatically ([#14469]).

* There is now a default no-op `flush(io)` function for all `IO` types ([#16403]).

* Concatenating dense and sparse matrices now returns a sparse matrix ([#15172]).

* The `libjulia` library is now properly versioned and installed to the public `<prefix>/lib`
directory, instead of the private `<prefix>/lib/julia` directory ([#16362]).

* System reflection is now more consistently exposed from Sys and not Base.
`OS_NAME` has been replaced by `Sys.KERNEL` and always reports the name of the kernel (as reported by `uname`).
The `@windows_only` and `@osx` family of macros have been replaced with functions such as `is_windows()` and
or `is_apple()`. There's now also an `@static` macro that will evaluate the condition of an if-statement at
compile time, for when a static branch is required ([#16219]).

* Prime number related functions have been moved from `Base` to the
[Primes.jl package](https://github.com/JuliaMath/Primes.jl) ([#16481]).

Deprecated or removed
---------------------
Expand Down Expand Up @@ -217,11 +238,16 @@ Deprecated or removed
[#14759]: https://github.com/JuliaLang/julia/issues/14759
[#14798]: https://github.com/JuliaLang/julia/issues/14798
[#15032]: https://github.com/JuliaLang/julia/issues/15032
[#15172]: https://github.com/JuliaLang/julia/issues/15172
[#15192]: https://github.com/JuliaLang/julia/issues/15192
[#15242]: https://github.com/JuliaLang/julia/issues/15242
[#15258]: https://github.com/JuliaLang/julia/issues/15258
[#15409]: https://github.com/JuliaLang/julia/issues/15409
[#15431]: https://github.com/JuliaLang/julia/issues/15431
[#15550]: https://github.com/JuliaLang/julia/issues/15550
[#15609]: https://github.com/JuliaLang/julia/issues/15609
[#15731]: https://github.com/JuliaLang/julia/issues/15731
[#15763]: https://github.com/JuliaLang/julia/issues/15763
[#16219]: https://github.com/JuliaLang/julia/issues/16219
[#16362]: https://github.com/JuliaLang/julia/issues/16362
[#16403]: https://github.com/JuliaLang/julia/issues/16403
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ By default you will be building the latest unstable version of Julia. However, m

git checkout release-0.4

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.
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.)
When compiled the first time, it will automatically download and build its [external dependencies](#Required-Build-Tools-External-Libraries).
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.
Building Julia requires 1.5GiB of disk space and approximately 700MiB of virtual memory.
Expand Down
18 changes: 12 additions & 6 deletions base/Enums.jl
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ macro enum(T,syms...)
throw(ArgumentError("invalid type expression for enum $T"))
end
typename = T
vals = Array(Tuple{Symbol,Integer},0)
vals = Array{Tuple{Symbol,Integer}}(0)
lo = hi = 0
i = Int32(-1)
hasexpr = false
Expand Down Expand Up @@ -93,16 +93,22 @@ macro enum(T,syms...)
end
end
function Base.show(io::IO,x::$(esc(typename)))
if Base.limit_output(io)
if get(io, :compact, false)
print(io, x)
else
print(io, x, "::", $(esc(typename)), " = ", Int(x))
end
end
function Base.writemime(io::IO,::MIME"text/plain",::Type{$(esc(typename))})
print(io, "Enum ", $(esc(typename)), ":")
for (sym, i) in $vals
print(io, "\n", sym, " = ", i)
function Base.show(io::IO,t::Type{$(esc(typename))})
if get(io, :multiline, false)
print(io, "Enum ")
Base.show_datatype(io, t)
print(io, ":")
for (sym, i) in $vals
print(io, "\n", sym, " = ", i)
end
else
Base.show_datatype(io, t)
end
end
end
Expand Down
Loading

1 comment on commit d924a7a

@tkelman
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be squashed, on merge if not earlier. Rebases are generally preferred instead of merge commits.

Please sign in to comment.