Skip to content

Commit

Permalink
Merge branch 'master' into teh/ntuple
Browse files Browse the repository at this point in the history
  • Loading branch information
mbauman committed Jun 3, 2015
2 parents 7cd9db7 + 8ef420c commit ce1d735
Show file tree
Hide file tree
Showing 189 changed files with 5,065 additions and 3,281 deletions.
2 changes: 0 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ before_install:
brew tap staticfloat/julia;
brew rm --force $(brew deps --HEAD julia);
brew update;
sed -i '' -e "s@https://downloads.sf.net/project/machomebrew/Bottles@https://cache.e.ip.saba.us/https://downloads.sf.net/project/machomebrew/Bottles@" /usr/local/Library/Homebrew/software_spec.rb;
sed -i '' -e "s@https://homebrew.bintray.com@https://cache.e.ip.saba.us/https://homebrew.bintray.com@" /usr/local/Library/Homebrew/software_spec.rb;
brew install -v --only-dependencies --HEAD julia;
BUILDOPTS="USECLANG=1 LLVM_CONFIG=$(brew --prefix llvm33-julia)/bin/llvm-config-3.3 VERBOSE=1 USE_BLAS64=0 SUITESPARSE_INC=-I$(brew --prefix suite-sparse-julia)/include";
BUILDOPTS="$BUILDOPTS LIBBLAS=-lopenblas LIBBLASNAME=libopenblas LIBLAPACK=-lopenblas LIBLAPACKNAME=libopenblas";
Expand Down
14 changes: 7 additions & 7 deletions DISTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ pregenerate the `base/version_git.jl` file with:
Julia has lots of build dependencies where we use patched versions that has not
yet been included by the popular package managers. These dependencies will usually
be automatically downloaded when you build, but if you want to be able to build
Julia on a computer without internet access you should create a source-dist archive
with the special make target
Julia on a computer without internet access you should create a full-source-dist
archive with the special make target

make source-dist
make full-source-dist

that creates a julia-version-commit.tar.gz archive with all required dependencies.

Expand Down Expand Up @@ -66,9 +66,9 @@ The full list of CPU targets supported by LLVM can be obtained by running
Linux
-----

