diff options
| author | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2022-06-18 17:55:24 +0000 |
|---|---|---|
| committer | bjorn3 <17426603+bjorn3@users.noreply.github.com> | 2022-06-19 12:56:31 +0000 |
| commit | 7ff0df51024a96e91f41c3760b5676ebbdc7a2c0 (patch) | |
| tree | 8edbf86c1312908227b499fb3e53a6edbfc9fcfc /compiler/rustc_codegen_ssa | |
| parent | 43929a8a75d85ae3939a80703bdd827e81c51ba5 (diff) | |
| download | rust-7ff0df51024a96e91f41c3760b5676ebbdc7a2c0.tar.gz rust-7ff0df51024a96e91f41c3760b5676ebbdc7a2c0.zip | |
Fix "Remove src_files and remove_file"
Diffstat (limited to 'compiler/rustc_codegen_ssa')
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/archive.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_codegen_ssa/src/back/link.rs | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/compiler/rustc_codegen_ssa/src/back/archive.rs b/compiler/rustc_codegen_ssa/src/back/archive.rs index 1c9fc217ea4..d2dd3fbcc99 100644 --- a/compiler/rustc_codegen_ssa/src/back/archive.rs +++ b/compiler/rustc_codegen_ssa/src/back/archive.rs @@ -50,7 +50,7 @@ pub trait ArchiveBuilder<'a> { where F: FnMut(&str) -> bool + 'static; - fn build(self); + fn build(self) -> bool; fn inject_dll_import_lib( &mut self, diff --git a/compiler/rustc_codegen_ssa/src/back/link.rs b/compiler/rustc_codegen_ssa/src/back/link.rs index 0f528c119f3..b39a9c988c6 100644 --- a/compiler/rustc_codegen_ssa/src/back/link.rs +++ b/compiler/rustc_codegen_ssa/src/back/link.rs @@ -2503,8 +2503,9 @@ fn add_upstream_rust_crates<'a, B: ArchiveBuilder<'a>>( }) { sess.fatal(&format!("failed to build archive from rlib: {}", e)); } - archive.build(); - link_upstream(&dst); + if archive.build() { + link_upstream(&dst); + } }); } |
