diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2022-03-20 16:55:21 +0100 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2022-03-20 16:55:21 +0100 |
| commit | ef4ce72919d1a16ad5aed4108d5abcf4d5c2cdc8 (patch) | |
| tree | 5e6b18b3d26ff3fdf8ed1347edd8eb3b8a234a38 /compiler/rustc_codegen_cranelift/src/driver | |
| parent | c7ce69faf2a7ea16c15d922985ca27ba70da30ee (diff) | |
| parent | 370c397ec9169809e5ad270079712e0043514240 (diff) | |
| download | rust-ef4ce72919d1a16ad5aed4108d5abcf4d5c2cdc8.tar.gz rust-ef4ce72919d1a16ad5aed4108d5abcf4d5c2cdc8.zip | |
Merge commit '370c397ec9169809e5ad270079712e0043514240' into sync_cg_clif-2022-03-20
Diffstat (limited to 'compiler/rustc_codegen_cranelift/src/driver')
| -rw-r--r-- | compiler/rustc_codegen_cranelift/src/driver/jit.rs | 7 |
1 files changed, 4 insertions, 3 deletions
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 rustc_span::Symbol; 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 @@ thread_local! { } /// The Sender owned by the rustc thread -static GLOBAL_MESSAGE_SENDER: SyncOnceCell<Mutex<mpsc::Sender<UnsafeMessage>>> = - SyncOnceCell::new(); +static GLOBAL_MESSAGE_SENDER: OnceCell<Mutex<mpsc::Sender<UnsafeMessage>>> = OnceCell::new(); /// A message that is sent from the jitted runtime to the rustc thread. /// Senders are responsible for upholding `Send` semantics. |
