3 files changed +22
-26
lines changed Original file line number Diff line number Diff line change @@ -158,7 +158,6 @@ run-make/target-without-atomic-cas/Makefile
158
158
run-make/test-benches/Makefile
159
159
run-make/thumb-none-cortex-m/Makefile
160
160
run-make/thumb-none-qemu/Makefile
161
- run-make/track-pgo-dep-info/Makefile
162
161
run-make/translation/Makefile
163
162
run-make/type-mismatch-same-crate-name/Makefile
164
163
run-make/unstable-flag-required/Makefile
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ // Emitting dep-info files used to not have any mention of PGO profiles used
2
+ // in compilation, which meant these profiles could be changed without consequence.
3
+ // After changing this in #100801, this test checks that the profile data is successfully
4
+ // included in dep-info emit files.
5
+ // See https://github.com/rust-lang/rust/pull/100801
6
+
7
+ //FIXME(Oneirical): try it on musl
8
+ //@ needs-profiler-support
9
+
10
+ use run_make_support:: { fs_wrapper, llvm_profdata, run, rustc} ;
11
+
12
+ fn main ( ) {
13
+ // Generate the profile-guided-optimization (PGO) profiles
14
+ rustc ( ) . profile_generate ( "profiles" ) . input ( "main.rs" ) . run ( ) ;
15
+ // Merge the profiles
16
+ run ( "main" ) ;
17
+ llvm_profdata ( ) . merge ( ) . output ( "merged.profdata" ) . input ( "profiles" ) . run ( ) ;
18
+ // Use the profiles in compilation
19
+ rustc ( ) . profile_use ( "merged.profdata" ) . emit ( "dep-info" ) . input ( "main.rs" ) . run ( ) ;
20
+ // Check that the profile file is in the dep-info emit file
21
+ assert ! ( fs_wrapper:: read_to_string( "main.d" ) . contains( "merged.profdata" ) ) ;
22
+ }
0 commit comments