@@ -144,7 +144,7 @@ See also [`print`](@ref), [`println`](@ref), [`show`](@ref).
144144 printstyled (stdout , msg... ; bold= bold, italic= italic, underline= underline, blink= blink, reverse= reverse, hidden= hidden, color= color)
145145
146146"""
147- Base.julia_cmd(juliapath=joinpath(Sys.BINDIR, julia_exename()); cpu_target)
147+ Base.julia_cmd(juliapath=joinpath(Sys.BINDIR, julia_exename()); cpu_target::Union{Nothing,String}=nothing )
148148
149149Return a julia command similar to the one of the running process.
150150Propagates any of the `--cpu-target`, `--sysimage`, `--compile`, `--sysimage-native-code`,
@@ -154,6 +154,8 @@ command line arguments that are not at their default values.
154154
155155Among others, `--math-mode`, `--warn-overwrite`, and `--trace-compile` are notably not propagated currently.
156156
157+ Unless set to `nothing`, the `cpu_target` keyword argument can be used to override the CPU target set for the running process.
158+
157159To get the julia command without propagated command line arguments, `julia_cmd()[1]` can be used.
158160
159161!!! compat "Julia 1.1"
@@ -243,7 +245,7 @@ function julia_cmd(julia=joinpath(Sys.BINDIR, julia_exename()); cpu_target::Unio
243245 if opts. use_pkgimages == 0
244246 push! (addflags, " --pkgimages=no" )
245247 end
246- return ` $julia -C$cpu_target -J$image_file $addflags `
248+ return ` $julia -C $cpu_target -J$image_file $addflags `
247249end
248250
249251function julia_exename ()
0 commit comments