Rollup merge of #139894 - Kobzol:opt-dist-fixes, r=lqd
Fix `opt-dist` CLI flag and make it work without LLD
Suggested in 512456991
.
r? `@jieyouxu`
This commit is contained in:
commit
848ec5888f
2 changed files with 4 additions and 2 deletions
|
@ -76,7 +76,7 @@ enum EnvironmentCmd {
|
||||||
rustc_perf_checkout_dir: Option<Utf8PathBuf>,
|
rustc_perf_checkout_dir: Option<Utf8PathBuf>,
|
||||||
|
|
||||||
/// Is LLVM for `rustc` built in shared library mode?
|
/// Is LLVM for `rustc` built in shared library mode?
|
||||||
#[arg(long, default_value_t = true)]
|
#[arg(long, default_value_t = true, action(clap::ArgAction::Set))]
|
||||||
llvm_shared: bool,
|
llvm_shared: bool,
|
||||||
|
|
||||||
/// Should BOLT optimization be used? If yes, host LLVM must have BOLT binaries
|
/// Should BOLT optimization be used? If yes, host LLVM must have BOLT binaries
|
||||||
|
|
|
@ -36,7 +36,9 @@ pub fn clear_llvm_files(env: &Environment) -> anyhow::Result<()> {
|
||||||
// directories ourselves.
|
// directories ourselves.
|
||||||
log::info!("Clearing LLVM build files");
|
log::info!("Clearing LLVM build files");
|
||||||
delete_directory(&env.build_artifacts().join("llvm"))?;
|
delete_directory(&env.build_artifacts().join("llvm"))?;
|
||||||
delete_directory(&env.build_artifacts().join("lld"))?;
|
if env.build_artifacts().join("lld").is_dir() {
|
||||||
|
delete_directory(&env.build_artifacts().join("lld"))?;
|
||||||
|
}
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue