@@ -220,21 +220,18 @@ fn build_gcc(metadata: &Meta, builder: &Builder<'_>, target: TargetSelection) {
220220 t ! ( fs:: create_dir_all( install_dir) ) ;
221221
222222 // GCC creates files (e.g. symlinks to the downloaded dependencies)
223- // in the source directory, which does not work with our CI setup, where we mount
223+ // in the source directory, which does not work with our CI/Docker setup, where we mount
224224 // source directories as read-only on Linux.
225- // Therefore, as a part of the build in CI, we first copy the whole source directory
226- // to the build directory, and perform the build from there.
227- let src_dir = if builder. config . is_running_on_ci {
228- let src_dir = builder. gcc_out ( target) . join ( "src" ) ;
229- if src_dir. exists ( ) {
230- builder. remove_dir ( & src_dir) ;
231- }
232- builder. create_dir ( & src_dir) ;
233- builder. cp_link_r ( root, & src_dir) ;
234- src_dir
235- } else {
236- root. clone ( )
237- } ;
225+ // And in general, we shouldn't be modifying the source directories if possible, even for local
226+ // builds.
227+ // Therefore, we first copy the whole source directory to the build directory, and perform the
228+ // build from there.
229+ let src_dir = builder. gcc_out ( target) . join ( "src" ) ;
230+ if src_dir. exists ( ) {
231+ builder. remove_dir ( & src_dir) ;
232+ }
233+ builder. create_dir ( & src_dir) ;
234+ builder. cp_link_r ( root, & src_dir) ;
238235
239236 command ( src_dir. join ( "contrib/download_prerequisites" ) ) . current_dir ( & src_dir) . run ( builder) ;
240237 let mut configure_cmd = command ( src_dir. join ( "configure" ) ) ;
0 commit comments