@@ -1984,17 +1984,20 @@ impl Step for Assemble {
19841984 trace ! ( "installing `{tool}`" ) ;
19851985 let tool_exe = exe ( tool, target_compiler. host ) ;
19861986 let src_path = llvm_bin_dir. join ( & tool_exe) ;
1987- // When using `download-ci-llvm`, some of the tools
1988- // may not exist, so skip trying to copy them.
1989- if src_path. exists ( ) {
1990- // There is a chance that these tools are being installed from an external LLVM.
1991- // Use `Builder::resolve_symlink_and_copy` instead of `Builder::copy_link` to ensure
1992- // we are copying the original file not the symlinked path, which causes issues for
1993- // tarball distribution.
1994- //
1995- // See https://github.com/rust-lang/rust/issues/135554.
1996- builder. resolve_symlink_and_copy ( & src_path, & libdir_bin. join ( & tool_exe) ) ;
1987+
1988+ // When using `download-ci-llvm`, some of the tools may not exist, so skip trying to copy them.
1989+ if !src_path. exists ( ) && builder. config . llvm_from_ci {
1990+ eprintln ! ( "{} does not exist; skipping copy" , src_path. display( ) ) ;
1991+ continue ;
19971992 }
1993+
1994+ // There is a chance that these tools are being installed from an external LLVM.
1995+ // Use `Builder::resolve_symlink_and_copy` instead of `Builder::copy_link` to ensure
1996+ // we are copying the original file not the symlinked path, which causes issues for
1997+ // tarball distribution.
1998+ //
1999+ // See https://github.com/rust-lang/rust/issues/135554.
2000+ builder. resolve_symlink_and_copy ( & src_path, & libdir_bin. join ( & tool_exe) ) ;
19982001 }
19992002 }
20002003 }
0 commit comments