about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorJonathan Pallant <jonathan.pallant@ferrous-systems.com>2025-01-06 11:02:30 +0000
committerJonathan Pallant <jonathan.pallant@ferrous-systems.com>2025-01-06 11:02:30 +0000
commitf7f2fa540f59384481d0cf1e2de799883219087f (patch)
treef1f9a2f329d05db794a73e5bde3d5d86859ac528 /src/bootstrap
parentf9c16997dc016a3ef1456f56df2ab564a1c48cb2 (diff)
downloadrust-f7f2fa540f59384481d0cf1e2de799883219087f.tar.gz
rust-f7f2fa540f59384481d0cf1e2de799883219087f.zip
Ensure generate-copyright is executed from the project root.
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/src/core/build_steps/run.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bootstrap/src/core/build_steps/run.rs b/src/bootstrap/src/core/build_steps/run.rs
index 0a6aea26359..1c2a8dbaf90 100644
--- a/src/bootstrap/src/core/build_steps/run.rs
+++ b/src/bootstrap/src/core/build_steps/run.rs
@@ -218,6 +218,9 @@ impl Step for GenerateCopyright {
         cmd.env("DEST_LIBSTD", &dest_libstd);
         cmd.env("OUT_DIR", &builder.out);
         cmd.env("CARGO", &builder.initial_cargo);
+        // it is important that generate-copyright runs from the root of the
+        // source tree, because it uses relative paths
+        cmd.current_dir(&builder.src);
         cmd.run(builder);
 
         vec![dest, dest_libstd]