mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-12-23 08:48:08 +00:00
Merge pull request #21027 from ColinFinck/msvc-crt-static
Some checks are pending
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
Some checks are pending
metrics / build_metrics (push) Waiting to run
metrics / other_metrics (diesel-1.4.8) (push) Blocked by required conditions
metrics / other_metrics (hyper-0.14.18) (push) Blocked by required conditions
metrics / other_metrics (ripgrep-13.0.0) (push) Blocked by required conditions
metrics / other_metrics (self) (push) Blocked by required conditions
metrics / other_metrics (webrender-2022) (push) Blocked by required conditions
metrics / generate_final_metrics (push) Blocked by required conditions
rustdoc / rustdoc (push) Waiting to run
Build releases with static CRT for `-windows-msvc` targets.
This commit is contained in:
commit
e7f5604878
1 changed files with 12 additions and 1 deletions
|
|
@ -134,8 +134,19 @@ fn dist_server(
|
|||
};
|
||||
|
||||
let mut cmd = build_command(sh, command, &target_name, features, dev_rel);
|
||||
let mut rustflags = Vec::new();
|
||||
|
||||
if let Some(profile) = pgo_profile {
|
||||
cmd = cmd.env("RUSTFLAGS", format!("-Cprofile-use={}", profile.to_str().unwrap()));
|
||||
rustflags.push(format!("-Cprofile-use={}", profile.to_str().unwrap()));
|
||||
}
|
||||
|
||||
if target_name.ends_with("-windows-msvc") {
|
||||
// https://github.com/rust-lang/rust-analyzer/issues/20970
|
||||
rustflags.push("-Ctarget-feature=+crt-static".to_owned());
|
||||
}
|
||||
|
||||
if !rustflags.is_empty() {
|
||||
cmd = cmd.env("RUSTFLAGS", rustflags.join(" "));
|
||||
}
|
||||
cmd.run().context("cannot build Rust Analyzer")?;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue