X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_codegen_cranelift%2Fsrc%2Fdriver%2Fjit.rs;h=6c22296db716d297cf02b57e5f5fac7ddfe1fba4;hb=05d22212e89588e7c443cc6b9bc0e4e02fdfbc8d;hp=9e07528313dd8911d2f5cd2056818afe8ab646c1;hpb=ba2d5ede70ed7e37d7f13a397b9d554e2386a19c;p=rust.git diff --git a/compiler/rustc_codegen_cranelift/src/driver/jit.rs b/compiler/rustc_codegen_cranelift/src/driver/jit.rs index 9e07528313d..6c22296db71 100644 --- a/compiler/rustc_codegen_cranelift/src/driver/jit.rs +++ b/compiler/rustc_codegen_cranelift/src/driver/jit.rs @@ -3,7 +3,6 @@ use std::cell::RefCell; use std::ffi::CString; -use std::lazy::SyncOnceCell; use std::os::raw::{c_char, c_int}; use std::sync::{mpsc, Mutex}; @@ -14,6 +13,9 @@ use cranelift_jit::{JITBuilder, JITModule}; +// FIXME use std::lazy::SyncOnceCell once it stabilizes +use once_cell::sync::OnceCell; + use crate::{prelude::*, BackendConfig}; use crate::{CodegenCx, CodegenMode}; @@ -27,8 +29,7 @@ struct JitState { } /// The Sender owned by the rustc thread -static GLOBAL_MESSAGE_SENDER: SyncOnceCell>> = - SyncOnceCell::new(); +static GLOBAL_MESSAGE_SENDER: OnceCell>> = OnceCell::new(); /// A message that is sent from the jitted runtime to the rustc thread. /// Senders are responsible for upholding `Send` semantics.