Skip to content

Commit

Permalink
Merge pull request JuliaLang#9190 from JuliaLang/jn/win32_backtraces
Browse files Browse the repository at this point in the history
improve/fix windows backtraces and win64 memory over-consumption issue
  • Loading branch information
vtjnash committed Nov 28, 2014
2 parents ce29d78 + 06a7bb9 commit da19d45
Show file tree
Hide file tree
Showing 8 changed files with 291 additions and 108 deletions.
4 changes: 3 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,10 @@ ifeq ($(JULIA_CPU_TARGET), native)
endif

ifeq ($(OS), WINNT)
# If we are running on WINNT, also delete sys.dll until it stops causing issues (#8895, among others)
ifeq ($(ARCH),x86_64)
# If we are running on WIN64, 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 $(bindir) && \
Expand Down
2 changes: 0 additions & 2 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ init:
- git config --global core.autocrlf input

build_script:
# temporarily disable backtrace test, failing right now for win64 on master
- sed -i 's/"backtrace",//' test/runtests.jl
# Remove C:\MinGW\bin from the path, the version of MinGW installed on
# AppVeyor is not compatible with the cross-compiled Julia Windows binaries
- set PATH=%PATH:C:\MinGW\bin;=%
Expand Down
11 changes: 10 additions & 1 deletion src/codegen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3598,6 +3598,11 @@ static Function *emit_function(jl_lambda_info_t *lam, bool cstyle)
AttributeSet::FunctionIndex,*attr));
#endif
#endif

#if defined(_OS_WINDOWS_) && defined(_CPU_X86_64_) && LLVM35
f->setHasUWTable(); // force NeedsWinEH
#endif

#ifdef JL_DEBUG_BUILD
#if LLVM32 && !LLVM33
f->addFnAttr(Attributes::StackProtectReq);
Expand Down Expand Up @@ -4779,8 +4784,12 @@ extern "C" void jl_init_codegen(void)
EngineBuilder eb = EngineBuilder(engine_module);
#endif
eb .setEngineKind(EngineKind::JIT)
#if defined(_OS_WINDOWS_) && defined(_CPU_X86_64_) && !defined(USE_MCJIT)
#if defined(_OS_WINDOWS_) && defined(_CPU_X86_64_)
#if defined(USE_MCJIT)
.setMCJITMemoryManager(new RTDyldMemoryManagerWin(new SectionMemoryManager()))
#else
.setJITMemoryManager(new JITMemoryManagerWin())
#endif
#endif
.setTargetOptions(options)
#if defined(USE_MCJIT) && !defined(LLVM36)
Expand Down
Loading

0 comments on commit da19d45

Please sign in to comment.