Skip to content

Commit 27ff819

Browse files
Use channel name in artifact -- fixes beta builds
This likely will break on stable promotion because stable artifacts are named with stable version rather than channel name; we'll want to figure out the right fix for that in a follow-up.
1 parent c5aa8fb commit 27ff819

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/ci/stage-build.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
Tuple, Union
2323

2424
PGO_HOST = os.environ["PGO_HOST"]
25+
CHANNEL = os.environ["RUST_RELEASE_CHANNEL"]
2526

2627
LOGGER = logging.getLogger("stage-build")
2728

@@ -816,18 +817,18 @@ def extract_dist_dir(name: str) -> Path:
816817
return extracted_path
817818

818819
# Extract rustc, libstd, cargo and src archives to create the optimized sysroot
819-
rustc_dir = extract_dist_dir(f"rustc-nightly-{PGO_HOST}") / "rustc"
820-
libstd_dir = extract_dist_dir(f"rust-std-nightly-{PGO_HOST}") / f"rust-std-{PGO_HOST}"
821-
cargo_dir = extract_dist_dir(f"cargo-nightly-{PGO_HOST}") / "cargo"
822-
extracted_src_dir = extract_dist_dir("rust-src-nightly") / "rust-src"
820+
rustc_dir = extract_dist_dir(f"rustc-{CHANNEL}-{PGO_HOST}") / "rustc"
821+
libstd_dir = extract_dist_dir(f"rust-std-{CHANNEL}-{PGO_HOST}") / f"rust-std-{PGO_HOST}"
822+
cargo_dir = extract_dist_dir(f"cargo-{CHANNEL}-{PGO_HOST}") / "cargo"
823+
extracted_src_dir = extract_dist_dir(f"rust-src-{CHANNEL}") / "rust-src"
823824

824825
# We need to manually copy libstd to the extracted rustc sysroot
825826
shutil.copytree(
826827
libstd_dir / "lib" / "rustlib" / PGO_HOST / "lib",
827828
rustc_dir / "lib" / "rustlib" / PGO_HOST / "lib"
828829
)
829830

830-
# Extract sources - they aren't in the `rustc-nightly-{host}` tarball, so we need to manually copy libstd
831+
# Extract sources - they aren't in the `rustc-{CHANNEL}-{host}` tarball, so we need to manually copy libstd
831832
# sources to the extracted sysroot. We need sources available so that `-Zsimulate-remapped-rust-src-base`
832833
# works correctly.
833834
shutil.copytree(

0 commit comments

Comments
 (0)