Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Julia Windows Test Machine committed Mar 30, 2014
2 parents a23effc + 4c72a77 commit 320f20f
Show file tree
Hide file tree
Showing 25 changed files with 102 additions and 73 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ before_install:
script:
- make $BUILDOPTS prefix=/tmp/julia install
- cd .. && mv julia julia2
- cd /tmp/julia/share/julia/test && /tmp/julia/bin/julia-debug-basic runtests.jl all
- cd /tmp/julia/share/julia/test && /tmp/julia/bin/julia-debug runtests.jl all
- cd - && mv julia2 julia
- echo "Ready for packaging..."
5 changes: 2 additions & 3 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,6 @@ fPIC = -fPIC
EXE =
endif

DEFAULT_REPL = basic
JULIAGC = MARKSWEEP
USE_COPY_STACKS = 1

Expand Down Expand Up @@ -600,8 +599,8 @@ wine_pathsearch = $(firstword $(wildcard $(addsuffix /$(1),$(shell printf %s\n '
endif
pathsearch = $(firstword $(wildcard $(addsuffix /$(1),$(subst :, ,$(2)))))

JULIA_EXECUTABLE_debug = $(build_bindir)/julia-debug-$(DEFAULT_REPL)$(EXE)
JULIA_EXECUTABLE_release = $(build_bindir)/julia-$(DEFAULT_REPL)$(EXE)
JULIA_EXECUTABLE_debug = $(build_bindir)/julia-debug$(EXE)
JULIA_EXECUTABLE_release = $(build_bindir)/julia$(EXE)

ifeq ($(OS), WINNT)
JULIA_EXECUTABLE = $(JULIA_EXECUTABLE_release)
Expand Down
13 changes: 6 additions & 7 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ debug release: | $(DIRS) $(build_datarootdir)/julia/base $(build_datarootdir)/ju
$(MAKE) $(QUIET_MAKE) LD_LIBRARY_PATH=$(build_libdir):$(LD_LIBRARY_PATH) JULIA_EXECUTABLE="$(JULIA_EXECUTABLE_$@)" $(build_private_libdir)/sys.$(SHLIB_EXT)

julia-debug-symlink:
@ln -sf $(build_bindir)/julia-debug-$(DEFAULT_REPL) julia
@ln -sf $(build_bindir)/julia-debug julia

julia-release-symlink:
@ln -sf $(build_bindir)/julia-$(DEFAULT_REPL) julia
@ln -sf $(build_bindir)/julia julia

julia-debug julia-release: git-submodules
@$(MAKE) $(QUIET_MAKE) -C deps
Expand Down Expand Up @@ -177,7 +177,6 @@ ifeq ($(OS),WINNT)
-$(INSTALL_M) $(build_bindir)/*.dll $(build_bindir)/*.bat $(DESTDIR)$(bindir)/
else
-cp -a $(build_libexecdir) $(DESTDIR)$(prefix)
cd $(DESTDIR)$(bindir) && ln -sf julia-$(DEFAULT_REPL) julia

for suffix in $(JL_LIBS) ; do \
$(INSTALL_M) $(build_libdir)/lib$${suffix}*.$(SHLIB_EXT)* $(DESTDIR)$(private_libdir) ; \
Expand Down Expand Up @@ -211,27 +210,27 @@ endif
# Update RPATH entries of Julia if $(private_libdir_rel) != $(build_private_libdir_rel)
ifneq ($(private_libdir_rel),$(build_private_libdir_rel))
ifeq ($(OS), Darwin)
for julia in $(DESTDIR)$(bindir)/julia-* ; do \
for julia in $(DESTDIR)$(bindir)/julia* ; do \
install_name_tool -rpath @executable_path/$(build_private_libdir_rel) @executable_path/$(private_libdir_rel) $$julia; \
install_name_tool -rpath @executable_path/$(build_libdir_rel) @executable_path/$(libdir_rel) $$julia; \
done
else ifeq ($(OS), Linux)
for julia in $(DESTDIR)$(bindir)/julia-* ; do \
for julia in $(DESTDIR)$(bindir)/julia* ; do \
patchelf --set-rpath '$$ORIGIN/$(private_libdir_rel):$$ORIGIN/$(libdir_rel)' $$julia; \
done
endif
endif

# Overwrite JL_SYSTEM_IMAGE_PATH in julia binaries:
for julia in $(DESTDIR)$(bindir)/julia-* ; do \
for julia in $(DESTDIR)$(bindir)/julia* ; do \
$(build_bindir)/stringpatch $$(strings -t x - $$julia | grep "sys.ji$$" | awk '{print $$1;}' ) "$(private_libdir_rel)/sys.ji" 256 $(call cygpath_w,$$julia); \
done

mkdir -p $(DESTDIR)$(sysconfdir)
cp -R $(build_sysconfdir)/julia $(DESTDIR)$(sysconfdir)/

dist-clean:
rm -fr julia-*.tar.gz julia-*.exe julia-*.7z julia-$(JULIA_COMMIT)
rm -fr julia-*.tar.gz julia*.exe julia-*.7z julia-$(JULIA_COMMIT)

dist: dist-clean
ifeq ($(USE_SYSTEM_BLAS),0)
Expand Down
9 changes: 4 additions & 5 deletions README.windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ Julia runs on Windows XP SP2 or later (including Windows Vista, Windows 7, and W
- Using the Julia executables directly
```
usr/bin/julia-basic
usr/bin/julia
```
## Cross-compiling
Expand Down Expand Up @@ -246,10 +246,9 @@ Finally, the build and install process for Julia:
1. `git clone https://github.com/JuliaLang/julia.git julia-win32`
2. `echo override XC_HOST = i686-w64-mingw32 >> Make.user`
3. `echo override DEFAULT_REPL = basic >> Make.user`
4. `make`
5. `make win-extras` (Necessary before running `make dist`p)
4. `make dist`
3. `make`
4. `make win-extras` (Necessary before running `make dist`p)
5. `make dist`
6. move the julia-* directory / zip file to the target machine
If you are building for 64-bit windows, the steps are essentially the same. Just replace i686 in XC_HOST with x86_64. (note: on Mac, wine only runs in 32-bit mode)
4 changes: 2 additions & 2 deletions base/REPL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,7 @@ function respond(f,d,main,req,rep)
if !isempty(line)
reset(d)
(val,bt) = send_to_backend(f(line),req,rep)
if !ends_with_semicolon(line)
if !ends_with_semicolon(line) || !is(bt,nothing)
print_response(d,val,bt,true,have_color(s))
end
end
Expand Down Expand Up @@ -522,7 +522,7 @@ function setup_interface(d::REPLDisplay,req,rep;extra_repl_keymap=Dict{Any,Any}[
input = replace(input,'\r','\n')
if position(LineEdit.buffer(s)) == 0
indent = Base.indentation(input)[1]
input = Base.unindent(input[(indent+1):end],indent)
input = Base.unindent(lstrip(input),indent)
end
buf = copy(LineEdit.buffer(s))
edit_insert(buf,input)
Expand Down
10 changes: 4 additions & 6 deletions base/file.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@

function pwd()
b = Array(Uint8,1024)
@unix_only p = ccall(:getcwd, Ptr{Uint8}, (Ptr{Uint8}, Csize_t), b, length(b))
@windows_only p = ccall(:_getcwd, Ptr{Uint8}, (Ptr{Uint8}, Cint), b, length(b))
systemerror(:getcwd, p == C_NULL)
bytestring(p)
len = Csize_t[length(b),]
uv_error(:getcwd, ccall(:uv_cwd, Cint, (Ptr{Uint8}, Ptr{Csize_t}), b, len))
bytestring(b[1:len[1]])
end

function cd(dir::String)
@windows_only systemerror("chdir $dir", ccall(:_chdir,Int32,(Ptr{Uint8},),dir) == -1)
@unix_only systemerror("chdir $dir", ccall(:chdir,Int32,(Ptr{Uint8},),dir) == -1)
uv_error("chdir $dir", ccall(:uv_chdir, Cint, (Ptr{Uint8},), bytestring(dir)))
end
cd() = cd(homedir())

Expand Down
15 changes: 14 additions & 1 deletion base/multi.jl
Original file line number Diff line number Diff line change
Expand Up @@ -797,8 +797,10 @@ function create_message_handler_loop(sock::AsyncStream) #returns immediately
schedule(@task begin
global PGRP
#println("message_handler_loop")
disable_nagle(sock)
start_reading(sock)
wait_connected(sock)

try
while true
msg = deserialize(sock)
Expand Down Expand Up @@ -943,6 +945,7 @@ function start_worker(out::IO)
disable_threaded_libs()

ccall(:jl_install_sigint_handler, Void, ())
disable_nagle(sock)

try
check_master_connect(60.0)
Expand Down Expand Up @@ -1169,7 +1172,7 @@ end
# to be mutually reachable without a tunnel, as is often the case in a cluster.
function addprocs_internal(np::Integer;
tunnel=false, dir=JULIA_HOME,
exename=(ccall(:jl_is_debugbuild,Cint,())==0?"./julia-basic":"./julia-debug-basic"),
exename=(ccall(:jl_is_debugbuild,Cint,())==0?"./julia":"./julia-debug"),
sshflags::Cmd=``, cman=LocalManager(), exeflags=``)

config={:dir=>dir, :exename=>exename, :exeflags=>`$exeflags --worker`, :tunnel=>tunnel, :sshflags=>sshflags}
Expand Down Expand Up @@ -1524,3 +1527,13 @@ function interrupt(pids::AbstractVector=workers())
end
end

function disable_nagle(sock)
# disable nagle on all OSes
ccall(:uv_tcp_nodelay, Cint, (Ptr{Void}, Cint), sock.handle, 1)
@linux_only begin
# tcp_quickack is a linux only option
if ccall(:jl_tcp_quickack, Cint, (Ptr{Void}, Cint), sock.handle, 1) < 0
warn("Error enabling TCP_QUICKACK : ", strerror(errno))
end
end
end
2 changes: 1 addition & 1 deletion base/pkg/entry.jl
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ function updatehook(pkgs::Vector)
""")
end

const JULIA = joinpath(JULIA_HOME, "julia-basic")
const JULIA = joinpath(JULIA_HOME, "julia")

function test!(pkg::String, errs::Vector{String}, notests::Vector{String})
const reqs_path = abspath(pkg,"test","REQUIRE")
Expand Down
2 changes: 1 addition & 1 deletion contrib/debug_bootstrap.gdb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
file ../usr/bin/julia-debug-basic
file ../usr/bin/julia-debug
r --build ../usr/lib/julia/sys0.bc sysimg.jl
bt
2 changes: 1 addition & 1 deletion contrib/vagrant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ downloaded during provisioning. To take advantage of these dependencies, use
the `jlmake` alias in place of `make`.

When the build is complete, you can run
`~/julia/usr/bin/julia-basic` to start Julia.
`~/julia/usr/bin/julia` to start Julia.
2 changes: 1 addition & 1 deletion contrib/windows/build-installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ Section "Dummy Section" SecDummy
SetOutPath $INSTDIR
File /a /r "julia-${Commit}\*"
WriteUninstaller "$INSTDIR\Uninstall.exe"
CreateShortcut "$INSTDIR\julia.lnk" "$INSTDIR\bin\julia-basic.exe"
CreateShortcut "$INSTDIR\julia.lnk" "$INSTDIR\bin\julia.exe"
SectionEnd

Section "uninstall"
Expand Down
2 changes: 1 addition & 1 deletion contrib/windows/prepare-julia-env.bat
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

set SYS_PATH=%PATH%
set PATH=%~dp0;%~dp0bin;%~dp0usr\bin;%~dp0..\usr\bin;%~dp0..\..\usr\bin;%SYS_PATH%
set JULIA_EXE=julia-basic.exe
set JULIA_EXE=julia.exe
for %%A in (%JULIA_EXE%) do set JULIA_HOME=%%~dp$PATH:A
set JULIA=%JULIA_HOME%%JULIA_EXE%
set PATH=%SYS_PATH%
Expand Down
2 changes: 1 addition & 1 deletion contrib/windows/test-julia.bat
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pushd %cd%
setlocal enableextensions enabledelayedexpansion
call "%~dp0prepare-julia-env.bat" %tests%
cd "%JULIA_HOME%..\share\julia\test"
call "%JULIA_HOME%julia-basic.exe" runtests.jl %tests%
call "%JULIA_HOME%julia.exe" runtests.jl %tests%
endlocal
popd
pause
Expand Down
2 changes: 1 addition & 1 deletion deps/libuv
Submodule libuv updated 67 files
+13 −9 .gitignore
+2 −0 .mailmap
+17 −0 AUTHORS
+128 −0 ChangeLog
+3 −1 Makefile.am
+329 −222 Makefile.in
+6 −3 Makefile.mingw
+1 −1 README.md
+308 −393 aclocal.m4
+1 −1 autogen.sh
+1 −0 checksparse.sh
+341 −401 configure
+3 −3 configure.ac
+13 −0 include/pthread-fixes.h
+24 −0 include/uv-errno.h
+4 −2 include/uv-unix.h
+2 −2 include/uv-version.h
+5 −5 include/uv-win.h
+102 −67 include/uv.h
+1 −1 libuv.pc.in
+11 −11 m4/dtrace.m4
+1 −1 m4/libuv-extra-automake-flags.m4
+25 −0 src/fs-poll.c
+104 −7 src/unix/core.c
+161 −19 src/unix/fs.c
+1 −1 src/unix/fsevents.c
+13 −1 src/unix/internal.h
+8 −8 src/unix/kqueue.c
+3 −3 src/unix/linux-inotify.c
+57 −0 src/unix/linux-syscalls.c
+3 −0 src/unix/linux-syscalls.h
+1 −1 src/unix/loop.c
+60 −0 src/unix/pipe.c
+6 −12 src/unix/process.c
+23 −0 src/unix/pthread-fixes.c
+167 −127 src/unix/stream.c
+5 −5 src/unix/sunos.c
+50 −15 src/unix/tty.c
+20 −0 src/uv-common.c
+4 −2 src/win/core.c
+25 −25 src/win/fs-event.c
+91 −43 src/win/fs.c
+1 −3 src/win/internal.h
+213 −67 src/win/pipe.c
+6 −2 src/win/poll.c
+1 −1 src/win/process.c
+5 −3 src/win/signal.c
+3 −25 src/win/stream.c
+3 −3 src/win/tcp.c
+1 −1 src/win/tty.c
+22 −5 src/win/util.c
+4 −3 src/win/winsock.c
+0 −127 test-driver
+15 −12 test/benchmark-multi-accept.c
+29 −4 test/task.h
+3 −3 test/test-cwd-and-chdir.c
+35 −1 test/test-fs-event.c
+39 −0 test/test-fs-poll.c
+79 −32 test/test-fs.c
+25 −15 test/test-ipc-send-recv.c
+26 −15 test/test-ipc.c
+12 −0 test/test-list.h
+122 −0 test/test-pipe-getsockname.c
+169 −0 test/test-pipe-sendmsg.c
+6 −5 test/test-spawn.c
+2 −0 uv.gyp
+3 −4 vcbuild.bat
1 change: 0 additions & 1 deletion doc/man/julia-basic.1

This file was deleted.

4 changes: 1 addition & 3 deletions doc/man/julia.1
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

.\" from the front page of https://julialang.org/
.SH NAME
julia, julia-basic - high-level, high-performance dynamic programming language for technical computing
julia - high-level, high-performance dynamic programming language for technical computing

.SH SYNOPSIS
julia [option] [program] [args..]
Expand All @@ -50,8 +50,6 @@ For a more in-depth discussion of the rationale and advantages of Julia
over other systems, please see the online manual:
https://docs.julialang.org/en/latest/manual/

\fBjulia\fP is an alias for \fBjulia-basic\fP.

If a Julia source file is given as \fIprogram\fP (possibly with arguments in
\fIargs\fP) then, instead of launching an interactive session, Julia executes
the program and exits.
Expand Down
4 changes: 2 additions & 2 deletions doc/manual/faq.rst
Original file line number Diff line number Diff line change
Expand Up @@ -656,7 +656,7 @@ Now:
- From a shell (called shell 1), type ``xterm -e oterm &``. You'll see
a new window pop up; this will be called terminal 2.

- From within shell 1, ``gdb julia-debug-basic``. You can find this
- From within shell 1, ``gdb julia-debug``. You can find this
executable within ``julia/usr/bin``.

- From within shell 1, ``(gdb) tty /dev/pts/#`` where ``#`` is the
Expand All @@ -679,7 +679,7 @@ Now:
Within emacs
^^^^^^^^^^^^

- ``M-x gdb``, then enter ``julia-debug-basic`` (this is easiest from
- ``M-x gdb``, then enter ``julia-debug`` (this is easiest from
within julia/usr/bin, or you can specify the full path)

- ``(gdb) run``
Expand Down
2 changes: 1 addition & 1 deletion src/intrinsics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1253,7 +1253,7 @@ static Value *emit_intrinsic(intrinsic f, jl_value_t **args, size_t nargs,
HANDLE(powi_llvm,2) {
x = FP(x);
y = JL_INT(y);
Type *ts[2] = { x->getType(), T_int32 };
Type *ts[1] = { x->getType() };
return builder.CreateCall2(Intrinsic::getDeclaration(jl_Module, Intrinsic::powi,
ArrayRef<Type*>(ts)),
x, y);
Expand Down
Loading

0 comments on commit 320f20f

Please sign in to comment.