You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cargo fails to compile custom target with build-std (std, panic_abort) depending on the file name of the json target spec (see steps below). Source code.
The target.json files used for this were copies of the wasm32-unknown-unknown target spec with added "features": "+atomics,+bulk-memory". The problem also persists when using rustflags.
Steps
(All steps are with build-std in the config.toml file and target-feature being set one way or another)
compare target files
diff target.json wasm32-target.json
<no output>
wasm-target.json
cargo +nightly build --target=wasm32-target.json
Finished dev [unoptimized + debuginfo] target(s) in 0.05s
target.json
cargo +nightly build --target=target.json
error: `futex_condvar::Condvar::new` is not yet stable as a constfn
--> [HOME_DIR]/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sync/condvar.rs:127:26
|
127 | Condvar{inner: sys::Condvar::new()}
| ^^^^^^^^^^^^^^^^^^^
error: `futex_mutex::Mutex::new` is not yet stable as a constfn
--> [HOME_DIR]/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sync/mutex.rs:230:24
|
230 | Mutex{inner: sys::Mutex::new(),poison: poison::Flag::new(),data:UnsafeCell::new(t)}
| ^^^^^^^^^^^^^^^^^
error: `sys_common::once::futex::Once::new` is not yet stable as a constfn
--> [HOME_DIR]/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sync/once.rs:76:23
|
76 | Once{inner: sys::Once::new()}
| ^^^^^^^^^^^^^^^^
error: `futex_rwlock::RwLock::new` is not yet stable as a constfn
--> [HOME_DIR]/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sync/rwlock.rs:161:25
|
161 | RwLock{inner: sys::RwLock::new(),poison: poison::Flag::new(),data:UnsafeCell::new(t)}
| ^^^^^^^^^^^^^^^^^^
Possible Solution(s)
No response
Notes
Tested with a few nightly versions of the last week.
Problem
Cargo fails to compile custom target with
build-std
(std, panic_abort) depending on the file name of the json target spec (see steps below). Source code.The target.json files used for this were copies of the
wasm32-unknown-unknown
target spec with added"features": "+atomics,+bulk-memory"
. The problem also persists when usingrustflags
.Steps
(All steps are with
build-std
in theconfig.toml
file andtarget-feature
being set one way or another)compare target files
wasm-target.json
target.json
Possible Solution(s)
No response
Notes
Tested with a few nightly versions of the last week.
Version
The text was updated successfully, but these errors were encountered: