File tree 1 file changed +14
-0
lines changed
1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,20 @@ pgo_perf_benchmark ctfe-stress-4
24
24
25
25
cp -pri ../src/tools/cargo /tmp/cargo
26
26
27
+ # The Cargo repository does not have a Cargo.lock in it, as it relies on the
28
+ # lockfile already present in the rust-lang/rust monorepo. This decision breaks
29
+ # down when Cargo is built outside the monorepo though (like in this case),
30
+ # resulting in a build without any dependency locking.
31
+ #
32
+ # To ensure Cargo is built with locked dependencies even during PGO profiling
33
+ # the following command copies the monorepo's lockfile into the Cargo temporary
34
+ # directory. Cargo will *not* keep that lockfile intact, as it will remove all
35
+ # the dependencies Cargo itself doesn't rely on. Still, it will prevent
36
+ # building Cargo with arbitrary dependency versions.
37
+ #
38
+ # See #81378 for the bug that prompted adding this.
39
+ cp -p ../Cargo.lock /tmp/cargo
40
+
27
41
# Build cargo (with some flags)
28
42
function pgo_cargo {
29
43
RUSTC=./build/$PGO_HOST /stage2/bin/rustc \
You can’t perform that action at this time.
0 commit comments