Skip to content

Commit

Permalink
Allow user to customize cpu_target in create_app (#101)
Browse files Browse the repository at this point in the history
Co-authored-by: Dilum Aluthge <dilum@aluthge.com>
  • Loading branch information
KristofferC and DilumAluthge committed Feb 9, 2020
1 parent 4d62801 commit 155f977
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/PackageCompilerX.jl
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,8 @@ function create_app(package_dir::String,
incremental=false,
filter_stdlibs=false,
audit=true,
force=false)
force=false,
cpu_target::String=APP_CPU_TARGET)
precompile_statements_file = abspath.(precompile_statements_file)
package_dir = abspath(package_dir)
ctx = create_pkg_context(package_dir)
Expand Down Expand Up @@ -541,21 +542,21 @@ function create_app(package_dir::String,
tmp_base_sysimage = joinpath(tmp, "tmp_sys.so")
create_sysimage(Symbol[]; sysimage_path=tmp_base_sysimage, project=package_dir,
incremental=false, filter_stdlibs=filter_stdlibs,
cpu_target=APP_CPU_TARGET)
cpu_target=cpu_target)

create_sysimage(Symbol(app_name); sysimage_path=sysimg_file, project=package_dir,
incremental=true,
precompile_execution_file=precompile_execution_file,
precompile_statements_file=precompile_statements_file,
cpu_target=APP_CPU_TARGET,
cpu_target=cpu_target,
base_sysimage=tmp_base_sysimage,
isapp=true)
else
create_sysimage(Symbol(app_name); sysimage_path=sysimg_file, project=package_dir,
incremental=incremental, filter_stdlibs=filter_stdlibs,
precompile_execution_file=precompile_execution_file,
precompile_statements_file=precompile_statements_file,
cpu_target=APP_CPU_TARGET,
cpu_target=cpu_target,
isapp=true)
end
create_executable_from_sysimg(; sysimage_path=sysimg_file, executable_path=app_name)
Expand Down

0 comments on commit 155f977

Please sign in to comment.