File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,16 @@ pub fn run_tests(env: &Environment) -> anyhow::Result<()> {
36
36
let cargo_dir = extract_dist_dir ( & format ! ( "cargo-{version}-{host_triple}" ) ) ?. join ( "cargo" ) ;
37
37
let extracted_src_dir = extract_dist_dir ( & format ! ( "rust-src-{version}" ) ) ?. join ( "rust-src" ) ;
38
38
39
+ // If we have a Cranelift archive, copy it to the rustc sysroot
40
+ if let Ok ( _) = find_file_in_dir ( & dist_dir, "rustc-codegen-cranelift-" , ".tar.xz" ) {
41
+ let extracted_codegen_dir =
42
+ extract_dist_dir ( & format ! ( "rustc-codegen-cranelift-{version}-{host_triple}" ) ) ?
43
+ . join ( "rustc-codegen-cranelift-preview" ) ;
44
+ let rel_path =
45
+ Utf8Path :: new ( "lib" ) . join ( "rustlib" ) . join ( host_triple) . join ( "codegen-backends" ) ;
46
+ copy_directory ( & extracted_codegen_dir. join ( & rel_path) , & rustc_dir. join ( & rel_path) ) ?;
47
+ }
48
+
39
49
// We need to manually copy libstd to the extracted rustc sysroot
40
50
copy_directory (
41
51
& libstd_dir. join ( "lib" ) . join ( "rustlib" ) . join ( host_triple) . join ( "lib" ) ,
You can’t perform that action at this time.
0 commit comments