From 20549d93420bff03b74c38dd1194ae479ba0824c Mon Sep 17 00:00:00 2001 From: Joe C Date: Mon, 10 Jun 2024 13:09:10 -0500 Subject: [PATCH] compute budget: add frozen-abi build script (#1653) compute budget: frozen-abi build script --- Cargo.lock | 1 + compute-budget/Cargo.toml | 3 +++ compute-budget/build.rs | 1 + compute-budget/src/lib.rs | 1 + programs/sbf/Cargo.lock | 1 + 5 files changed, 7 insertions(+) create mode 120000 compute-budget/build.rs diff --git a/Cargo.lock b/Cargo.lock index e70d6aa3d06f78..4b512e41332e27 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -5906,6 +5906,7 @@ dependencies = [ name = "solana-compute-budget" version = "2.0.0" dependencies = [ + "rustc_version 0.4.0", "solana-frozen-abi", "solana-sdk", ] diff --git a/compute-budget/Cargo.toml b/compute-budget/Cargo.toml index c011176b048ff5..211aa9394806b4 100644 --- a/compute-budget/Cargo.toml +++ b/compute-budget/Cargo.toml @@ -13,6 +13,9 @@ edition = { workspace = true } solana-frozen-abi = { workspace = true, optional = true } solana-sdk = { workspace = true } +[build-dependencies] +rustc_version = { workspace = true } + [features] frozen-abi = [ "dep:solana-frozen-abi", diff --git a/compute-budget/build.rs b/compute-budget/build.rs new file mode 120000 index 00000000000000..ae66c237c5f4fd --- /dev/null +++ b/compute-budget/build.rs @@ -0,0 +1 @@ +../frozen-abi/build.rs \ No newline at end of file diff --git a/compute-budget/src/lib.rs b/compute-budget/src/lib.rs index 8516457af572d5..dd4b3d45f9b219 100644 --- a/compute-budget/src/lib.rs +++ b/compute-budget/src/lib.rs @@ -1,4 +1,5 @@ //! Solana compute budget types and default configurations. +#![cfg_attr(RUSTC_WITH_SPECIALIZATION, feature(min_specialization))] pub mod compute_budget; pub mod compute_budget_processor; diff --git a/programs/sbf/Cargo.lock b/programs/sbf/Cargo.lock index ffb46b314280ae..e522c62d2bd955 100644 --- a/programs/sbf/Cargo.lock +++ b/programs/sbf/Cargo.lock @@ -4867,6 +4867,7 @@ dependencies = [ name = "solana-compute-budget" version = "2.0.0" dependencies = [ + "rustc_version", "solana-sdk", ]