File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
src/bootstrap/src/core/build_steps Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -478,7 +478,19 @@ impl Step for Rustc {
478
478
if libdir_relative. to_str ( ) != Some ( "bin" ) {
479
479
let libdir = builder. rustc_libdir ( compiler) ;
480
480
for entry in builder. read_dir ( & libdir) {
481
- if is_dylib ( & entry. path ( ) ) {
481
+ // A safeguard that we will not ship libgccjit.so from the libdir, in case the
482
+ // GCC codegen backend is enabled by default.
483
+ // Long-term we should probably split the config options for:
484
+ // - Include cg_gcc in the rustc sysroot by default
485
+ // - Run dist of a specific codegen backend in `x dist` by default
486
+ if is_dylib ( & entry. path ( ) )
487
+ && !entry
488
+ . path ( )
489
+ . file_name ( )
490
+ . and_then ( |n| n. to_str ( ) )
491
+ . map ( |n| n. contains ( "libgccjit" ) )
492
+ . unwrap_or ( false )
493
+ {
482
494
// Don't use custom libdir here because ^lib/ will be resolved again
483
495
// with installer
484
496
builder. install ( & entry. path ( ) , & image. join ( "lib" ) , FileType :: NativeLibrary ) ;
You can’t perform that action at this time.
0 commit comments