rust/compiler/rustc_interface/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
..
callbacks.rs Fix outdated crate names in rustc_interface::callbacks 2021-04-07 11:45:27 -05:00
interface.rs Change the .unwrap to .expect with a helpful message 2021-03-15 20:45:45 +08:00
lib.rs Don't use a generator for BoxedResolver 2021-06-08 19:24:17 +02:00
passes.rs Use HTTPS links where possible 2021-06-23 16:26:46 -04:00
proc_macro_decls.rs Use () for proc_macro_decls_static. 2021-05-12 13:58:43 +02:00
queries.rs Revert "Let several methods take &Resolver instead of a BoxedResolver wrapper" 2021-06-08 19:24:17 +02:00
tests.rs Auto merge of #86267 - ZuseZ4:master, r=nagisa 2021-06-26 19:20:41 +00:00
util.rs Revert "Merge CrateDisambiguator into StableCrateId" 2021-06-07 10:37:45 +02:00