@@ -220,8 +220,7 @@ function rewrite_sysimg_jl_only_needed_stdlibs(stdlibs::Vector{String})
220
220
r" stdlibs = \[ (.*?)\] " s => string (" stdlibs = [" , join (" :" .* stdlibs, " ,\n " ), " ]" ))
221
221
end
222
222
223
- function create_fresh_base_sysimage (stdlibs:: Vector{String} ; cpu_target:: String ,
224
- sysimage_build_args:: Cmd , sysimage_build_prefix:: Cmd )
223
+ function create_fresh_base_sysimage (stdlibs:: Vector{String} ; cpu_target:: String , sysimage_build_args:: Cmd )
225
224
tmp = mktempdir ()
226
225
sysimg_source_path = Base. find_source_file (" sysimg.jl" )
227
226
base_dir = dirname (sysimg_source_path)
@@ -239,7 +238,7 @@ function create_fresh_base_sysimage(stdlibs::Vector{String}; cpu_target::String,
239
238
TerminalSpinners. @spin spinner begin
240
239
cd (base_dir) do
241
240
# Create corecompiler.ji
242
- cmd = ` $sysimage_build_prefix $ (get_julia_cmd ()) --cpu-target $cpu_target
241
+ cmd = ` $(get_julia_cmd ()) --cpu-target $cpu_target
243
242
--output-ji $tmp_corecompiler_ji $sysimage_build_args
244
243
$compiler_source_path `
245
244
@debug " running $cmd "
@@ -252,7 +251,7 @@ function create_fresh_base_sysimage(stdlibs::Vector{String}; cpu_target::String,
252
251
new_sysimage_source_path = joinpath (tmp, " sysimage_packagecompiler_$(uuid1 ()) .jl" )
253
252
write (new_sysimage_source_path, new_sysimage_content)
254
253
try
255
- cmd = ` $sysimage_build_prefix $ (get_julia_cmd ()) --cpu-target $cpu_target
254
+ cmd = ` $(get_julia_cmd ()) --cpu-target $cpu_target
256
255
--sysimage=$tmp_corecompiler_ji
257
256
$sysimage_build_args --output-ji=$tmp_sys_ji
258
257
$new_sysimage_source_path `
@@ -304,7 +303,6 @@ function create_sysimg_object_file(object_file::String,
304
303
cpu_target:: String ,
305
304
script:: Union{Nothing, String} ,
306
305
sysimage_build_args:: Cmd ,
307
- sysimage_build_prefix:: Cmd ,
308
306
extra_precompiles:: String ,
309
307
incremental:: Bool )
310
308
julia_code_buffer = IOBuffer ()
@@ -431,7 +429,7 @@ function create_sysimg_object_file(object_file::String,
431
429
write (outputo_file, julia_code)
432
430
# Read the input via stdin to avoid hitting the maximum command line limit
433
431
434
- cmd = ` $sysimage_build_prefix $ (get_julia_cmd ()) --cpu-target=$cpu_target $sysimage_build_args
432
+ cmd = ` $(get_julia_cmd ()) --cpu-target=$cpu_target $sysimage_build_args
435
433
--sysimage=$base_sysimage --project=$project --output-o=$(object_file)
436
434
$outputo_file `
437
435
@debug " running $cmd "
@@ -489,9 +487,6 @@ compiler (can also include extra arguments to the compiler, like `-g`).
489
487
490
488
- `sysimage_build_args::Cmd`: A set of command line options that is used in the Julia process building the sysimage,
491
489
for example `-O1 --check-bounds=yes`.
492
-
493
- - `sysimage_build_prefix::Cmd`: A set of commands and command line options that will be
494
- prefixed to the call to Julia for building the sysimage, for example `srun -n 1`.
495
490
"""
496
491
function create_sysimage (packages:: Union{Nothing, Symbol, Vector{String}, Vector{Symbol}} = nothing ;
497
492
sysimage_path:: String ,
@@ -503,7 +498,6 @@ function create_sysimage(packages::Union{Nothing, Symbol, Vector{String}, Vector
503
498
cpu_target:: String = NATIVE_CPU_TARGET,
504
499
script:: Union{Nothing, String} = nothing ,
505
500
sysimage_build_args:: Cmd = ` ` ,
506
- sysimage_build_prefix:: Cmd = ` ` ,
507
501
include_transitive_dependencies:: Bool = true ,
508
502
# Internal args
509
503
base_sysimage:: Union{Nothing, String} = nothing ,
@@ -551,8 +545,7 @@ function create_sysimage(packages::Union{Nothing, Symbol, Vector{String}, Vector
551
545
error (" cannot specify `base_sysimage` when `incremental=false`" )
552
546
end
553
547
sysimage_stdlibs = filter_stdlibs ? gather_stdlibs_project (ctx) : stdlibs_in_sysimage ()
554
- base_sysimage = create_fresh_base_sysimage (sysimage_stdlibs; cpu_target,
555
- sysimage_build_args, sysimage_build_prefix)
548
+ base_sysimage = create_fresh_base_sysimage (sysimage_stdlibs; cpu_target, sysimage_build_args)
556
549
else
557
550
base_sysimage = something (base_sysimage, unsafe_string (Base. JLOptions (). image_file))
558
551
end
@@ -610,7 +603,6 @@ function create_sysimage(packages::Union{Nothing, Symbol, Vector{String}, Vector
610
603
cpu_target,
611
604
script,
612
605
sysimage_build_args,
613
- sysimage_build_prefix,
614
606
extra_precompiles,
615
607
incremental)
616
608
object_files = [object_file]
@@ -796,9 +788,6 @@ compiler (can also include extra arguments to the compiler, like `-g`).
796
788
- `sysimage_build_args::Cmd`: A set of command line options that is used in the Julia process building the sysimage,
797
789
for example `-O1 --check-bounds=yes`.
798
790
799
- - `sysimage_build_prefix::Cmd`: A set of commands and command line options that will be
800
- prefixed to the call to Julia for building the sysimage, for example `srun -n 1`.
801
-
802
791
- `script::String`: Path to a file that gets executed in the `--output-o` process.
803
792
"""
804
793
function create_app (package_dir:: String ,
@@ -813,7 +802,6 @@ function create_app(package_dir::String,
813
802
cpu_target:: String = default_app_cpu_target (),
814
803
include_lazy_artifacts:: Bool = false ,
815
804
sysimage_build_args:: Cmd = ` ` ,
816
- sysimage_build_prefix:: Cmd = ` ` ,
817
805
include_transitive_dependencies:: Bool = true ,
818
806
include_preferences:: Bool = true ,
819
807
script:: Union{Nothing, String} = nothing )
@@ -863,7 +851,6 @@ function create_app(package_dir::String,
863
851
precompile_statements_file,
864
852
cpu_target,
865
853
sysimage_build_args,
866
- sysimage_build_prefix,
867
854
include_transitive_dependencies,
868
855
extra_precompiles = join (precompiles, " \n " ),
869
856
script)
@@ -999,9 +986,6 @@ compiler (can also include extra arguments to the compiler, like `-g`).
999
986
1000
987
- `sysimage_build_args::Cmd`: A set of command line options that is used in the Julia process building the sysimage,
1001
988
for example `-O1 --check-bounds=yes`.
1002
-
1003
- - `sysimage_build_prefix::Cmd`: A set of commands and command line options that will be
1004
- prefixed to the call to Julia for building the sysimage, for example `srun -n 1`.
1005
989
"""
1006
990
function create_library (package_or_project:: String ,
1007
991
dest_dir:: String ;
@@ -1019,7 +1003,6 @@ function create_library(package_or_project::String,
1019
1003
cpu_target:: String = default_app_cpu_target (),
1020
1004
include_lazy_artifacts:: Bool = false ,
1021
1005
sysimage_build_args:: Cmd = ` ` ,
1022
- sysimage_build_prefix:: Cmd = ` ` ,
1023
1006
include_transitive_dependencies:: Bool = true ,
1024
1007
include_preferences:: Bool = true ,
1025
1008
script:: Union{Nothing,String} = nothing
@@ -1070,8 +1053,7 @@ function create_library(package_or_project::String,
1070
1053
1071
1054
create_sysimage_workaround (ctx, sysimg_path, precompile_execution_file,
1072
1055
precompile_statements_file, incremental, filter_stdlibs, cpu_target;
1073
- sysimage_build_args, sysimage_build_prefix,
1074
- include_transitive_dependencies, julia_init_c_file,
1056
+ sysimage_build_args, include_transitive_dependencies, julia_init_c_file,
1075
1057
julia_init_h_file, version, soname, script)
1076
1058
1077
1059
if version != = nothing && Sys. isunix ()
@@ -1131,7 +1113,6 @@ function create_sysimage_workaround(
1131
1113
filter_stdlibs:: Bool ,
1132
1114
cpu_target:: String ;
1133
1115
sysimage_build_args:: Cmd ,
1134
- sysimage_build_prefix:: Cmd ,
1135
1116
include_transitive_dependencies:: Bool ,
1136
1117
julia_init_c_file:: Union{Nothing,String,Vector{String}} ,
1137
1118
julia_init_h_file:: Union{Nothing,String,Vector{String}} ,
@@ -1170,7 +1151,6 @@ function create_sysimage_workaround(
1170
1151
version,
1171
1152
soname,
1172
1153
sysimage_build_args,
1173
- sysimage_build_prefix,
1174
1154
include_transitive_dependencies)
1175
1155
1176
1156
return
0 commit comments