@@ -752,6 +752,16 @@ static int64_t write_dependency_list(ios_t *s, jl_array_t* worklist, jl_array_t
752
752
static jl_value_t * replace_depot_func = NULL ;
753
753
if (!replace_depot_func )
754
754
replace_depot_func = jl_get_global (jl_base_module , jl_symbol ("replace_depot_path" ));
755
+ static jl_value_t * normalize_depots_func = NULL ;
756
+ if (!normalize_depots_func )
757
+ normalize_depots_func = jl_get_global (jl_base_module , jl_symbol ("normalize_depots_for_relocation" ));
758
+
759
+ jl_value_t * depots = NULL , * prefs_hash = NULL , * prefs_list = NULL ;
760
+ JL_GC_PUSH2 (& depots , & prefs_list );
761
+ last_age = ct -> world_age ;
762
+ ct -> world_age = jl_atomic_load_acquire (& jl_world_counter );
763
+ depots = jl_apply (& normalize_depots_func , 1 );
764
+ ct -> world_age = last_age ;
755
765
756
766
// write a placeholder for total size so that we can quickly seek past all of the
757
767
// dependencies if we don't need them
@@ -764,13 +774,14 @@ static int64_t write_dependency_list(ios_t *s, jl_array_t* worklist, jl_array_t
764
774
765
775
if (replace_depot_func ) {
766
776
jl_value_t * * replace_depot_args ;
767
- JL_GC_PUSHARGS (replace_depot_args , 2 );
777
+ JL_GC_PUSHARGS (replace_depot_args , 3 );
768
778
replace_depot_args [0 ] = replace_depot_func ;
769
779
replace_depot_args [1 ] = deppath ;
780
+ replace_depot_args [2 ] = depots ;
770
781
ct = jl_current_task ;
771
782
size_t last_age = ct -> world_age ;
772
783
ct -> world_age = jl_atomic_load_acquire (& jl_world_counter );
773
- deppath = (jl_value_t * )jl_apply (replace_depot_args , 2 );
784
+ deppath = (jl_value_t * )jl_apply (replace_depot_args , 3 );
774
785
ct -> world_age = last_age ;
775
786
JL_GC_POP ();
776
787
}
@@ -803,9 +814,6 @@ static int64_t write_dependency_list(ios_t *s, jl_array_t* worklist, jl_array_t
803
814
write_int32 (s , 0 ); // terminator, for ease of reading
804
815
805
816
// Calculate Preferences hash for current package.
806
- jl_value_t * prefs_hash = NULL ;
807
- jl_value_t * prefs_list = NULL ;
808
- JL_GC_PUSH1 (& prefs_list );
809
817
if (jl_base_module ) {
810
818
// Toplevel module is the module we're currently compiling, use it to get our preferences hash
811
819
jl_value_t * toplevel = (jl_value_t * )jl_get_global (jl_base_module , jl_symbol ("__toplevel__" ));
@@ -852,7 +860,7 @@ static int64_t write_dependency_list(ios_t *s, jl_array_t* worklist, jl_array_t
852
860
write_int32 (s , 0 );
853
861
write_uint64 (s , 0 );
854
862
}
855
- JL_GC_POP (); // for prefs_list
863
+ JL_GC_POP (); // for depots, prefs_list
856
864
857
865
// write a dummy file position to indicate the beginning of the source-text
858
866
pos = ios_pos (s );
0 commit comments