Add in syscall stubs to fix non-bpf builds (#71)
This commit is contained in:
parent
a1259e2deb
commit
76a61d700f
|
@ -240,6 +240,10 @@ dependencies = [
|
||||||
"thiserror 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)",
|
"thiserror 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "solana-sdk-bpf-test"
|
||||||
|
version = "1.2.3"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "solana-sdk-macro"
|
name = "solana-sdk-macro"
|
||||||
version = "1.2.4"
|
version = "1.2.4"
|
||||||
|
@ -256,6 +260,7 @@ name = "spl-memo"
|
||||||
version = "1.0.0"
|
version = "1.0.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"solana-sdk 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
"solana-sdk 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
"solana-sdk-bpf-test 1.2.3",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
|
@ -12,6 +12,7 @@ edition = "2018"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
solana-sdk = { version = "1.2.4", default-features = false, features=["program"] }
|
solana-sdk = { version = "1.2.4", default-features = false, features=["program"] }
|
||||||
|
solana-sdk-bpf-test = { path = "../bin/bpf-sdk/rust/test", default-features = false }
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "spl_memo"
|
name = "spl_memo"
|
||||||
|
|
|
@ -16,6 +16,10 @@ fn process_instruction<'a>(
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Pulls in the stubs required for `info!()`
|
||||||
|
#[cfg(not(target_arch = "bpf"))]
|
||||||
|
solana_sdk_bpf_test::stubs!();
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
Loading…
Reference in New Issue