More target_arch = "bpf" => target_os = "solana"

Continuing the work started in https://github.com/solana-labs/solana/pull/25358
This commit is contained in:
Alessandro Decina 2022-05-20 12:51:23 +10:00
parent c54e06355f
commit 9bf07ee206
5 changed files with 12 additions and 9 deletions

View File

@ -330,7 +330,7 @@ custom-panic = []
Then provide a custom implementation of the panic handler:
```rust
#[cfg(all(feature = "custom-panic", target_arch = "bpf"))]
#[cfg(all(feature = "custom-panic", target_os = "solana"))]
#[no_mangle]
fn custom_panic(info: &core::panic::PanicInfo<'_>) {
solana_program::msg!("program custom panic enabled");
@ -351,7 +351,7 @@ programs can provide their own custom panic handler with an empty
implementation.
```rust
#[cfg(all(feature = "custom-panic", target_arch = "bpf"))]
#[cfg(all(feature = "custom-panic", target_os = "solana"))]
#[no_mangle]
fn custom_panic(info: &core::panic::PanicInfo<'_>) {
// Do nothing to save space

View File

@ -21,12 +21,15 @@ sha2 = "0.10.2"
solana-frozen-abi-macro = { path = "macro", version = "=1.11.0" }
thiserror = "1.0"
[target.'cfg(not(target_arch = "bpf"))'.dependencies]
generic-array = { version = "0.14.5", default-features = false, features = ["serde", "more_lengths"] }
[target.'cfg(not(target_os = "solana"))'.dependencies]
generic-array = { version = "0.14.5", default-features = false, features = [
"serde",
"more_lengths"
] }
im = { version = "15.1.0", features = ["rayon", "serde"] }
memmap2 = "0.5.3"
[target.'cfg(not(target_arch = "bpf"))'.dev-dependencies]
[target.'cfg(not(target_os = "solana"))'.dev-dependencies]
solana-logger = { path = "../logger", version = "=1.11.0" }
[build-dependencies]

View File

@ -21,7 +21,7 @@ solana-frozen-abi-macro = { path = "../../frozen-abi/macro", version = "=1.11.0"
solana-program = { path = "../../sdk/program", version = "=1.11.0" }
thiserror = "1.0"
[target.'cfg(not(target_arch = "bpf"))'.dependencies]
[target.'cfg(not(target_os = "solana"))'.dependencies]
solana-program-runtime = { path = "../../program-runtime", version = "=1.11.0" }
solana-sdk = { path = "../../sdk", version = "=1.11.0" }

View File

@ -35,7 +35,7 @@ solana-frozen-abi-macro = { path = "../../frozen-abi/macro", version = "=1.11.0"
solana-sdk-macro = { path = "../macro", version = "=1.11.0" }
thiserror = "1.0"
[target.'cfg(not(target_arch = "bpf"))'.dependencies]
[target.'cfg(not(target_os = "solana"))'.dependencies]
bitflags = "1.3.1"
base64 = "0.13"
curve25519-dalek = "3.2.1"
@ -44,7 +44,7 @@ rand = "0.7.0"
itertools = "0.10.1"
wasm-bindgen = "0.2"
[target.'cfg(not(target_arch = "bpf"))'.dev-dependencies]
[target.'cfg(not(target_os = "solana"))'.dev-dependencies]
solana-logger = { path = "../../logger", version = "=1.11.0" }
[target.'cfg(target_arch = "wasm32")'.dependencies]

View File

@ -14,7 +14,7 @@ num-derive = "0.3"
num-traits = "0.2"
solana-program = { path = "../sdk/program", version = "=1.11.0" }
[target.'cfg(not(target_arch = "bpf"))'.dependencies]
[target.'cfg(not(target_os = "solana"))'.dependencies]
aes-gcm-siv = "0.10.3"
arrayref = "0.3.6"
bincode = "1"