about summary refs log tree commit diff
diff options
context:
space:
mode:
author许杰友 Jieyou Xu (Joe) <39484203+jieyouxu@users.noreply.github.com>2025-07-22 00:54:33 +0800
committerGitHub <noreply@github.com>2025-07-22 00:54:33 +0800
commit6628a4afb5d08555f09878a48f0c4179e7582aa2 (patch)
tree4cffbc92abe5995b0348e464ffe6a256f973e653
parent43fa3f555e181061e50f26ab9d8ff8b398c380e6 (diff)
parentc193f3039f561aad497fdaced3f320bd889bdb0d (diff)
downloadrust-6628a4afb5d08555f09878a48f0c4179e7582aa2.tar.gz
rust-6628a4afb5d08555f09878a48f0c4179e7582aa2.zip
Rollup merge of #144254 - ognevny:opt-dist-artifact-dir, r=Kobzol
opt-dist: make `artifact-dir` an absolute path for `opt-dist local`

...like for CI environments. the same logic applied as for `build_dir`. fixes the issue where some intermediate steps fail due to path being relative to an active directory

r? Kobzol

try-job: dist-x86_64-msvc
try-job: dist-x86_64-linux
-rw-r--r--src/tools/opt-dist/src/main.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/tools/opt-dist/src/main.rs b/src/tools/opt-dist/src/main.rs
index d0e6badede6..42170ff39d7 100644
--- a/src/tools/opt-dist/src/main.rs
+++ b/src/tools/opt-dist/src/main.rs
@@ -62,7 +62,7 @@ enum EnvironmentCmd {
         python: String,
 
         /// Directory where artifacts (like PGO profiles or rustc-perf) of this workflow
-        /// will be stored.
+        /// will be stored. Relative to `checkout_dir`
         #[arg(long, default_value = "opt-artifacts")]
         artifact_dir: Utf8PathBuf,
 
@@ -150,7 +150,7 @@ fn create_environment(args: Args) -> anyhow::Result<(Environment, Vec<String>)>
                 .python_binary(python)
                 .checkout_dir(checkout_dir.clone())
                 .host_llvm_dir(llvm_dir)
-                .artifact_dir(artifact_dir)
+                .artifact_dir(checkout_dir.join(artifact_dir))
                 .build_dir(checkout_dir.join(build_dir))
                 .prebuilt_rustc_perf(rustc_perf_checkout_dir)
                 .shared_llvm(llvm_shared)