Skip to content

Commit

Permalink
Restore building sys.dll on Windows, but switch default value
Browse files Browse the repository at this point in the history
for --precompiled option to only load it if explicitly requested
since backtraces are still a problem with llvm 3.3
  • Loading branch information
tkelman committed Jun 30, 2015
1 parent c415826 commit f98decc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 19 deletions.
5 changes: 0 additions & 5 deletions Make.inc
Original file line number Diff line number Diff line change
Expand Up @@ -384,12 +384,7 @@ endif


# if not absolute, then relative to the directory of the julia executable
# on windows, use .ji by default
ifeq ($(OS),WINNT)
JCPPFLAGS += "-DJL_SYSTEM_IMAGE_PATH=\"$(build_private_libdir_rel)/sys.ji\""
else
JCPPFLAGS += "-DJL_SYSTEM_IMAGE_PATH=\"$(build_private_libdir_rel)/sys.$(SHLIB_EXT)\""
endif

# On Windows, we want shared library files to end up in $(build_bindir), instead of $(build_libdir)
ifeq ($(OS),WINNT)
Expand Down
14 changes: 0 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -182,11 +182,6 @@ $(build_private_libdir)/inference.o: $(build_private_libdir)/inference0.$(SHLIB_
$(call spawn,$(JULIA_EXECUTABLE)) -C $(JULIA_CPU_TARGET) --output-o $(call cygpath_w,$(build_private_libdir)/inference.o) -f \
-J $(call cygpath_w,$(build_private_libdir)/inference0.$(SHLIB_EXT)) coreimg.jl)

# on windows, also generate a .ji file so we can delete the .dll
ifeq ($(OS),WINNT)
JULIA_SYSIMG_BUILD_FLAGS += --output-ji $(call cygpath_w,$(build_private_libdir)/sys.ji)
endif

COMMA:=,
$(build_private_libdir)/sys.o: VERSION $(BASE_SRCS) $(build_docdir)/helpdb.jl $(build_private_libdir)/inference.$(SHLIB_EXT)
@$(call PRINT_JULIA, cd base && \
Expand Down Expand Up @@ -363,15 +358,9 @@ else ifeq ($(OS), Linux)
endif

# Overwrite JL_SYSTEM_IMAGE_PATH in julia library
ifeq ($(OS),WINNT)
for julia in $(DESTDIR)$(private_libdir)/libjulia*.$(SHLIB_EXT) ; do \
$(call spawn,$(build_bindir)/stringreplace $$(strings -t x - $$julia | grep "sys.ji$$" | awk '{print $$1;}' ) "$(private_libdir_rel)/sys.ji" 256 $(call cygpath_w,$$julia)); \
done
else
for julia in $(DESTDIR)$(private_libdir)/libjulia*.$(SHLIB_EXT) ; do \
$(call spawn,$(build_bindir)/stringreplace $$(strings -t x - $$julia | grep "sys.$(SHLIB_EXT)$$" | awk '{print $$1;}' ) "$(private_libdir_rel)/sys.$(SHLIB_EXT)" 256 $(call cygpath_w,$$julia)); \
done
endif
endif

mkdir -p $(DESTDIR)$(sysconfdir)
Expand Down Expand Up @@ -417,9 +406,6 @@ ifeq ($(JULIA_CPU_TARGET), native)
endif

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

[ ! -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) && \
mkdir $(DESTDIR)$(prefix)/Git && \
Expand Down
5 changes: 5 additions & 0 deletions src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,12 @@ jl_options_t jl_options = { 0, // quiet
JL_OPTIONS_FAST_MATH_DEFAULT,
0, // worker
JL_OPTIONS_HANDLE_SIGNALS_ON,
#ifdef _OS_WINDOWS_
// TODO remove this when using LLVM 3.5+
JL_OPTIONS_USE_PRECOMPILED_NO,
#else
JL_OPTIONS_USE_PRECOMPILED_YES,
#endif
NULL, // bindto
NULL, // outputbc
NULL, // outputo
Expand Down

0 comments on commit f98decc

Please sign in to comment.