Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions src/compiling.jl
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,11 @@ function compile_products(recipe::ImageRecipe)
get!(recipe.jl_options, "threads", "1")
end
if recipe.cpu_target === nothing
recipe.cpu_target = get(ENV,"JULIA_CPU_TARGET", nothing)
default_cpu_target = PackageCompiler.default_app_cpu_target()
recipe.cpu_target = get(ENV, "JULIA_CPU_TARGET", default_cpu_target)
end
julia_cmd = `$(Base.julia_cmd(;cpu_target=recipe.cpu_target)) --startup-file=no --history-file=no`
if recipe.cpu_target !== nothing
precompile_cpu_target = String(first(split(recipe.cpu_target, [';',','])))
else
precompile_cpu_target = nothing
end
precompile_cpu_target = String(first(split(recipe.cpu_target, [';',','])))
# Ensure the app project is instantiated and precompiled
if isdir(recipe.file)
if recipe.project != ""
Expand Down
4 changes: 2 additions & 2 deletions test/trimming.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ const TRIM_PROJ = abspath(joinpath(@__DIR__, "TrimmabilityProject"))
actual_exe = Sys.iswindows() ? joinpath(outdir, "bin", basename(exeout) * ".exe") : joinpath(outdir, "bin", basename(exeout))
@test isfile(actual_exe)

# Test that the executable size stays reasonable (< 2.5MB for the executable itself)
@test filesize(actual_exe) < 2_500_000
# Test that the executable size stays reasonable (< 3.5MB for the executable itself)
@test filesize(actual_exe) < 3_500_000

print_tree_with_sizes(outdir)
end
Expand Down