Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate pgo-gen-lto run-make test to rmake #128757

Merged
merged 1 commit into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/tools/tidy/src/allowed_run_make_makefiles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ run-make/min-global-align/Makefile
run-make/native-link-modifier-bundle/Makefile
run-make/no-alloc-shim/Makefile
run-make/pdb-buildinfo-cl-cmd/Makefile
run-make/pgo-gen-lto/Makefile
run-make/pgo-indirect-call-promotion/Makefile
run-make/raw-dylib-alt-calling-convention/Makefile
run-make/raw-dylib-c/Makefile
Expand Down
11 changes: 0 additions & 11 deletions tests/run-make/pgo-gen-lto/Makefile

This file was deleted.

22 changes: 22 additions & 0 deletions tests/run-make/pgo-gen-lto/rmake.rs
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
);
}
Loading