Skip to content

Commit 8e3f63c

Browse files
Auto merge of #112049 - Kobzol:pgo-omit-benchmarks, r=<try>
[do not merge] CI experiments Various CI experiments for try/dist builds. r? `@ghost`
2 parents e4b9d01 + 6f457c4 commit 8e3f63c

File tree

15 files changed

+120
-373
lines changed

15 files changed

+120
-373
lines changed

compiler/rustc_codegen_ssa/src/back/link.rs

Lines changed: 38 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -2954,53 +2954,49 @@ fn add_static_crate(
29542954
let name = &name[3..name.len() - 5]; // chop off lib/.rlib
29552955
let bundled_lib_file_names = bundled_lib_file_names.clone();
29562956

2957-
sess.prof.generic_activity_with_arg("link_altering_rlib", name).run(|| {
2958-
let canonical_name = name.replace('-', "_");
2959-
let upstream_rust_objects_already_included =
2960-
are_upstream_rust_objects_already_included(sess);
2961-
let is_builtins =
2962-
sess.target.no_builtins || !codegen_results.crate_info.is_no_builtins.contains(&cnum);
2963-
2964-
let mut archive = archive_builder_builder.new_archive_builder(sess);
2965-
if let Err(error) = archive.add_archive(
2966-
cratepath,
2967-
Box::new(move |f| {
2968-
if f == METADATA_FILENAME {
2969-
return true;
2970-
}
2957+
let canonical_name = name.replace('-', "_");
2958+
let upstream_rust_objects_already_included = are_upstream_rust_objects_already_included(sess);
2959+
let is_builtins =
2960+
sess.target.no_builtins || !codegen_results.crate_info.is_no_builtins.contains(&cnum);
2961+
2962+
let mut archive = archive_builder_builder.new_archive_builder(sess);
2963+
if let Err(error) = archive.add_archive(
2964+
cratepath,
2965+
Box::new(move |f| {
2966+
if f == METADATA_FILENAME {
2967+
return true;
2968+
}
29712969

2972-
let canonical = f.replace('-', "_");
2970+
let canonical = f.replace('-', "_");
29732971

2974-
let is_rust_object =
2975-
canonical.starts_with(&canonical_name) && looks_like_rust_object_file(f);
2972+
let is_rust_object =
2973+
canonical.starts_with(&canonical_name) && looks_like_rust_object_file(f);
29762974

2977-
// If we're performing LTO and this is a rust-generated object
2978-
// file, then we don't need the object file as it's part of the
2979-
// LTO module. Note that `#![no_builtins]` is excluded from LTO,
2980-
// though, so we let that object file slide.
2981-
if upstream_rust_objects_already_included && is_rust_object && is_builtins {
2982-
return true;
2983-
}
2975+
// If we're performing LTO and this is a rust-generated object
2976+
// file, then we don't need the object file as it's part of the
2977+
// LTO module. Note that `#![no_builtins]` is excluded from LTO,
2978+
// though, so we let that object file slide.
2979+
if upstream_rust_objects_already_included && is_rust_object && is_builtins {
2980+
return true;
2981+
}
29842982

2985-
// We skip native libraries because:
2986-
// 1. This native libraries won't be used from the generated rlib,
2987-
// so we can throw them away to avoid the copying work.
2988-
// 2. We can't allow it to be a single remaining entry in archive
2989-
// as some linkers may complain on that.
2990-
if bundled_lib_file_names.contains(&Symbol::intern(f)) {
2991-
return true;
2992-
}
2983+
// We skip native libraries because:
2984+
// 1. This native libraries won't be used from the generated rlib,
2985+
// so we can throw them away to avoid the copying work.
2986+
// 2. We can't allow it to be a single remaining entry in archive
2987+
// as some linkers may complain on that.
2988+
if bundled_lib_file_names.contains(&Symbol::intern(f)) {
2989+
return true;
2990+
}
29932991

2994-
false
2995-
}),
2996-
) {
2997-
sess.dcx()
2998-
.emit_fatal(errors::RlibArchiveBuildFailure { path: cratepath.clone(), error });
2999-
}
3000-
if archive.build(&dst) {
3001-
link_upstream(&dst);
3002-
}
3003-
});
2992+
false
2993+
}),
2994+
) {
2995+
sess.dcx().emit_fatal(errors::RlibArchiveBuildFailure { path: cratepath.clone(), error });
2996+
}
2997+
if archive.build(&dst) {
2998+
link_upstream(&dst);
2999+
}
30043000
}
30053001

30063002
// Same thing as above, but for dynamic crates instead of static crates.

compiler/rustc_codegen_ssa/src/back/write.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1789,7 +1789,7 @@ fn spawn_work<'a, B: ExtraBackendMethods>(
17891789
work: WorkItem<B>,
17901790
) {
17911791
if cgcx.config(work.module_kind()).time_module && llvm_start_time.is_none() {
1792-
*llvm_start_time = Some(cgcx.prof.verbose_generic_activity("LLVM_passes"));
1792+
*llvm_start_time = None;
17931793
}
17941794

17951795
let cgcx = cgcx.clone();

0 commit comments

Comments
 (0)