@@ -451,44 +451,6 @@ impl Step for Rustc {
451
451
false ,
452
452
) ;
453
453
454
- // We used to build librustc_codegen_llvm as a separate step,
455
- // which produced a dylib that the compiler would dlopen() at runtime.
456
- // This meant that we only needed to make sure that libLLVM.so was
457
- // installed by the time we went to run a tool using it - since
458
- // librustc_codegen_llvm was effectively a standalone artifact,
459
- // other crates were completely oblivious to its dependency
460
- // on `libLLVM.so` during build time.
461
- //
462
- // However, librustc_codegen_llvm is now built as an ordinary
463
- // crate during the same step as the rest of the compiler crates.
464
- // This means that any crates depending on it will see the fact
465
- // that it uses `libLLVM.so` as a native library, and will
466
- // cause us to pass `-llibLLVM.so` to the linker when we link
467
- // a binary.
468
- //
469
- // For `rustc` itself, this works out fine.
470
- // During the `Assemble` step, we call `dist::maybe_install_llvm_dylib`
471
- // to copy libLLVM.so into the `stage` directory. We then link
472
- // the compiler binary, which will find `libLLVM.so` in the correct place.
473
- //
474
- // However, this is insufficient for tools that are build against stage0
475
- // (e.g. stage1 rustdoc). Since `Assemble` for stage0 doesn't actually do anything,
476
- // we won't have `libLLVM.so` in the stage0 sysroot. In the past, this wasn't
477
- // a problem - we would copy the tool binary into its correct stage directory
478
- // (e.g. stage1 for a stage1 rustdoc built against a stage0 compiler).
479
- // Since libLLVM.so wasn't resolved until runtime, it was fine for it to
480
- // not exist while we were building it.
481
- //
482
- // To ensure that we can still build stage1 tools against a stage0 compiler,
483
- // we explicitly copy libLLVM.so into the stage0 sysroot when building
484
- // the stage0 compiler. This ensures that tools built against stage0
485
- // will see libLLVM.so at build time, making the linker happy.
486
- if compiler. stage == 0 {
487
- builder. info ( & format ! ( "Installing libLLVM.so to stage 0 ({})" , compiler. host) ) ;
488
- let sysroot = builder. sysroot ( compiler) ;
489
- dist:: maybe_install_llvm_dylib ( builder, compiler. host , & sysroot) ;
490
- }
491
-
492
454
builder. ensure ( RustcLink {
493
455
compiler : builder. compiler ( compiler. stage , builder. config . build ) ,
494
456
target_compiler : compiler,
0 commit comments