Skip to content

Commit 4cdbb8e

Browse files
committed
Drop duplicate function
1 parent b821f09 commit 4cdbb8e

2 files changed

Lines changed: 2 additions & 14 deletions

File tree

xtask/src/dist.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,13 +115,9 @@ fn dist_server(
115115

116116
let features = allocator.to_features();
117117

118+
let cmd = build_command(sh, &target.name, features, dev_rel);
118119
let pgo_profile = if let Some(train_crate) = pgo {
119-
Some(crate::pgo::gather_pgo_profile(
120-
sh,
121-
crate::pgo::build_command(sh, &target.name, features),
122-
&target.name,
123-
train_crate,
124-
)?)
120+
Some(crate::pgo::gather_pgo_profile(sh, cmd, &target.name, train_crate)?)
125121
} else {
126122
None
127123
};

xtask/src/pgo.rs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,6 @@ fn download_crate_for_training(sh: &Shell, pgo_dir: &Path, repo: &str) -> anyhow
9696
Ok(target_path)
9797
}
9898

99-
/// Helper function to create a build command for rust-analyzer
100-
pub(crate) fn build_command<'a>(sh: &'a Shell, target_name: &str, features: &[&str]) -> Cmd<'a> {
101-
cmd!(
102-
sh,
103-
"cargo build --manifest-path ./crates/rust-analyzer/Cargo.toml --bin rust-analyzer --target {target_name} {features...} --release"
104-
)
105-
}
106-
10799
pub(crate) fn apply_pgo_to_cmd<'a>(cmd: Cmd<'a>, profile_path: &Path) -> Cmd<'a> {
108100
cmd.env("RUSTFLAGS", format!("-Cprofile-use={}", profile_path.to_str().unwrap()))
109101
}

0 commit comments

Comments
 (0)