@@ -549,6 +549,9 @@ compiler.
549549
550550### Keyword arguments:
551551
552+ - `app_name::String`: an alternative name for the compiled app. If not provided,
553+ the name of the package (as specified in Project.toml) is used.
554+
552555- `precompile_execution_file::Union{String, Vector{String}}`: A file or list of
553556 files that contain code which precompilation statements should be recorded from.
554557
@@ -573,6 +576,7 @@ compiler.
573576"""
574577function create_app (package_dir:: String ,
575578 app_dir:: String ;
579+ app_name= nothing ,
576580 precompile_execution_file:: Union{String, Vector{String}} = String[],
577581 precompile_statements_file:: Union{String, Vector{String}} = String[],
578582 incremental= false ,
@@ -590,7 +594,10 @@ function create_app(package_dir::String,
590594 if ctx. env. pkg === nothing
591595 error (" expected package to have a `name`-entry" )
592596 end
593- app_name = ctx. env. pkg. name
597+ sysimg_name = ctx. env. pkg. name
598+ if app_name === nothing
599+ app_name = sysimg_name
600+ end
594601 sysimg_file = app_name * " ." * Libdl. dlext
595602 if isdir (app_dir)
596603 if ! force
@@ -621,15 +628,15 @@ function create_app(package_dir::String,
621628 incremental= false , filter_stdlibs= filter_stdlibs,
622629 cpu_target= cpu_target)
623630
624- create_sysimage (Symbol (app_name ); sysimage_path= sysimg_file, project= package_dir,
631+ create_sysimage (Symbol (sysimg_name ); sysimage_path= sysimg_file, project= package_dir,
625632 incremental= true ,
626633 precompile_execution_file= precompile_execution_file,
627634 precompile_statements_file= precompile_statements_file,
628635 cpu_target= cpu_target,
629636 base_sysimage= tmp_base_sysimage,
630637 isapp= true )
631638 else
632- create_sysimage (Symbol (app_name ); sysimage_path= sysimg_file, project= package_dir,
639+ create_sysimage (Symbol (sysimg_name ); sysimage_path= sysimg_file, project= package_dir,
633640 incremental= incremental, filter_stdlibs= filter_stdlibs,
634641 precompile_execution_file= precompile_execution_file,
635642 precompile_statements_file= precompile_statements_file,
0 commit comments