* Prevent stub inclusion when building shared objects (#10875)
(cherry picked from commit 52526a9bc2)
# Conflicts:
#	programs/bpf/rust/128bit/src/lib.rs
#	programs/bpf/rust/alloc/src/lib.rs
#	programs/bpf/rust/dep_crate/src/lib.rs
#	programs/bpf/rust/invoke/src/lib.rs
#	programs/bpf/rust/invoked/src/lib.rs
#	programs/bpf/rust/iter/src/lib.rs
#	programs/bpf/rust/many_args/src/lib.rs
#	programs/bpf/rust/many_args_dep/src/lib.rs
#	programs/bpf/rust/noop/src/lib.rs
#	programs/bpf/rust/param_passing/src/lib.rs
#	programs/bpf/rust/param_passing_dep/src/lib.rs
#	sdk/bpf/rust/test/src/lib.rs
* nudge
Co-authored-by: Jack May <jack@solana.com>
			
			
This commit is contained in:
		| @@ -53,7 +53,7 @@ pub extern "C" fn entrypoint(_input: *mut u8) -> u64 { | |||||||
| #[cfg(test)] | #[cfg(test)] | ||||||
| mod test { | mod test { | ||||||
|     use super::*; |     use super::*; | ||||||
|     // Pulls in the stubs required for `info!()` |     // Pull in syscall stubs when building for non-BPF targets | ||||||
|     solana_sdk::program_stubs!(); |     solana_sdk::program_stubs!(); | ||||||
|  |  | ||||||
|     #[test] |     #[test] | ||||||
|   | |||||||
| @@ -85,7 +85,7 @@ pub extern "C" fn entrypoint(_input: *mut u8) -> u64 { | |||||||
| #[cfg(test)] | #[cfg(test)] | ||||||
| mod test { | mod test { | ||||||
|     use super::*; |     use super::*; | ||||||
|     // Pulls in the stubs required for `info!()` |     // Pull in syscall stubs when building for non-BPF targets | ||||||
|     solana_sdk::program_stubs!(); |     solana_sdk::program_stubs!(); | ||||||
|  |  | ||||||
|     #[test] |     #[test] | ||||||
|   | |||||||
| @@ -20,7 +20,7 @@ pub extern "C" fn entrypoint(_input: *mut u8) -> u64 { | |||||||
| #[cfg(test)] | #[cfg(test)] | ||||||
| mod test { | mod test { | ||||||
|     use super::*; |     use super::*; | ||||||
|     // Pulls in the stubs required for `info!()` |     // Pull in syscall stubs when building for non-BPF targets | ||||||
|     solana_sdk::program_stubs!(); |     solana_sdk::program_stubs!(); | ||||||
|  |  | ||||||
|     #[test] |     #[test] | ||||||
|   | |||||||
| @@ -201,4 +201,5 @@ fn process_instruction( | |||||||
|     Ok(()) |     Ok(()) | ||||||
| } | } | ||||||
|  |  | ||||||
|  | // Pull in syscall stubs when building for non-BPF targets | ||||||
| solana_sdk::program_stubs!(); | solana_sdk::program_stubs!(); | ||||||
|   | |||||||
| @@ -192,4 +192,5 @@ fn process_instruction( | |||||||
|     Ok(()) |     Ok(()) | ||||||
| } | } | ||||||
|  |  | ||||||
|  | // Pull in syscall stubs when building for non-BPF targets | ||||||
| solana_sdk::program_stubs!(); | solana_sdk::program_stubs!(); | ||||||
|   | |||||||
| @@ -21,7 +21,7 @@ pub extern "C" fn entrypoint(_input: *mut u8) -> u64 { | |||||||
| #[cfg(test)] | #[cfg(test)] | ||||||
| mod test { | mod test { | ||||||
|     use super::*; |     use super::*; | ||||||
|     // Pulls in the stubs required for `info!()` |     // Pull in syscall stubs when building for non-BPF targets | ||||||
|     solana_sdk::program_stubs!(); |     solana_sdk::program_stubs!(); | ||||||
|  |  | ||||||
|     #[test] |     #[test] | ||||||
|   | |||||||
| @@ -29,7 +29,7 @@ pub extern "C" fn entrypoint(_input: *mut u8) -> u64 { | |||||||
| #[cfg(test)] | #[cfg(test)] | ||||||
| mod test { | mod test { | ||||||
|     use super::*; |     use super::*; | ||||||
|     // Pulls in the stubs required for `info!()` |     // Pull in syscall stubs when building for non-BPF targets | ||||||
|     solana_sdk::program_stubs!(); |     solana_sdk::program_stubs!(); | ||||||
|  |  | ||||||
|     #[test] |     #[test] | ||||||
|   | |||||||
| @@ -51,7 +51,7 @@ pub fn many_args_sret( | |||||||
| #[cfg(test)] | #[cfg(test)] | ||||||
| mod test { | mod test { | ||||||
|     use super::*; |     use super::*; | ||||||
|     // Pulls in the stubs required for `info!()` |     // Pull in syscall stubs when building for non-BPF targets | ||||||
|     solana_sdk::program_stubs!(); |     solana_sdk::program_stubs!(); | ||||||
|  |  | ||||||
|     #[test] |     #[test] | ||||||
|   | |||||||
| @@ -67,7 +67,7 @@ fn process_instruction( | |||||||
| #[cfg(test)] | #[cfg(test)] | ||||||
| mod test { | mod test { | ||||||
|     use super::*; |     use super::*; | ||||||
|     // Pulls in the stubs required for `info!()` |     // Pull in syscall stubs when building for non-BPF targets | ||||||
|     solana_sdk::program_stubs!(); |     solana_sdk::program_stubs!(); | ||||||
|  |  | ||||||
|     #[test] |     #[test] | ||||||
|   | |||||||
| @@ -26,7 +26,7 @@ pub extern "C" fn entrypoint(_input: *mut u8) -> u64 { | |||||||
| #[cfg(test)] | #[cfg(test)] | ||||||
| mod test { | mod test { | ||||||
|     use super::*; |     use super::*; | ||||||
|     // Pulls in the stubs required for `info!()` |     // Pull in syscall stubs when building for non-BPF targets | ||||||
|     solana_sdk::program_stubs!(); |     solana_sdk::program_stubs!(); | ||||||
|  |  | ||||||
|     #[test] |     #[test] | ||||||
|   | |||||||
| @@ -27,7 +27,7 @@ impl<'a> TestDep { | |||||||
| #[cfg(test)] | #[cfg(test)] | ||||||
| mod test { | mod test { | ||||||
|     use super::*; |     use super::*; | ||||||
|     // Pulls in the stubs required for `info!()` |     // Pull in syscall stubs when building for non-BPF targets | ||||||
|     solana_sdk::program_stubs!(); |     solana_sdk::program_stubs!(); | ||||||
|  |  | ||||||
|     #[test] |     #[test] | ||||||
|   | |||||||
| @@ -1,15 +0,0 @@ | |||||||
| [package] |  | ||||||
| name = "solana-sdk-bpf-test" |  | ||||||
| version = "1.2.9" |  | ||||||
| description = "Solana BPF SDK test utilities" |  | ||||||
| authors = ["Solana Maintainers <maintainers@solana.com>"] |  | ||||||
| repository = "https://github.com/solana-labs/solana" |  | ||||||
| license = "Apache-2.0" |  | ||||||
| homepage = "https://solana.com/" |  | ||||||
| edition = "2018" |  | ||||||
|  |  | ||||||
| [workspace] |  | ||||||
| members = [] |  | ||||||
|  |  | ||||||
| [package.metadata.docs.rs] |  | ||||||
| targets = ["x86_64-unknown-linux-gnu"] |  | ||||||
		Reference in New Issue
	
	Block a user