aboutsummaryrefslogtreecommitdiff
path: root/crates/project_model
diff options
context:
space:
mode:
authorDaniel McNab <[email protected]>2021-03-08 09:05:19 +0000
committerDaniel McNab <[email protected]>2021-03-08 09:05:19 +0000
commitddce6bb282764692d53b719bff4c37e3512d4556 (patch)
tree0bce7b0c1d7f4b3f870027493bf6e3a2c55efe91 /crates/project_model
parent877f745551ff74da987a61f1c8a059d30140fb8a (diff)
Support disabling rustc build scripts
Diffstat (limited to 'crates/project_model')
-rw-r--r--crates/project_model/src/workspace.rs14
1 files changed, 11 insertions, 3 deletions
diff --git a/crates/project_model/src/workspace.rs b/crates/project_model/src/workspace.rs
index ea0c9ff60..d754c8b55 100644
--- a/crates/project_model/src/workspace.rs
+++ b/crates/project_model/src/workspace.rs
@@ -56,6 +56,7 @@ impl fmt::Debug for ProjectWorkspace {
56 match self { 56 match self {
57 ProjectWorkspace::Cargo { cargo, sysroot, rustc, rustc_cfg } => f 57 ProjectWorkspace::Cargo { cargo, sysroot, rustc, rustc_cfg } => f
58 .debug_struct("Cargo") 58 .debug_struct("Cargo")
59 .field("root", &cargo.workspace_root())
59 .field("n_packages", &cargo.packages().len()) 60 .field("n_packages", &cargo.packages().len())
60 .field("n_sysroot_crates", &sysroot.crates().len()) 61 .field("n_sysroot_crates", &sysroot.crates().len())
61 .field( 62 .field(
@@ -273,12 +274,19 @@ impl ProjectWorkspace {
273 crate_graph 274 crate_graph
274 } 275 }
275 276
276 pub fn collect_build_data_configs(&self, collector: &mut BuildDataCollector) { 277 pub fn collect_build_data_configs(
278 &self,
279 collector: &mut BuildDataCollector,
280 for_private: bool,
281 ) {
277 match self { 282 match self {
278 ProjectWorkspace::Cargo { cargo, rustc, .. } => { 283 ProjectWorkspace::Cargo { cargo, rustc, .. } => {
279 collector.add_config(&cargo.workspace_root(), cargo.build_data_config().clone()); 284 collector.add_config(&cargo.workspace_root(), cargo.build_data_config().clone());
280 if let Some(rustc) = rustc { 285 if for_private {
281 collector.add_config(rustc.workspace_root(), rustc.build_data_config().clone()); 286 if let Some(rustc) = rustc {
287 collector
288 .add_config(rustc.workspace_root(), rustc.build_data_config().clone());
289 }
282 } 290 }
283 } 291 }
284 _ => {} 292 _ => {}