File tree 1 file changed +6
-5
lines changed
1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change 22
22
Tuple , Union
23
23
24
24
PGO_HOST = os .environ ["PGO_HOST" ]
25
+ CHANNEL = os .environ ["RUST_RELEASE_CHANNEL" ]
25
26
26
27
LOGGER = logging .getLogger ("stage-build" )
27
28
@@ -816,18 +817,18 @@ def extract_dist_dir(name: str) -> Path:
816
817
return extracted_path
817
818
818
819
# 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"
823
824
824
825
# We need to manually copy libstd to the extracted rustc sysroot
825
826
shutil .copytree (
826
827
libstd_dir / "lib" / "rustlib" / PGO_HOST / "lib" ,
827
828
rustc_dir / "lib" / "rustlib" / PGO_HOST / "lib"
828
829
)
829
830
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
831
832
# sources to the extracted sysroot. We need sources available so that `-Zsimulate-remapped-rust-src-base`
832
833
# works correctly.
833
834
shutil .copytree (
You can’t perform that action at this time.
0 commit comments