Skip to content

Commit

Permalink
Use #[no_debug] to work around LLVM problem with rustc_driver::get_tr…
Browse files Browse the repository at this point in the history
…ans::LOAD.
  • Loading branch information
michaelwoerister committed Apr 18, 2018
1 parent 0ad34dc commit a95f876
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/librustc_driver/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#![feature(quote)]
#![feature(rustc_diagnostic_macros)]
#![feature(set_stdio)]
#![feature(no_debug)]

extern crate arena;
extern crate getopts;
Expand Down Expand Up @@ -230,6 +231,9 @@ fn load_backend_from_dylib(path: &Path) -> fn() -> Box<TransCrate> {

pub fn get_trans(sess: &Session) -> Box<TransCrate> {
static INIT: Once = ONCE_INIT;

#[allow(deprecated)]
#[no_debug]
static mut LOAD: fn() -> Box<TransCrate> = || unreachable!();

INIT.call_once(|| {
Expand Down

0 comments on commit a95f876

Please sign in to comment.