Add in syscall stubs to fix non-bpf builds (#71)

This commit is contained in:
Jack May 2020-06-30 22:57:12 -07:00 committed by GitHub
parent a1259e2deb
commit 76a61d700f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 0 deletions

5
memo/Cargo.lock generated
View File

@ -240,6 +240,10 @@ dependencies = [
"thiserror 1.0.20 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "solana-sdk-bpf-test"
version = "1.2.3"
[[package]]
name = "solana-sdk-macro"
version = "1.2.4"
@ -256,6 +260,7 @@ name = "spl-memo"
version = "1.0.0"
dependencies = [
"solana-sdk 1.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"solana-sdk-bpf-test 1.2.3",
]
[[package]]

View File

@ -12,6 +12,7 @@ edition = "2018"
[dependencies]
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]
name = "spl_memo"

View File

@ -16,6 +16,10 @@ fn process_instruction<'a>(
Ok(())
}
// Pulls in the stubs required for `info!()`
#[cfg(not(target_arch = "bpf"))]
solana_sdk_bpf_test::stubs!();
#[cfg(test)]
mod tests {
use super::*;