diff options
| author | bors <bors@rust-lang.org> | 2021-08-20 07:30:28 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-08-20 07:30:28 +0000 |
| commit | 9ccf661694423895b02e513c69e6ad263b2f3d8e (patch) | |
| tree | ecbb09a8994d6a4940aff42b802a02cd91a53c6e /src/bootstrap | |
| parent | bcfd3f7e88084850f87b8e34b4dcb9fceb872d00 (diff) | |
| parent | 70f1d353464c602c1d874187d4ca3198fdc4c078 (diff) | |
| download | rust-9ccf661694423895b02e513c69e6ad263b2f3d8e.tar.gz rust-9ccf661694423895b02e513c69e6ad263b2f3d8e.zip | |
Auto merge of #88000 - bjorn3:fix_cg_llvm_clif_compile, r=Mark-Simulacrum
Fix compiling other codegen backends when llvm is enabled Extracted from #81746 Without this change rustbuild will not pass the required linker argument to find libllvm. While other backends likely don't use libllvm, it is necessary to be able to link against rustc_driver as the llvm backend is linked into it.
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/builder.rs | 2 | ||||
| -rw-r--r-- | src/bootstrap/compile.rs | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/bootstrap/builder.rs b/src/bootstrap/builder.rs index e2f34826111..5911309a044 100644 --- a/src/bootstrap/builder.rs +++ b/src/bootstrap/builder.rs @@ -1288,7 +1288,7 @@ impl<'a> Builder<'a> { // requirement, but the `-L` library path is not propagated across // separate Cargo projects. We can add LLVM's library path to the // platform-specific environment variable as a workaround. - if mode == Mode::ToolRustc { + if mode == Mode::ToolRustc || mode == Mode::Codegen { if let Some(llvm_config) = self.llvm_config(target) { let llvm_libdir = output(Command::new(&llvm_config).arg("--libdir")); add_link_lib_path(vec![llvm_libdir.trim().into()], &mut cargo); diff --git a/src/bootstrap/compile.rs b/src/bootstrap/compile.rs index 78c9a252622..d2598995478 100644 --- a/src/bootstrap/compile.rs +++ b/src/bootstrap/compile.rs @@ -806,6 +806,10 @@ impl Step for CodegenBackend { let tmp_stamp = out_dir.join(".tmp.stamp"); + builder.info(&format!( + "Building stage{} codegen backend {} ({} -> {})", + compiler.stage, backend, &compiler.host, target + )); let files = run_cargo(builder, cargo, vec![], &tmp_stamp, vec![], false); if builder.config.dry_run { return; |
