Skip to content
This repository was archived by the owner on Mar 11, 2025. It is now read-only.

Commit 791cc8a

Browse files
authored
Use target_os instead of target_arch for Solana conditional compilation (#3148)
1 parent c452348 commit 791cc8a

File tree

12 files changed

+17
-17
lines changed

12 files changed

+17
-17
lines changed

binary-option/program/src/entrypoint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![cfg(all(target_arch = "bpf", not(feature = "no-entrypoint")))]
1+
#![cfg(all(target_os = "solana", not(feature = "no-entrypoint")))]
22

33
use solana_program::{
44
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey,

binary-oracle-pair/program/src/entrypoint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Program entrypoint definitions
22
3-
#![cfg(all(target_arch = "bpf", not(feature = "no-entrypoint")))]
3+
#![cfg(all(target_os = "solana", not(feature = "no-entrypoint")))]
44

55
use crate::{error::PoolError, processor};
66
use solana_program::{

examples/rust/custom-heap/src/entrypoint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ unsafe impl std::alloc::GlobalAlloc for BumpAllocator {
4040
}
4141
}
4242

43-
#[cfg(target_arch = "bpf")]
43+
#[cfg(target_os = "solana")]
4444
#[global_allocator]
4545
static A: BumpAllocator = BumpAllocator;
4646

feature-proposal/program/src/entrypoint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Program entrypoint
22
3-
#![cfg(all(target_arch = "bpf", not(feature = "no-entrypoint")))]
3+
#![cfg(all(target_os = "solana", not(feature = "no-entrypoint")))]
44

55
use solana_program::{
66
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey,

governance/addin-mock/program/src/entrypoint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Program entrypoint
2-
#![cfg(all(target_arch = "bpf", not(feature = "no-entrypoint")))]
2+
#![cfg(all(target_os = "solana", not(feature = "no-entrypoint")))]
33

44
use crate::{error::VoterWeightAddinError, processor};
55
use solana_program::{

governance/chat/program/src/entrypoint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Program entrypoint
2-
#![cfg(all(target_arch = "bpf", not(feature = "no-entrypoint")))]
2+
#![cfg(all(target_os = "solana", not(feature = "no-entrypoint")))]
33

44
use crate::{error::GovernanceChatError, processor};
55
use solana_program::{

governance/program/src/entrypoint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//! Program entrypoint definitions
2-
#![cfg(all(target_arch = "bpf", not(feature = "no-entrypoint")))]
2+
#![cfg(all(target_os = "solana", not(feature = "no-entrypoint")))]
33

44
use crate::{error::GovernanceError, processor};
55
use solana_program::{

record/program/src/entrypoint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Program entrypoint
22
3-
#![cfg(all(target_arch = "bpf", not(feature = "no-entrypoint")))]
3+
#![cfg(all(target_os = "solana", not(feature = "no-entrypoint")))]
44

55
use solana_program::{
66
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey,

stake-pool/program/src/entrypoint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Program entrypoint
22
3-
#![cfg(all(target_arch = "bpf", not(feature = "no-entrypoint")))]
3+
#![cfg(all(target_os = "solana", not(feature = "no-entrypoint")))]
44

55
use {
66
crate::{error::StakePoolError, processor::Processor},

stateless-asks/program/src/entrypoint.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#![cfg(all(target_arch = "bpf", not(feature = "no-entrypoint")))]
1+
#![cfg(all(target_os = "solana", not(feature = "no-entrypoint")))]
22

33
use solana_program::{
44
account_info::AccountInfo, entrypoint, entrypoint::ProgramResult, pubkey::Pubkey,

0 commit comments

Comments
 (0)