about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/asm.rs
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2019-10-22 08:51:35 -0700
committerAaron Hill <aa1ronham@gmail.com>2019-12-11 09:50:11 -0500
commit7f23e6e8d7479d8a430e007fab9b195b7ea0d261 (patch)
treeaaa866fa4909e2fd82855c895dd0b85a674ed407 /src/librustc_codegen_llvm/asm.rs
parent033662dfbca088937b9cdfd3d9584015b5e375b2 (diff)
downloadrust-7f23e6e8d7479d8a430e007fab9b195b7ea0d261.tar.gz
rust-7f23e6e8d7479d8a430e007fab9b195b7ea0d261.zip
rustc: Link LLVM directly into rustc again
This commit builds on #65501 continue to simplify the build system and
compiler now that we no longer have multiple LLVM backends to ship by
default. Here this switches the compiler back to what it once was long
long ago, which is linking LLVM directly to the compiler rather than
dynamically loading it at runtime. The `codegen-backends` directory of
the sysroot no longer exists and all relevant support in the build
system is removed. Note that `rustc` still supports a dynamically loaded
codegen backend as it did previously, it just no longer supports
dynamically loaded codegen backends in its own sysroot.

Additionally as part of this the `librustc_codegen_llvm` crate now once
again explicitly depends on all of its crates instead of implicitly
loading them through the sysroot. This involved filling out its
`Cargo.toml` and deleting all the now-unnecessary `extern crate`
annotations in the header of the crate. (this in turn required adding a
number of imports for names of macros too).

The end results of this change are:

* Rustbuild's build process for the compiler as all the "oh don't forget
  the codegen backend" checks can be easily removed.
* Building `rustc_codegen_llvm` is much simpler since it's simply
  another compiler crate.
* Managing the dependencies of `rustc_codegen_llvm` is much simpler since
  it's "just another `Cargo.toml` to edit"
* The build process should be a smidge faster because there's more
  parallelism in the main rustc build step rather than splitting
  `librustc_codegen_llvm` out to its own step.
* The compiler is expected to be slightly faster by default because the
  codegen backend does not need to be dynamically loaded.
* Disabling LLVM as part of rustbuild is still supported, supporting
  multiple codegen backends is still supported, and dynamic loading of a
  codegen backend is still supported.
Diffstat (limited to 'src/librustc_codegen_llvm/asm.rs')
-rw-r--r--src/librustc_codegen_llvm/asm.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/librustc_codegen_llvm/asm.rs b/src/librustc_codegen_llvm/asm.rs
index abdd2e3e8db..fa43e082919 100644
--- a/src/librustc_codegen_llvm/asm.rs
+++ b/src/librustc_codegen_llvm/asm.rs
@@ -12,7 +12,7 @@ use syntax_pos::Span;
 
 use std::ffi::{CStr, CString};
 use libc::{c_uint, c_char};
-
+use log::debug;
 
 impl AsmBuilderMethods<'tcx> for Builder<'a, 'll, 'tcx> {
     fn codegen_inline_asm(