Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 576c898

Browse files
authoredAug 7, 2024
Unrolled build for rust-lang#128757
Rollup merge of rust-lang#128757 - Oneirical:calm-before-the-sltorm, r=jieyouxu Migrate `pgo-gen-lto` `run-make` test to rmake Part of rust-lang#121876 and the associated [Google Summer of Code project](https://blog.rust-lang.org/2024/05/01/gsoc-2024-selected-projects.html). This one is so easy, I'm surprised I missed it. try-job: aarch64-apple try-job: x86_64-msvc try-job: x86_64-mingw try-job: i686-msvc try-job: i686-mingw try-job: x86_64-gnu-llvm-17
2 parents 9bad7ba + 0149ba3 commit 576c898

File tree

3 files changed

+22
-12
lines changed

3 files changed

+22
-12
lines changed
 

‎src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ run-make/min-global-align/Makefile
1717
run-make/native-link-modifier-bundle/Makefile
1818
run-make/no-alloc-shim/Makefile
1919
run-make/pdb-buildinfo-cl-cmd/Makefile
20-
run-make/pgo-gen-lto/Makefile
2120
run-make/pgo-indirect-call-promotion/Makefile
2221
run-make/remap-path-prefix-dwarf/Makefile
2322
run-make/reproducible-build/Makefile

‎tests/run-make/pgo-gen-lto/Makefile

-11
This file was deleted.

‎tests/run-make/pgo-gen-lto/rmake.rs

+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// A simple smoke test: when rustc compiles with profiling enabled, a profraw file
2+
// should be generated.
3+
// See https://github.com/rust-lang/rust/pull/48346
4+
5+
//@ needs-profiler-support
6+
// Reason: this exercises LTO profiling
7+
//@ ignore-cross-compile
8+
// Reason: the compiled binary is executed
9+
10+
use run_make_support::{cwd, has_extension, has_prefix, run, rustc, shallow_find_files};
11+
12+
fn main() {
13+
rustc().opt_level("3").arg("-Clto=fat").profile_generate(cwd()).input("test.rs").run();
14+
run("test");
15+
assert_eq!(
16+
shallow_find_files(cwd(), |path| {
17+
has_prefix(path, "default_") && has_extension(path, "profraw")
18+
})
19+
.len(),
20+
1
21+
);
22+
}

0 commit comments

Comments
 (0)
Failed to load comments.