Skip to content

Commit

Permalink
Allow the create_app function to accept and propagate the `script::…
Browse files Browse the repository at this point in the history
…Union{Nothing, String}` kwarg (#788)
  • Loading branch information
DilumAluthge authored Apr 24, 2023
1 parent 168d65c commit c87bdcd
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/PackageCompiler.jl
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,8 @@ compiler (can also include extra arguments to the compiler, like `-g`).
- `sysimage_build_args::Cmd`: A set of command line options that is used in the Julia process building the sysimage,
for example `-O1 --check-bounds=yes`.
- `script::String`: Path to a file that gets executed in the `--output-o` process.
"""
function create_app(package_dir::String,
app_dir::String;
Expand All @@ -783,7 +785,8 @@ function create_app(package_dir::String,
cpu_target::String=default_app_cpu_target(),
include_lazy_artifacts::Bool=false,
sysimage_build_args::Cmd=``,
include_transitive_dependencies::Bool=true)
include_transitive_dependencies::Bool=true,
script::Union{Nothing, String}=nothing)
warn_official()
if filter_stdlibs && incremental
error("must use `incremental=false` to use `filter_stdlibs=true`")
Expand Down Expand Up @@ -828,7 +831,8 @@ function create_app(package_dir::String,
cpu_target,
sysimage_build_args,
include_transitive_dependencies,
extra_precompiles = join(precompiles, "\n"))
extra_precompiles = join(precompiles, "\n"),
script)

for (app_name, julia_main) in executables
create_executable_from_sysimg(joinpath(app_dir, "bin", app_name), c_driver_program, string(package_name, ".", julia_main))
Expand Down

0 comments on commit c87bdcd

Please sign in to comment.