Skip to content

Commit 4ffa03a

Browse files
Call get_compiler_cmd() at the beginning of create_sysimage and create_app (#770)
Co-authored-by: Ian Butterworth <[email protected]> Co-authored-by: Ian Butterworth <[email protected]>
1 parent 05f6854 commit 4ffa03a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/PackageCompiler.jl

+6
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,9 @@ function create_sysimage(packages::Union{Nothing, Symbol, Vector{String}, Vector
483483
compat_level::String="major",
484484
extra_precompiles::String = "",
485485
)
486+
# We call this at the very beginning to make sure that the user has a compiler available. Therefore, if no compiler
487+
# is found, we throw an error immediately, instead of making the user wait a while before the error is thrown.
488+
get_compiler_cmd()
486489

487490
if filter_stdlibs && incremental
488491
error("must use `incremental=false` to use `filter_stdlibs=true`")
@@ -748,6 +751,9 @@ function create_app(package_dir::String,
748751
sysimage_build_args::Cmd=``,
749752
include_transitive_dependencies::Bool=true)
750753
warn_official()
754+
# We call this at the very beginning to make sure that the user has a compiler available. Therefore, if no compiler
755+
# is found, we throw an error immediately, instead of making the user wait a while before the error is thrown.
756+
get_compiler_cmd()
751757

752758
ctx = create_pkg_context(package_dir)
753759
ctx.env.pkg === nothing && error("expected package to have a `name`-entry")

0 commit comments

Comments
 (0)