Skip to content

Commit ece781c

Browse files
committed
Use the same default CPU target as PackageCompiler
Trying to fix #33. I was hoping it was just a matter of changing the defaults, but it seems to cause segfaults for me running testset "Programmatic binary (trim)" locally on Windows.
1 parent 1dd04b4 commit ece781c

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

src/compiling.jl

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,11 @@ function compile_products(recipe::ImageRecipe)
6161
recipe.add_ccallables = true
6262
end
6363
if recipe.cpu_target === nothing
64-
recipe.cpu_target = get(ENV,"JULIA_CPU_TARGET", nothing)
64+
default_cpu_target = PackageCompiler.default_app_cpu_target()
65+
recipe.cpu_target = get(ENV, "JULIA_CPU_TARGET", default_cpu_target)
6566
end
6667
julia_cmd = `$(Base.julia_cmd(;cpu_target=recipe.cpu_target)) --startup-file=no --history-file=no`
67-
if recipe.cpu_target !== nothing
68-
precompile_cpu_target = String(first(split(recipe.cpu_target, [';',','])))
69-
else
70-
precompile_cpu_target = nothing
71-
end
68+
precompile_cpu_target = String(first(split(recipe.cpu_target, [';',','])))
7269
# Ensure the app project is instantiated and precompiled
7370
if isdir(recipe.file)
7471
if recipe.project != ""

0 commit comments

Comments
 (0)