rust/compiler/rustc_session/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
..
cgu_reuse_tracker.rs Make Diagnostic::span_fatal unconditionally raise an error 2021-05-08 23:12:04 -04:00
code_stats.rs mv compiler to compiler/ 2020-08-30 18:45:07 +03:00
config.rs Only hash OutputTypes keys in non-crate-hash mode 2021-06-21 17:22:35 -07:00
filesearch.rs Adjust target search algorithm for rustlib path 2021-05-10 19:15:19 +03:00
lib.rs remove cfg(bootstrap) 2021-05-24 11:07:48 -04:00
options.rs Auto merge of #86267 - ZuseZ4:master, r=nagisa 2021-06-26 19:20:41 +00:00
output.rs Use command line metadata path if provided 2021-05-28 22:24:24 -07:00
parse.rs Implement span quoting for proc-macros 2021-05-12 00:51:31 -04:00
search_paths.rs use strip_prefix over starts_with and manual slicing based on pattern length (clippy::manual_strip) 2020-09-17 10:13:16 +02:00
session.rs Emit warnings for unused fields in custom targets. 2021-06-17 21:48:02 +02:00
utils.rs Implement RFC 2951: Native link modifiers 2021-05-05 16:04:25 -07:00