Skip to content

Commit ec52e0c

Browse files
vchuravymaleadt
andauthored
Don't install handle_error during precompilation (#401)
Co-authored-by: Tim Besard <tim.besard@gmail.com>
1 parent b1d498b commit ec52e0c

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/core/context.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,13 @@ function handle_error(reason::Cstring)
169169
end
170170

171171
function _install_handlers()
172+
precompiling = @static if VERSION >= v"1.11"
173+
Base.generating_output()
174+
else
175+
ccall(:jl_generating_output, Cint, ()) != 0 && Base.JLOptions().incremental == 0
176+
end
177+
precompiling && return
178+
172179
handler = @cfunction(handle_error, Cvoid, (Cstring,))
173180
API.LLVMInstallFatalErrorHandler(handler)
174181
end

0 commit comments

Comments
 (0)