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
  • Loading branch information
DilumAluthge authored Feb 15, 2023
1 parent df35434 commit 7bb4548
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 @@ -745,6 +745,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 @@ -758,7 +760,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()
# We call this at the very beginning to make sure that the user has a compiler available. Therefore, if no compiler
# is found, we throw an error immediately, instead of making the user wait a while before the error is thrown.
Expand Down Expand Up @@ -800,7 +803,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 7bb4548

Please sign in to comment.