Skip to content

Commit

Permalink
fix --pkgimage[s] inconsistencies (#52147)
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth authored Nov 14, 2023
1 parent 2d449d4 commit d5f873f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions base/util.jl
Original file line number Diff line number Diff line change
Expand Up @@ -163,8 +163,7 @@ To get the julia command without propagated command line arguments, `julia_cmd()
The flags `--color` and `--startup-file` were added in Julia 1.5.
!!! compat "Julia 1.9"
The keyword argument `cpu_target` was added.
The keyword argument `cpu_target` was added in 1.9.
The flag `--pkgimages` was added in Julia 1.9.
"""
function julia_cmd(julia=joinpath(Sys.BINDIR, julia_exename()); cpu_target::Union{Nothing,String} = nothing)
Expand Down
4 changes: 2 additions & 2 deletions pkgimage.mk
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,12 @@ $$(BUILDDIR)/stdlib/$1.debug.image: export JULIA_CPU_TARGET=$(JULIA_CPU_TARGET)

$$(BUILDDIR)/stdlib/$1.release.image: $$($1_SRCS) $$(addsuffix .release.image,$$(addprefix $$(BUILDDIR)/stdlib/,$2)) $(build_private_libdir)/sys.$(SHLIB_EXT)
@$$(call PRINT_JULIA, $$(call spawn,$$(JULIA_EXECUTABLE)) --startup-file=no --check-bounds=yes -e 'Base.compilecache(Base.identify_package("$1"))')
@$$(call PRINT_JULIA, $$(call spawn,$$(JULIA_EXECUTABLE)) --startup-file=no --pkgimage=no -e 'Base.compilecache(Base.identify_package("$1"))')
@$$(call PRINT_JULIA, $$(call spawn,$$(JULIA_EXECUTABLE)) --startup-file=no --pkgimages=no -e 'Base.compilecache(Base.identify_package("$1"))')
@$$(call PRINT_JULIA, $$(call spawn,$$(JULIA_EXECUTABLE)) --startup-file=no -e 'Base.compilecache(Base.identify_package("$1"))')
touch $$@
$$(BUILDDIR)/stdlib/$1.debug.image: $$($1_SRCS) $$(addsuffix .debug.image,$$(addprefix $$(BUILDDIR)/stdlib/,$2)) $(build_private_libdir)/sys-debug.$(SHLIB_EXT)
@$$(call PRINT_JULIA, $$(call spawn,$$(JULIA_EXECUTABLE)) --startup-file=no --check-bounds=yes -e 'Base.compilecache(Base.identify_package("$1"))')
@$$(call PRINT_JULIA, $$(call spawn,$$(JULIA_EXECUTABLE)) --startup-file=no --pkgimage=no -e 'Base.compilecache(Base.identify_package("$1"))')
@$$(call PRINT_JULIA, $$(call spawn,$$(JULIA_EXECUTABLE)) --startup-file=no --pkgimages=no -e 'Base.compilecache(Base.identify_package("$1"))')
@$$(call PRINT_JULIA, $$(call spawn,$$(JULIA_EXECUTABLE)) --startup-file=no -e 'Base.compilecache(Base.identify_package("$1"))')
touch $$@
else
Expand Down
2 changes: 1 addition & 1 deletion src/jloptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ JL_DLLEXPORT void jl_parse_opts(int *argcp, char ***argvp)
else if (!strcmp(optarg,"no"))
jl_options.use_pkgimages = JL_OPTIONS_USE_PKGIMAGES_NO;
else
jl_errorf("julia: invalid argument to --pkgimage={yes|no} (%s)", optarg);
jl_errorf("julia: invalid argument to --pkgimages={yes|no} (%s)", optarg);
break;
case 'C': // cpu-target
jl_options.cpu_target = strdup(optarg);
Expand Down
2 changes: 1 addition & 1 deletion test/loading.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,7 @@ end
end
end

pkgimage(val) = val == 1 ? `--pkgimage=yes` : `--pkgimage=no`
pkgimage(val) = val == 1 ? `--pkgimages=yes` : `--pkgimages=no`
opt_level(val) = `-O$val`
debug_level(val) = `-g$val`
inline(val) = val == 1 ? `--inline=yes` : `--inline=no`
Expand Down

0 comments on commit d5f873f

Please sign in to comment.