rust/compiler/rustc_codegen_llvm/src
bors a1411de9de Auto merge of #86267 - ZuseZ4:master, r=nagisa
Allow loading of llvm plugins on nightly

Based on a discussion in  #82734 / with `@wsmoses.`
Mainly moves [this](0149bc4e7e) behind a -Z flag, so it can only be used on nightly,
as requested by `@nagisa` in https://github.com/rust-lang/rust/issues/82734#issuecomment-835863940

This change allows loading of llvm plugins like Enzyme.
Right now it also requires a shared library LLVM build of rustc for symbol resolution.

```rust
// test.rs
extern { fn __enzyme_autodiff(_: usize, ...) -> f64; }

fn square(x : f64) -> f64 {
   return x * x;
}

fn main() {
   unsafe {
      println!("Hello, world {} {}!", square(3.0), __enzyme_autodiff(square as usize, 3.0));
   }
}
```
```
./rustc test.rs -Z llvm-plugins="./LLVMEnzyme-12.so" -C passes="enzyme"
./test
Hello, world 9 6!
```

I will try to figure out how to simplify the usage and get this into stable in a later iteration,
but having this on nightly will already help testing further steps.
2021-06-26 19:20:41 +00:00
..
back Add first cut of functionality for #58713: support for #[link(kind = "raw-dylib")]. 2021-06-04 18:01:35 -07:00
coverageinfo Auto merge of #85178 - cjgillot:local-crate, r=oli-obk 2021-05-17 01:42:03 +00:00
debuginfo Respond to review feedback 2021-06-02 10:23:12 -04:00
llvm Use HTTPS links where possible 2021-06-23 16:26:46 -04:00
abi.rs Enable mutable noalias by default for LLVM 12 2021-03-21 20:10:54 +01:00
allocator.rs Remove redundant to_string calls 2021-02-17 11:25:55 +01:00
asm.rs Add support for BPF inline assembly 2021-05-23 18:03:27 +10:00
attributes.rs Auto merge of #83610 - bjorn3:driver_cleanup, r=cjgillot 2021-05-12 08:38:03 +00:00
base.rs Drop metadata_encoding_version. 2021-06-01 21:12:27 +02:00
builder.rs Use HTTPS links where possible 2021-06-23 16:26:46 -04:00
callee.rs Fix static relocation model for PowerPC64 2021-05-28 03:48:39 +02:00
common.rs Update and improve rustc_codegen_{llvm,ssa} docs 2020-12-22 19:42:23 -08:00
consts.rs Fix static relocation model for PowerPC64 2021-05-28 03:48:39 +02:00
context.rs Use HTTPS links where possible 2021-06-23 16:26:46 -04:00
declare.rs Make declare_cfn more flexible 2021-01-23 17:19:49 -05:00
intrinsic.rs rustc_codegen_ssa: append blocks to functions w/o creating a builder. 2021-05-17 00:04:09 +03:00
lib.rs Move crate_name field from OngoingCodegen to CrateInfo 2021-06-04 13:20:05 +02:00
llvm_util.rs Remove dropping of loaded plugins and better debug info 2021-06-26 19:30:09 +02:00
mono_item.rs Fix static relocation model for PowerPC64 2021-05-28 03:48:39 +02:00
type_.rs Use ty::{IntTy,UintTy,FloatTy} in rustc 2021-01-18 21:09:30 +01:00
type_of.rs Revert "cg_llvm: fewer_names in uncached_llvm_type" 2020-12-17 16:40:47 +00:00
va_arg.rs Add big-endian support for AArch64 va_arg 2021-01-27 22:47:56 +00:00
value.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00