Skip to content
This repository was archived by the owner on Jun 9, 2023. It is now read-only.

Commit cd95b34

Browse files
committed
say that automatic replacing default sysimage is problematic on Windows
1 parent 1e5e834 commit cd95b34

File tree

1 file changed

+13
-4
lines changed

1 file changed

+13
-4
lines changed

src/PackageCompilerX.jl

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,13 @@ by setting the envirnment variable `JULIA_CC` to a path to a compiler
273273
- `filter_stdlibs::Bool`: If `true`, only include stdlibs that are in the project file.
274274
Defaults to `false`, only set to `true` if you know the potential pitfalls.
275275
276-
- `replace_default::Bool`: If `true`, replaces the default system image which is automatically
277-
used when Julia starts. To replace with the one Julia ships with, use [`restore_default_sysimage()`](@ref)
276+
- `replace_default::Bool`: If `true`, replaces the default system image which
277+
is automatically used when Julia starts. To restore the default sysimage to one
278+
Julia ships with, use [`restore_default_sysimage()`](@ref). Note that this
279+
option does not work well on Windows since replacing open files is problematic
280+
on Windows. Therefore, on Windows, it is in general better to manually replace
281+
the default sysimage (the `lib/julia/sys.dll` file in the installation folder)
282+
than to use this option.
278283
279284
- `cpu_target::String`: The value to use for `JULIA_CPU_TARGET` when building the system image.
280285
"""
@@ -382,8 +387,12 @@ end
382387
"""
383388
restore_default_sysimage()
384389
385-
Restores the default system image to the one that Julia shipped with.
386-
Useful after running [`create_sysimage`](@ref) with `replace_default=true`.
390+
Restores the default system image to the one that Julia shipped with. Useful
391+
after running [`create_sysimage`](@ref) with `replace_default=true`. Note that
392+
this function does not work well on Windows since replacing open files is
393+
problematic on Windows. Therefore, on Windows, it is in general better to
394+
manually replace and restore the default sysimage (the `lib/julia/sys.dll`
395+
file in the installation folder) than to use this function.
387396
"""
388397
function restore_default_sysimage()
389398
if !isfile(backup_default_sysimg_path())

0 commit comments

Comments
 (0)