-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #128757 - Oneirical:calm-before-the-sltorm, r=<try>
Migrate `pgo-gen-lto` `run-make` test to rmake Part of #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
- Loading branch information
Showing
3 changed files
with
22 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
// A simple smoke test: when rustc compiles with profiling enabled, a profraw file | ||
// should be generated. | ||
// See https://github.com/rust-lang/rust/pull/48346 | ||
|
||
//@ needs-profiler-support | ||
// Reason: this exercises LTO profiling | ||
//@ ignore-cross-compile | ||
// Reason: the compiled binary is executed | ||
|
||
use run_make_support::{cwd, has_extension, has_prefix, run, rustc, shallow_find_files}; | ||
|
||
fn main() { | ||
rustc().opt_level("3").arg("-Clto=fat").profile_generate(cwd()).input("test.rs").run(); | ||
run("test"); | ||
assert_eq!( | ||
shallow_find_files(cwd(), |path| { | ||
has_prefix(path, "default_") && has_extension(path, "profraw") | ||
}) | ||
.len(), | ||
1 | ||
); | ||
} |