Skip to content

Commit

Permalink
Remove frozen-abi build script (#2911)
Browse files Browse the repository at this point in the history
* replace cfg(RUSTC_WITH_SPECIALIZATION) with cfg(feature = "frozen-abi")

* remove the build scripts for the two frozen-abi crates

* remove all rustc_version deps

* remove a rustc_version dep that I missed

* fix duplicate lines in Cargo.toml files

* remove build.rs from instruction crate

* remove rustc_version from instruction crate

* remove no-longer-needed check-cfg entries

* update lock file after rebase
  • Loading branch information
kevinheavey committed Sep 17, 2024
1 parent c4b42ab commit 6082e84
Show file tree
Hide file tree
Showing 107 changed files with 210 additions and 356 deletions.
31 changes: 0 additions & 31 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,6 @@ level = "warn"
check-cfg = [
'cfg(target_os, values("solana"))',
'cfg(feature, values("frozen-abi", "no-entrypoint"))',
'cfg(RUSTC_WITH_SPECIALIZATION)',
'cfg(RUSTC_WITHOUT_SPECIALIZATION)',
]

[workspace.dependencies]
Expand Down Expand Up @@ -338,7 +336,6 @@ reqwest = { version = "0.11.27", default-features = false }
reqwest-middleware = "0.2.5"
rolling-file = "0.2.0"
rpassword = "7.3"
rustc_version = "0.4"
rustls = { version = "0.23.13", default-features = false }
scopeguard = "1.2.0"
semver = "1.0.23"
Expand Down
12 changes: 6 additions & 6 deletions accounts-db/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,12 @@ serde = { workspace = true, features = ["rc"] }
serde_derive = { workspace = true }
smallvec = { workspace = true, features = ["const_generics"] }
solana-bucket-map = { workspace = true }
solana-frozen-abi = { workspace = true, optional = true }
solana-frozen-abi-macro = { workspace = true, optional = true }
solana-frozen-abi = { workspace = true, optional = true, features = [
"frozen-abi",
] }
solana-frozen-abi-macro = { workspace = true, optional = true, features = [
"frozen-abi",
] }
solana-inline-spl = { workspace = true }
solana-lattice-hash = { workspace = true }
solana-measure = { workspace = true }
Expand Down Expand Up @@ -79,17 +83,13 @@ test-case = { workspace = true }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[build-dependencies]
rustc_version = { workspace = true, optional = true }

[features]
dev-context-only-utils = [
"dep:qualifier_attr",
"dep:solana-stake-program",
"dep:solana-vote-program",
]
frozen-abi = [
"dep:rustc_version",
"dep:solana-frozen-abi",
"dep:solana-frozen-abi-macro",
"solana-sdk/frozen-abi",
Expand Down
1 change: 0 additions & 1 deletion accounts-db/build.rs

This file was deleted.

2 changes: 1 addition & 1 deletion accounts-db/src/accounts_db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2415,7 +2415,7 @@ pub fn make_min_priority_thread_pool() -> ThreadPool {
.unwrap()
}

#[cfg(all(RUSTC_WITH_SPECIALIZATION, feature = "frozen-abi"))]
#[cfg(feature = "frozen-abi")]
impl solana_frozen_abi::abi_example::AbiExample for AccountsDb {
fn example() -> Self {
let accounts_db = AccountsDb::new_single_for_tests();
Expand Down
2 changes: 1 addition & 1 deletion accounts-db/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
#![allow(clippy::arithmetic_side_effects)]

#[macro_use]
Expand Down
12 changes: 6 additions & 6 deletions bloom/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,12 @@ log = { workspace = true }
rand = { workspace = true }
serde = { workspace = true, features = ["rc"] }
serde_derive = { workspace = true }
solana-frozen-abi = { workspace = true, optional = true }
solana-frozen-abi-macro = { workspace = true, optional = true }
solana-frozen-abi = { workspace = true, optional = true, features = [
"frozen-abi",
] }
solana-frozen-abi-macro = { workspace = true, optional = true, features = [
"frozen-abi",
] }
solana-sanitize = { workspace = true }
solana-sdk = { workspace = true }

Expand All @@ -31,12 +35,8 @@ name = "solana_bloom"
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[build-dependencies]
rustc_version = { workspace = true, optional = true }

[features]
frozen-abi = [
"dep:rustc_version",
"dep:solana-frozen-abi",
"dep:solana-frozen-abi-macro",
"solana-sdk/frozen-abi",
Expand Down
1 change: 0 additions & 1 deletion bloom/build.rs

This file was deleted.

2 changes: 1 addition & 1 deletion bloom/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
pub mod bloom;

#[cfg_attr(feature = "frozen-abi", macro_use)]
Expand Down
8 changes: 3 additions & 5 deletions builtins-default-costs/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ solana-address-lookup-table-program = { workspace = true }
solana-bpf-loader-program = { workspace = true }
solana-compute-budget-program = { workspace = true }
solana-config-program = { workspace = true }
solana-frozen-abi = { workspace = true, optional = true }
solana-frozen-abi = { workspace = true, optional = true, features = [
"frozen-abi",
] }
solana-loader-v4-program = { workspace = true }
solana-sdk = { workspace = true }
solana-stake-program = { workspace = true }
Expand All @@ -35,12 +37,8 @@ rand = "0.8.5"
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[build-dependencies]
rustc_version = { workspace = true, optional = true }

[features]
frozen-abi = [
"dep:rustc_version",
"dep:solana-frozen-abi",
"solana-vote-program/frozen-abi",
]
Expand Down
1 change: 0 additions & 1 deletion builtins-default-costs/build.rs

This file was deleted.

2 changes: 1 addition & 1 deletion builtins-default-costs/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))]
#![cfg_attr(feature = "frozen-abi", feature(min_specialization))]
#![allow(clippy::arithmetic_side_effects)]
use {
ahash::AHashMap,
Expand Down
3 changes: 0 additions & 3 deletions cargo-registry/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,5 @@ toml = { workspace = true }
[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]

[build-dependencies]
rustc_version = { workspace = true, optional = true }

[features]
dev-context-only-utils = []
Loading

0 comments on commit 6082e84

Please sign in to comment.