-
Notifications
You must be signed in to change notification settings - Fork 517
Open
Labels
Description
Hello! I'm trying to enable Loom in https://github.com/salsa-rs/salsa/. Since Salsa uses crossbeam (namely, SegQueue and AtomicCell) to write some fiddly, unsafe code, I wanted to also enable crossbeam's crossbeam_loom feature flag. Unfortunately, I've been struggling to enable it via RUSTFLAGS. For instance, a env RUSTFLAGS="--cfg=crossbeam_loom" cargo check doesn't seem to enable correctly enable crossbeam_util's Loom flag, failing with with errors along the lines of:
error[E0433]: failed to resolve: use of undeclared crate or module `loom`
--> /Users/dbarsky/.cargo/registry/src/index.crates.io-6f17d22bba15001f/crossbeam-utils-0.8.21/src/lib.rs:49:24
|
49 | pub(crate) use loom::hint::spin_loop;
| ^^^^ use of undeclared crate or module `loom`
error[E0433]: failed to resolve: use of undeclared crate or module `loom`
--> /Users/dbarsky/.cargo/registry/src/index.crates.io-6f17d22bba15001f/crossbeam-utils-0.8.21/src/lib.rs:53:28
|
53 | pub(crate) use loom::sync::atomic::{
| ^^^^ use of undeclared crate or module `loom`
error[E0433]: failed to resolve: use of undeclared crate or module `loom`
--> /Users/dbarsky/.cargo/registry/src/index.crates.io-6f17d22bba15001f/crossbeam-utils-0.8.21/src/lib.rs:63:28
|
63 | pub(crate) use loom::sync::atomic::fence as compiler_fence;
| ^^^^ use of undeclared crate or module `loom`
error[E0433]: failed to resolve: use of undeclared crate or module `loom`
--> /Users/dbarsky/.cargo/registry/src/index.crates.io-6f17d22bba15001f/crossbeam-utils-0.8.21/src/lib.rs:65:24
|
65 | pub(crate) use loom::sync::{Arc, Condvar, Mutex};
| ^^^^ use of undeclared crate or module `loom`How can I enable crossbeam's Loom flag? Is it... even possible?