On Linux, `make dist` creates a tarball that contains a fully functional Julia
installation. If you wish to create a distribution package such as a
`.deb`, or `.rpm`, some extra effort is needed. See the
On Linux, `make binary-dist` creates a tarball that contains a fully
functional Julia installation. If you wish to create a distribution
package such as a `.deb`, or `.rpm`, some extra effort is needed. See the
[julia-debian](http://github.com/staticfloat/julia-debian) repository
for an example of what metadata is needed for creating `.deb` packages
for Debian and Ubuntu-based systems. See the
Expand Down Expand Up @@ -118,7 +118,7 @@ is to cross-compile from a Linux distribution such as Ubuntu. In-depth
compilation instructions [are
available](https://github.com/JuliaLang/julia/blob/master/README.windows.md).
However the important steps for redistribution are to ensure to `make
win-extras` in between `make` and `make dist`. After that process is
win-extras` in between `make` and `make binary-dist`. After that process is
completed, the `.zip` file created in the head Julia directory will
hold a completely self-contained Julia.

Expand Down
46 changes: 21 additions & 25 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,6 @@ private_libdir = $(prefix)/lib/$(MULTIARCH)/julia
libdir = $(prefix)/lib/$(MULTIARCH)/
endif


# LLVM Options
LLVMROOT = $(build_prefix)
LLVM_ASSERTIONS = 0
Expand Down Expand Up @@ -252,7 +251,6 @@ STDLIBCPP_FLAG =
ifeq ($(OS), Darwin)
DARWINVER := $(shell uname -r | cut -b 1-2)
DARWINVER_GTE13 := $(shell expr `uname -r | cut -b 1-2` \>= 13)
OSXVER := $(shell sw_vers -productVersion | cut -b 1-4)
ifeq ($(DARWINVER), 10) # Snow Leopard specific configuration
USEGCC = 1
USECLANG = 0
Expand Down Expand Up @@ -381,26 +379,6 @@ else
build_shlibdir = $(build_libdir)
endif

# If we are running on ARM, set certain options automatically
ifneq (,$(findstring arm,$(ARCH)))
LLVM_ASSERTIONS=1
LLVM_FLAGS+="--with-cpu=cortex-a9 --with-float=hard --with-abi=aapcs-vfp --enable-assertions"

OPENBLAS_DYNAMIC_ARCH=0
OPENBLAS_TARGET_ARCH=ARMV7
USE_BLAS64=0

LLVM_VER=3.6.0

USE_SYSTEM_LIBM=1
USE_SYSTEM_FFTW=1
USE_SYSTEM_GMP=1
USE_SYSTEM_MPFR=1

JCFLAGS += -fsigned-char
endif


ifeq (exists, $(shell [ -e $(JULIAHOME)/Make.user ] && echo exists ))
include $(JULIAHOME)/Make.user
endif
Expand Down Expand Up @@ -436,7 +414,6 @@ endif
# if MARCH is set newer than the native processor, be forewarned that the compile might fail
# JULIA_CPU_TARGET is the JIT-only complement to MARCH. Setting it explicitly is not generally necessary,
# since it is set equal to MARCH by default

BUILD_MACHINE := $(shell $(HOSTCC) -dumpmachine)
ifeq ($(ARCH),)
override ARCH := $(shell $(CC) -dumpmachine | sed "s/\([^-]*\).*$$/\1/")
Expand Down Expand Up @@ -489,7 +466,6 @@ endif
endif

JULIA_CPU_TARGET ?= native
JCPPFLAGS += -DJULIA_TARGET_ARCH=$(JULIA_CPU_TARGET)

# We map amd64 to x86_64 for compatibility with systems that identify 64-bit systems as such
ifeq ($(ARCH),amd64)
Expand Down Expand Up @@ -524,6 +500,18 @@ else
$(error "unknown word-size for arch: $(ARCH)")
endif

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

LLVM_ASSERTIONS=1
#LLVM_FLAGS+="--with-float=hard --with-abi=aapcs-vfp"
LLVM_VER=3.6.1

USE_BLAS64=0
OPENBLAS_DYNAMIC_ARCH=0
endif

# Set some ARCH-specific flags
ifneq ($(USEICC),1)
ifeq ($(ISX86),1)
Expand Down Expand Up @@ -574,9 +562,17 @@ else
PCRE_CONFIG = $(build_bindir)/pcre-config
endif

# Use 64-bit libraries by default on 64-bit architectures
# Use ILP64 BLAS interface when building openblas from source on 64-bit architectures
ifeq ($(BINARY), 64)
ifeq ($(USE_SYSTEM_BLAS), 1)
ifeq ($(USE_INTEL_MKL), 1)
USE_BLAS64 ?= 1
else # non MKL system blas is most likely LP64
USE_BLAS64 ?= 0
endif
else
USE_BLAS64 ?= 1
endif
endif

ifeq ($(USE_SYSTEM_BLAS), 1)
Expand Down
81 changes: 59 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ endif

release-candidate: release test
@#Check documentation
@./julia doc/NEWS-update.jl #Add missing cross-references to NEWS.md
@$(JULIA_EXECUTABLE) doc/NEWS-update.jl #Add missing cross-references to NEWS.md
@$(MAKE) -C doc unicode #Rebuild Unicode table if necessary
@./julia doc/DocCheck.jl > doc/UNDOCUMENTED.rst 2>&1 #Check for undocumented items
@$(JULIA_EXECUTABLE) doc/DocCheck.jl > doc/UNDOCUMENTED.rst 2>&1 #Check for undocumented items
@if [ -z "$(cat doc/UNDOCUMENTED.rst)" ]; then \
rm doc/UNDOCUMENTED.rst; \
else \
Expand Down Expand Up @@ -112,8 +112,9 @@ release-candidate: release test
@echo 5. Replace github release tarball with tarballs created from make light-source-dist and make full-source-dist
@echo 6. Follow packaging instructions in DISTRIBUTING.md to create binary packages for all platforms
@echo 7. Upload to AWS, update http://julialang.org/downloads and http://status.julialang.org/stable links
@echo 8. Announce on mailing lists
@echo 9. Change master to release-0.X in base/version.jl and base/version_git.sh as in 4cb1e20
@echo 8. Update checksums on AWS for tarball and packaged binaries
@echo 9. Announce on mailing lists
@echo 10. Change master to release-0.X in base/version.jl and base/version_git.sh as in 4cb1e20
@echo

$(build_docdir)/helpdb.jl: doc/helpdb.jl | $(build_docdir)
Expand All @@ -130,13 +131,11 @@ ifeq ($(OS), WINNT)
$(build_sysconfdir)/julia/juliarc.jl: contrib/windows/juliarc.jl
endif

# use sys.ji if it exists, otherwise run two stages
$(build_private_libdir)/sys%ji: $(build_private_libdir)/sys%o

.SECONDARY: $(build_private_libdir)/inference0.o
.SECONDARY: $(build_private_libdir)/inference.o
.SECONDARY: $(build_private_libdir)/sys.o
.SECONDARY: $(build_private_libdir)/sys0.o

$(build_private_libdir)/sys%$(SHLIB_EXT): $(build_private_libdir)/sys%o
$(build_private_libdir)/%.$(SHLIB_EXT): $(build_private_libdir)/%.o
ifneq ($(USEMSVC), 1)
@$(call PRINT_LINK, $(CXX) -shared -fPIC -L$(build_private_libdir) -L$(build_libdir) -L$(build_shlibdir) -o $@ $< \
$$([ $(OS) = Darwin ] && echo '' -Wl,-undefined,dynamic_lookup || echo '' -Wl,--unresolved-symbols,ignore-all ) \
Expand All @@ -146,17 +145,51 @@ else
@true
endif

$(build_private_libdir)/sys0.o: | $(build_private_libdir)
@$(call PRINT_JULIA, cd base && \
$(call spawn,$(JULIA_EXECUTABLE)) -C $(JULIA_CPU_TARGET) --build $(call cygpath_w,$(build_private_libdir)/sys0) sysimg.jl)
CORE_SRCS := base/boot.jl base/coreimg.jl \
base/abstractarray.jl \
base/array.jl \
base/bool.jl \
base/build_h.jl \
base/dict.jl \
base/error.jl \
base/essentials.jl \
base/expr.jl \
base/functors.jl \
base/hashing.jl \
base/inference.jl \
base/int.jl \
base/intset.jl \
base/iterator.jl \
base/nofloat_hashing.jl \
base/number.jl \
base/operators.jl \
base/options.jl \
base/pointer.jl \
base/promotion.jl \
base/range.jl \
base/reduce.jl \
base/reflection.jl \
base/subarray.jl \
base/subarray2.jl \
base/tuple.jl

BASE_SRCS := $(wildcard base/*.jl base/*/*.jl base/*/*/*.jl)

$(build_private_libdir)/inference0.o: $(CORE_SRCS) | $(build_private_libdir)
@$(call PRINT_JULIA, cd base && \
$(call spawn,$(JULIA_EXECUTABLE)) -C $(JULIA_CPU_TARGET) --build $(call cygpath_w,$(build_private_libdir)/inference0) -f \
coreimg.jl)

$(build_private_libdir)/inference.o: $(build_private_libdir)/inference0.$(SHLIB_EXT)
@$(call PRINT_JULIA, cd base && \
$(call spawn,$(JULIA_EXECUTABLE)) -C $(JULIA_CPU_TARGET) --build $(call cygpath_w,$(build_private_libdir)/inference) -f \
-J $(call cygpath_w,$(build_private_libdir)/inference0.ji) coreimg.jl)

COMMA:=,
$(build_private_libdir)/sys.o: VERSION $(BASE_SRCS) $(build_docdir)/helpdb.jl $(build_private_libdir)/sys0.$(SHLIB_EXT)
$(build_private_libdir)/sys.o: VERSION $(BASE_SRCS) $(build_docdir)/helpdb.jl $(build_private_libdir)/inference.$(SHLIB_EXT)
@$(call PRINT_JULIA, cd base && \
$(call spawn,$(JULIA_EXECUTABLE)) -C $(JULIA_CPU_TARGET) --build $(call cygpath_w,$(build_private_libdir)/sys) \
-J$(call cygpath_w,$(build_private_libdir))/$$([ -e $(build_private_libdir)/sys.ji ] && echo sys.ji || echo sys0.ji) -f sysimg.jl \
$(call spawn,$(JULIA_EXECUTABLE)) -C $(JULIA_CPU_TARGET) --build $(call cygpath_w,$(build_private_libdir)/sys) -f \
-J $(call cygpath_w,$(build_private_libdir)/inference.ji) sysimg.jl \
|| { echo '*** This error is usually fixed by running `make clean`. If the error persists$(COMMA) try `make cleanall`. ***' && false; } )

$(build_bindir)/stringreplace: contrib/stringreplace.c | $(build_bindir)
Expand Down Expand Up @@ -243,7 +276,7 @@ install: $(build_bindir)/stringreplace doc/_build/html

$(INSTALL_M) $(build_bindir)/julia* $(DESTDIR)$(bindir)/
ifeq ($(OS),WINNT)
-$(INSTALL_M) $(build_bindir)/*.dll $(build_bindir)/*.bat $(DESTDIR)$(bindir)/
-$(INSTALL_M) $(build_bindir)/*.dll $(DESTDIR)$(bindir)/
else
-cp -a $(build_libexecdir) $(DESTDIR)$(prefix)

Expand Down Expand Up @@ -339,7 +372,10 @@ endif
distclean dist-clean:
rm -fr julia-*.tar.gz julia*.exe julia-*.7z julia-$(JULIA_COMMIT)

binary-dist dist: distclean
dist:
@echo \'dist\' target is deprecated: use \'binary-dist\' instead.

binary-dist: distclean
ifeq ($(USE_SYSTEM_BLAS),0)
ifneq ($(OPENBLAS_DYNAMIC_ARCH),1)
@echo OpenBLAS must be rebuilt with OPENBLAS_DYNAMIC_ARCH=1 to use binary-dist target
Expand Down Expand Up @@ -373,10 +409,8 @@ ifeq ($(JULIA_CPU_TARGET), native)
endif

ifeq ($(OS), WINNT)
ifeq ($(ARCH),x86_64)
# If we are running on WIN64, also delete sys.dll until we switch to llvm3.5+
# If we are running on windows, also delete sys.dll until we switch to llvm3.5+
-rm -f $(DESTDIR)$(private_libdir)/sys.$(SHLIB_EXT)
endif

[ ! -d dist-extras ] || ( cd dist-extras && \
cp 7z.exe 7z.dll libexpat-1.dll zlib1.dll libgfortran-3.dll libquadmath-0.dll libstdc++-6.dll libgcc_s_s*-1.dll libssp-0.dll $(bindir) && \
Expand Down Expand Up @@ -419,8 +453,11 @@ light-source-dist: light-source-dist.tmp
sed -e "s_.*_$$DIRNAME/&_" light-source-dist.tmp > light-source-dist.tmp1; \
cd ../ && tar -cz -T $$DIRNAME/light-source-dist.tmp1 --no-recursion -f $$DIRNAME/julia-$(JULIA_VERSION)_$(JULIA_COMMIT).tar.gz

source-dist:
@echo \'source-dist\' target is deprecated: use \'full-source-dist\' instead.

# Make tarball with Julia code plus all dependencies
full-source-dist source-dist: light-source-dist.tmp
full-source-dist: light-source-dist.tmp
# Get all the dependencies downloaded
@$(MAKE) -C deps getall NO_GIT=1

Expand Down Expand Up @@ -518,7 +555,7 @@ endif
cd dist-extras && \
$(JLDOWNLOAD) http://downloads.sourceforge.net/sevenzip/7z920_extra.7z && \
$(JLDOWNLOAD) https://unsis.googlecode.com/files/nsis-2.46.5-Unicode-setup.exe && \
$(JLDOWNLOAD) busybox.exe http://intgat.tigress.co.uk/rmy/files/busybox/busybox-w32-TIG-1778-g15efec6.exe && \
$(JLDOWNLOAD) busybox.exe http://frippery.org/files/busybox/busybox-w32-FRP-1-g9eb16cb.exe && \
chmod a+x 7z.exe && \
chmod a+x 7z.dll && \
$(call spawn,./7z.exe) x -y -onsis nsis-2.46.5-Unicode-setup.exe && \
Expand Down
34 changes: 32 additions & 2 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ New language features
---------------------

* Function call overloading: for arbitrary objects `x` (not of type
`Function`), `x(...)` is transformed into `call(x, ...)`, and `Base.call`
`Function`), `x(...)` is transformed into `call(x, ...)`, and `call`
can be overloaded as desired. Constructors are now a special case of
this mechanism, which allows e.g. constructors for abstract types.
`T(...)` falls back to `convert(T, x)`, so all `convert` methods implicitly
Expand All @@ -23,7 +23,7 @@ New language features
it operates at two different stages of evaluation. At compile time, the generated
function is called with its arguments bound to the types for which it should
specialize. The quoted expression it returns forms the body of the specialized
method which is then called at run time. ([#7311]).
method which is then called at run time ([#7311]).

* (Also with syntax todo) Documentation system for functions, methods, types
and macros in packages and user code ([#8791]). Type `?@doc` at the repl
Expand All @@ -32,6 +32,9 @@ New language features
* Varargs functions like `foo{T}(x::T...)` may now restrict the number
of such arguments using `foo{T,N}(x::Vararg{T,N})` ([#11242]).

* The syntax `function foo end` can be used to introduce a generic function without
yet adding any methods ([#8283]).

Language changes
----------------

Expand Down Expand Up @@ -117,6 +120,13 @@ Language changes
* The built-in `NTuple` type has been removed; `NTuple{N,T}` is now
implemented internally as `Tuple{Vararg{T,N}}` ([#11242]).

Command line option changes
---------------------------

* The `-i` option now forces the REPL to run after loading the specified script (if any) ([#11347]).

* New option --handle-signals={yes|no} to disable Julia's signal handlers.

Compiler improvements
---------------------

Expand Down Expand Up @@ -165,6 +175,8 @@ Library improvements

* OpenBLAS 64-bit (ILP64) interface is now compiled with a `64_` suffix ([#8734]) to avoid conflicts with external libraries using a 32-bit BLAS ([#4923]).

* New `vecdot` function, analogous to `vecnorm`, for Euclidean inner products over any iterable container ([#11067]).

* Strings

* NUL-terminated strings should now be passed to C via the new `Cstring` type, not `Ptr{UInt8}` or `Ptr{Cchar}`,
Expand Down Expand Up @@ -373,6 +385,15 @@ Deprecated or removed

* Instead of `linrange`, use `linspace` ([#9666]).

* The functions `is_valid_char`, `is_valid_ascii`, `is_valid_utf8`, `is_valid_utf16`, and
`is_valid_utf32` have been replaced by generic `isvalid` methods.
The single argument form `isvalid(value)` can now be used for values of type `Char`, `ASCIIString`,
`UTF8String`, `UTF16String` and `UTF32String`.
The two argument form `isvalid(type, value)` can be used with the above types, with values
of type `Vector{UInt8}`, `Vector{UInt16}`, `Vector{UInt32}`, and `Vector{Char}` ([#11241]).

* Instead of `utf32(64,123,...)` use `utf32(UInt32[64,123,...])` ([#11379]).

Julia v0.3.0 Release Notes
==========================

Expand Down Expand Up @@ -1321,6 +1342,7 @@ Too numerous to mention.
[#8089]: https://github.com/JuliaLang/julia/issues/8089
[#8152]: https://github.com/JuliaLang/julia/issues/8152
[#8246]: https://github.com/JuliaLang/julia/issues/8246
[#8283]: https://github.com/JuliaLang/julia/issues/8283
[#8297]: https://github.com/JuliaLang/julia/issues/8297
[#8399]: https://github.com/JuliaLang/julia/issues/8399
[#8423]: https://github.com/JuliaLang/julia/issues/8423
Expand Down Expand Up @@ -1385,6 +1407,7 @@ Too numerous to mention.
[#9779]: https://github.com/JuliaLang/julia/issues/9779
[#9862]: https://github.com/JuliaLang/julia/issues/9862
[#9957]: https://github.com/JuliaLang/julia/issues/9957
[#10008]: https://github.com/JuliaLang/julia/issues/10008
[#10024]: https://github.com/JuliaLang/julia/issues/10024
[#10031]: https://github.com/JuliaLang/julia/issues/10031
[#10075]: https://github.com/JuliaLang/julia/issues/10075
Expand Down Expand Up @@ -1412,6 +1435,13 @@ Too numerous to mention.
[#10888]: https://github.com/JuliaLang/julia/issues/10888
[#10893]: https://github.com/JuliaLang/julia/issues/10893
[#10914]: https://github.com/JuliaLang/julia/issues/10914
[#10955]: https://github.com/JuliaLang/julia/issues/10955
[#10994]: https://github.com/JuliaLang/julia/issues/10994
[#11105]: https://github.com/JuliaLang/julia/issues/11105
[#11145]: https://github.com/JuliaLang/julia/issues/11145
[#11242]: https://github.com/JuliaLang/julia/issues/11242
[#11171]: https://github.com/JuliaLang/julia/issues/11171
[#11241]: https://github.com/JuliaLang/julia/issues/11241
[#11347]: https://github.com/JuliaLang/julia/issues/11347
[#11379]: https://github.com/JuliaLang/julia/issues/11379
[#11067]: https://github.com/JuliaLang/julia/issues/11067
Loading

0 comments on commit ce1d735

Please sign in to comment.