Skip to content

Commit

Permalink
Implement DynSend
Browse files Browse the repository at this point in the history
  • Loading branch information
antoyo committed Oct 9, 2023
1 parent 2cbac9c commit 1e4caeb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions compiler/rustc_codegen_gcc/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ use rustc_codegen_ssa::back::write::{CodegenContext, FatLtoInput, ModuleConfig,
use rustc_codegen_ssa::back::lto::{LtoModuleCodegen, SerializedModule, ThinModule};
use rustc_codegen_ssa::target_features::supported_target_features;
use rustc_data_structures::fx::FxIndexMap;
#[cfg(parallel_compiler)]
use rustc_data_structures::sync::DynSend;
use rustc_codegen_ssa::traits::{CodegenBackend, ExtraBackendMethods, ThinBufferMethods, WriteBackendMethods};
use rustc_errors::{DiagnosticMessage, ErrorGuaranteed, Handler, SubdiagnosticMessage};
use rustc_fluent_macro::fluent_messages;
Expand Down Expand Up @@ -143,6 +145,9 @@ pub struct LockedTargetInfo {
info: Arc<Mutex<TargetInfo>>,
}

#[cfg(parallel_compiler)]
unsafe impl DynSend for LockedTargetInfo {}

impl LockedTargetInfo {
fn cpu_supports(&self, feature: &str) -> bool {
self.info.lock().expect("lock").cpu_supports(feature)
Expand Down

0 comments on commit 1e4caeb

Please sign in to comment.