File tree 5 files changed +18
-5
lines changed
5 files changed +18
-5
lines changed Original file line number Diff line number Diff line change @@ -618,7 +618,7 @@ changelog-seen = 2
618
618
# and currently the only standard options supported are `"llvm"`, `"cranelift"`
619
619
# and `"gcc"`. The first backend in this list will be used as default by rustc
620
620
# when no explicit backend is specified.
621
- # codegen-backends = ["llvm", "cranelift" ]
621
+ # codegen-backends = ["llvm"]
622
622
623
623
# Indicates whether LLD will be compiled and made available in the sysroot for
624
624
# rustc to execute.
Original file line number Diff line number Diff line change @@ -1065,8 +1065,7 @@ impl Config {
1065
1065
config. channel = "dev" . to_string ( ) ;
1066
1066
config. codegen_tests = true ;
1067
1067
config. rust_dist_src = true ;
1068
- config. rust_codegen_backends =
1069
- vec ! [ INTERNER . intern_str( "llvm" ) , INTERNER . intern_str( "cranelift" ) ] ;
1068
+ config. rust_codegen_backends = vec ! [ INTERNER . intern_str( "llvm" ) ] ;
1070
1069
config. deny_warnings = true ;
1071
1070
config. bindir = "bin" . into ( ) ;
1072
1071
config. dist_include_mingw_linker = true ;
Original file line number Diff line number Diff line change @@ -16,8 +16,6 @@ download-ci-llvm = false
16
16
# Make sure they don't get set when installing from source.
17
17
channel = " nightly"
18
18
download-rustc = false
19
- # Skip building the cranelift backend. It isn't ready to be shipped yet.
20
- codegen-backends = [" llvm" ]
21
19
22
20
[dist ]
23
21
# Use better compression when preparing tarballs.
Original file line number Diff line number Diff line change @@ -445,6 +445,19 @@ impl Step for Rustc {
445
445
}
446
446
}
447
447
448
+ // Copy over the codegen backends
449
+ let backends_src = builder. sysroot_codegen_backends ( compiler) ;
450
+ let backends_rel = backends_src
451
+ . strip_prefix ( & src)
452
+ . unwrap ( )
453
+ . strip_prefix ( builder. sysroot_libdir_relative ( compiler) )
454
+ . unwrap ( ) ;
455
+ // Don't use custom libdir here because ^lib/ will be resolved again with installer
456
+ let backends_dst = image. join ( "lib" ) . join ( & backends_rel) ;
457
+
458
+ t ! ( fs:: create_dir_all( & backends_dst) ) ;
459
+ builder. cp_r ( & backends_src, & backends_dst) ;
460
+
448
461
// Copy libLLVM.so to the lib dir as well, if needed. While not
449
462
// technically needed by rustc itself it's needed by lots of other
450
463
// components like the llvm tools and LLD. LLD is included below and
Original file line number Diff line number Diff line change 123
123
124
124
RUST_CONFIGURE_ARGS=" $RUST_CONFIGURE_ARGS --set rust.verify-llvm-ir"
125
125
126
+ # Test the Cranelift backend in on CI, but don't ship it.
127
+ RUST_CONFIGURE_ARGS=" $RUST_CONFIGURE_ARGS --set rust.codegen-backends=llvm,cranelift"
128
+
126
129
# We enable this for non-dist builders, since those aren't trying to produce
127
130
# fresh binaries. We currently don't entirely support distributing a fresh
128
131
# copy of the compiler (including llvm tools, etc.) if we haven't actually
You can’t perform that action at this time.
0 commit comments