File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 2222 Tuple , Union
2323
2424PGO_HOST = os .environ ["PGO_HOST" ]
25+ CHANNEL = os .environ ["RUST_RELEASE_CHANNEL" ]
2526
2627LOGGER = 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 (
You can’t perform that action at this time.
0 commit comments