Skip to content

Commit

Permalink
Rollup merge of rust-lang#122136 - Kobzol:opt-dist-lookup-logic, r=Ma…
Browse files Browse the repository at this point in the history
…rk-Simulacrum

Include all library files in artifact summary on CI

It's not worth it to maintain any custom logic here. Just print all files in the `lib` directory, this should be forward compatible.

This fixes rust-lang#121866, based on rust-lang#121967.

r? `@Mark-Simulacrum`
  • Loading branch information
GuillaumeGomez authored Mar 7, 2024
2 parents 3257e86 + 4a1f4ff commit fcb2cbc
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions src/tools/opt-dist/src/utils/artifact_size.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,21 +15,8 @@ pub fn print_binary_sizes(env: &Environment) -> anyhow::Result<()> {

let root = env.build_artifacts().join("stage2");

let all_lib_files = get_files_from_dir(&root.join("lib"), None)?;

let mut files = get_files_from_dir(&root.join("bin"), None)?;
files.extend(get_files_from_dir(&root.join("lib"), Some(".so"))?);

// libLLVM.so can be named libLLVM.so.<suffix>, so we try to explicitly add it here if it
// wasn't found by the above call.
if !files.iter().any(|f| f.file_name().unwrap_or_default().starts_with("libLLVM")) {
if let Some(llvm_lib) =
all_lib_files.iter().find(|f| f.file_name().unwrap_or_default().starts_with("libLLVM"))
{
files.push(llvm_lib.clone());
}
}

files.extend(get_files_from_dir(&root.join("lib"), None)?);
files.sort_unstable();

let items: Vec<_> = files
Expand Down

0 comments on commit fcb2cbc

Please sign in to comment.