Skip to content

Commit 433d695

Browse files
committed
Init codegen during sysimg restore.
1 parent 2c02de8 commit 433d695

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/init.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -734,12 +734,13 @@ JL_DLLEXPORT void julia_init(JL_IMAGE_SEARCH rel)
734734
if (jl_options.cpu_target == NULL)
735735
jl_options.cpu_target = "native";
736736

737-
if (jl_options.image_file)
737+
if (jl_options.image_file) {
738738
jl_restore_system_image(jl_options.image_file);
739-
else
739+
} else {
740740
jl_init_types();
741+
jl_init_codegen();
742+
}
741743

742-
jl_init_codegen();
743744
jl_init_common_symbols();
744745
jl_init_flisp();
745746
jl_init_serializer();

src/staticdata.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1839,6 +1839,7 @@ static void jl_restore_system_image_from_stream(ios_t *f) JL_GC_DISABLED
18391839
}
18401840

18411841
s.s = &sysimg;
1842+
jl_init_codegen();
18421843
jl_update_all_fptrs(&s); // fptr relocs and registration
18431844
// reinit ccallables, which require codegen to be initialized
18441845
s.s = f;

0 commit comments

Comments
 (0)