Skip to content

Commit 2d0863f

Browse files
committed
Auto merge of #6193 - dwijnand:remove-Compilation.libraries, r=alexcrichton
Remove Compilation.libraries Actioning #5651 (comment)
2 parents 4d45a90 + 6c6947b commit 2d0863f

File tree

2 files changed

+0
-31
lines changed

2 files changed

+0
-31
lines changed

src/cargo/core/compiler/compilation.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ pub struct Doctest {
2121

2222
/// A structure returning the result of a compilation.
2323
pub struct Compilation<'cfg> {
24-
/// A mapping from a package to the list of libraries that need to be
25-
/// linked when working with that package.
26-
// TODO: deprecated, remove
27-
pub libraries: HashMap<PackageId, HashSet<(Target, PathBuf)>>,
28-
2924
/// An array of all tests created during this compilation.
3025
pub tests: Vec<(Package, TargetKind, String, PathBuf)>,
3126

@@ -106,7 +101,6 @@ impl<'cfg> Compilation<'cfg> {
106101
server.configure(&mut rustc);
107102
}
108103
Ok(Compilation {
109-
libraries: HashMap::new(),
110104
native_dirs: BTreeSet::new(), // TODO: deprecated, remove
111105
root_output: PathBuf::from("/"),
112106
deps_output: PathBuf::from("/"),

src/cargo/core/compiler/context/mod.rs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -189,13 +189,6 @@ impl<'a, 'cfg> Context<'a, 'cfg> {
189189
));
190190
} else if unit.target.is_bin() || unit.target.is_bin_example() {
191191
self.compilation.binaries.push(bindst.clone());
192-
} else if unit.target.is_lib() {
193-
let pkgid = unit.pkg.package_id().clone();
194-
self.compilation
195-
.libraries
196-
.entry(pkgid)
197-
.or_insert_with(HashSet::new)
198-
.insert((unit.target.clone(), output.path.clone()));
199192
}
200193
}
201194

@@ -212,24 +205,6 @@ impl<'a, 'cfg> Context<'a, 'cfg> {
212205
.or_insert_with(Vec::new)
213206
.push(("OUT_DIR".to_string(), out_dir));
214207
}
215-
216-
if !dep.target.is_lib() {
217-
continue;
218-
}
219-
if dep.mode.is_doc() {
220-
continue;
221-
}
222-
223-
let outputs = self.outputs(dep)?;
224-
self.compilation
225-
.libraries
226-
.entry(unit.pkg.package_id().clone())
227-
.or_insert_with(HashSet::new)
228-
.extend(
229-
outputs
230-
.iter()
231-
.map(|output| (dep.target.clone(), output.path.clone())),
232-
);
233208
}
234209

235210
if unit.mode == CompileMode::Doctest {

0 commit comments

Comments
 (0)