diff options
| author | Jakub Beránek <berykubik@gmail.com> | 2025-08-10 13:55:55 +0200 |
|---|---|---|
| committer | Jakub Beránek <berykubik@gmail.com> | 2025-08-10 20:46:04 +0200 |
| commit | 01652d37ae86bae3d773ccc2de01993a45ef15be (patch) | |
| tree | 89ba749134fd9fdd38bb12d76aaa9ac0b6581da4 | |
| parent | cef5ebc5ffdbb65b85c4312335cb4fa80b9ac0c8 (diff) | |
| download | rust-01652d37ae86bae3d773ccc2de01993a45ef15be.tar.gz rust-01652d37ae86bae3d773ccc2de01993a45ef15be.zip | |
Extract Cranelift component
| -rw-r--r-- | src/tools/opt-dist/src/tests.rs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/tools/opt-dist/src/tests.rs b/src/tools/opt-dist/src/tests.rs index d5121b8c786..fa55805bbf2 100644 --- a/src/tools/opt-dist/src/tests.rs +++ b/src/tools/opt-dist/src/tests.rs @@ -36,6 +36,16 @@ pub fn run_tests(env: &Environment) -> anyhow::Result<()> { let cargo_dir = extract_dist_dir(&format!("cargo-{version}-{host_triple}"))?.join("cargo"); let extracted_src_dir = extract_dist_dir(&format!("rust-src-{version}"))?.join("rust-src"); + // If we have a Cranelift archive, copy it to the rustc sysroot + if let Ok(_) = find_file_in_dir(&dist_dir, "rustc-codegen-cranelift-", ".tar.xz") { + let extracted_codegen_dir = + extract_dist_dir(&format!("rustc-codegen-cranelift-{version}-{host_triple}"))? + .join("rustc-codegen-cranelift-preview"); + let rel_path = + Utf8Path::new("lib").join("rustlib").join(host_triple).join("codegen-backends"); + copy_directory(&extracted_codegen_dir.join(&rel_path), &rustc_dir.join(&rel_path))?; + } + // We need to manually copy libstd to the extracted rustc sysroot copy_directory( &libstd_dir.join("lib").join("rustlib").join(host_triple).join("lib"), |
