@@ -753,6 +753,16 @@ static int64_t write_dependency_list(ios_t *s, jl_array_t* worklist, jl_array_t
753753 static jl_value_t * replace_depot_func = NULL ;
754754 if (!replace_depot_func )
755755 replace_depot_func = jl_get_global (jl_base_module , jl_symbol ("replace_depot_path" ));
756+ static jl_value_t * normalize_depots_func = NULL ;
757+ if (!normalize_depots_func )
758+ normalize_depots_func = jl_get_global (jl_base_module , jl_symbol ("normalize_depots_for_relocation" ));
759+
760+ jl_value_t * depots = NULL , * prefs_hash = NULL , * prefs_list = NULL ;
761+ JL_GC_PUSH2 (& depots , & prefs_list );
762+ last_age = ct -> world_age ;
763+ ct -> world_age = jl_atomic_load_acquire (& jl_world_counter );
764+ depots = jl_apply (& normalize_depots_func , 1 );
765+ ct -> world_age = last_age ;
756766
757767 // write a placeholder for total size so that we can quickly seek past all of the
758768 // dependencies if we don't need them
@@ -765,13 +775,14 @@ static int64_t write_dependency_list(ios_t *s, jl_array_t* worklist, jl_array_t
765775
766776 if (replace_depot_func ) {
767777 jl_value_t * * replace_depot_args ;
768- JL_GC_PUSHARGS (replace_depot_args , 2 );
778+ JL_GC_PUSHARGS (replace_depot_args , 3 );
769779 replace_depot_args [0 ] = replace_depot_func ;
770780 replace_depot_args [1 ] = deppath ;
781+ replace_depot_args [2 ] = depots ;
771782 ct = jl_current_task ;
772783 size_t last_age = ct -> world_age ;
773784 ct -> world_age = jl_atomic_load_acquire (& jl_world_counter );
774- deppath = (jl_value_t * )jl_apply (replace_depot_args , 2 );
785+ deppath = (jl_value_t * )jl_apply (replace_depot_args , 3 );
775786 ct -> world_age = last_age ;
776787 JL_GC_POP ();
777788 }
@@ -804,9 +815,6 @@ static int64_t write_dependency_list(ios_t *s, jl_array_t* worklist, jl_array_t
804815 write_int32 (s , 0 ); // terminator, for ease of reading
805816
806817 // Calculate Preferences hash for current package.
807- jl_value_t * prefs_hash = NULL ;
808- jl_value_t * prefs_list = NULL ;
809- JL_GC_PUSH1 (& prefs_list );
810818 if (jl_base_module ) {
811819 // Toplevel module is the module we're currently compiling, use it to get our preferences hash
812820 jl_value_t * toplevel = (jl_value_t * )jl_get_global (jl_base_module , jl_symbol ("__toplevel__" ));
@@ -853,7 +861,7 @@ static int64_t write_dependency_list(ios_t *s, jl_array_t* worklist, jl_array_t
853861 write_int32 (s , 0 );
854862 write_uint64 (s , 0 );
855863 }
856- JL_GC_POP (); // for prefs_list
864+ JL_GC_POP (); // for depots, prefs_list
857865
858866 // write a dummy file position to indicate the beginning of the source-text
859867 pos = ios_pos (s );
0 commit comments