Skip to content

Commit acae767

Browse files
LucasStedmakarov
authored andcommitted
Back-port Bump platform tools version (from solana-labs/solana solana-labs#35330) (anza-xyz#362)
Bump platform tools version (solana-labs#35330) Co-authored-by: Dmitri Makarov <dmakarov@users.noreply.github.com>
1 parent 4fc2a30 commit acae767

File tree

7 files changed

+32
-9
lines changed

7 files changed

+32
-9
lines changed

programs/sbf/rust/sanity/src/lib.rs

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,21 @@ struct SStruct {
1616
z: u64,
1717
}
1818

19+
#[allow(dead_code)]
20+
#[repr(C)]
21+
enum TestEnum {
22+
VariantOne,
23+
VariantTwo,
24+
}
25+
26+
#[allow(dead_code)]
27+
#[allow(clippy::enum_clike_unportable_variant)]
28+
#[repr(C)]
29+
enum Test64BitEnum {
30+
VariantOne,
31+
VariantTwo = 0xFFFFFFFFF,
32+
}
33+
1934
#[inline(never)]
2035
fn return_sstruct() -> SStruct {
2136
SStruct { x: 1, y: 2, z: 3 }
@@ -72,6 +87,14 @@ pub fn process_instruction(
7287
assert!(1.9986f64 < num && num < 2.0f64);
7388
}
7489

90+
{
91+
// #[repr(C) enums must not change size between compiler version
92+
// 32-bit for #[repr(C)] enum
93+
assert_eq!(std::mem::size_of::<TestEnum>(), 4);
94+
// 64-bit for enum with a declared value
95+
assert_eq!(std::mem::size_of::<Test64BitEnum>(), 8);
96+
}
97+
7598
check_type_assumptions();
7699

77100
sol_log_compute_units();

programs/sbf/tests/programs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1356,7 +1356,7 @@ fn assert_instruction_count() {
13561356
#[cfg(feature = "sbf_c")]
13571357
{
13581358
programs.extend_from_slice(&[
1359-
("alloc", 11502),
1359+
("alloc", 14575),
13601360
("sbf_to_sbf", 313),
13611361
("multiple_static", 208),
13621362
("noop", 5),

sdk/bpf/scripts/install.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,16 +109,16 @@ if [[ ! -e criterion-$version.md || ! -e criterion ]]; then
109109
fi
110110

111111
# Install Rust-BPF
112-
version=v1.39
112+
version=v1.41
113113
if [[ ! -e bpf-tools-$version.md || ! -e bpf-tools ]]; then
114114
(
115115
set -e
116116
rm -rf bpf-tools*
117117
rm -rf xargo
118118
job="download \
119-
https://github.com/solana-labs/bpf-tools/releases/download \
119+
https://github.com/anza-xyz/platform-tools/releases/download \
120120
$version \
121-
solana-bpf-tools-${machine}-${arch}.tar.bz2 \
121+
platform-tools-${machine}-${arch}.tar.bz2 \
122122
bpf-tools"
123123
get $version bpf-tools "$job"
124124
)

sdk/cargo-build-sbf/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ fn main() {
913913

914914
// The following line is scanned by CI configuration script to
915915
// separate cargo caches according to the version of platform-tools.
916-
let platform_tools_version = String::from("v1.39");
916+
let platform_tools_version = String::from("v1.41");
917917
let rust_base_version = get_base_rust_version(platform_tools_version.as_str());
918918
let version = format!(
919919
"{}\nplatform-tools {}\n{}",

sdk/program/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ repository = { workspace = true }
99
homepage = { workspace = true }
1010
license = { workspace = true }
1111
edition = { workspace = true }
12-
rust-version = "1.72.0" # solana platform-tools rust version
12+
rust-version = "1.75.0" # solana platform-tools rust version
1313

1414
[dependencies]
1515
bincode = { workspace = true }

sdk/sbf/c/sbf.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ OUT_DIR ?= ./out
1515
OS := $(shell uname)
1616

1717
LLVM_DIR = $(LOCAL_PATH)../dependencies/platform-tools/llvm
18-
LLVM_SYSTEM_INC_DIRS := $(LLVM_DIR)/lib/clang/15.0.4/include
18+
LLVM_SYSTEM_INC_DIRS := $(LLVM_DIR)/lib/clang/17/include
1919
COMPILER_RT_DIR = $(LOCAL_PATH)../dependencies/platform-tools/rust/lib/rustlib/sbf-solana-solana/lib
2020
STD_INC_DIRS := $(LLVM_DIR)/include
2121
STD_LIB_DIRS := $(LLVM_DIR)/lib

sdk/sbf/scripts/install.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,13 +109,13 @@ if [[ ! -e criterion-$version.md || ! -e criterion ]]; then
109109
fi
110110

111111
# Install platform tools
112-
version=v1.39
112+
version=v1.41
113113
if [[ ! -e platform-tools-$version.md || ! -e platform-tools ]]; then
114114
(
115115
set -e
116116
rm -rf platform-tools*
117117
job="download \
118-
https://github.com/solana-labs/platform-tools/releases/download \
118+
https://github.com/anza-xyz/platform-tools/releases/download \
119119
$version \
120120
platform-tools-${machine}-${arch}.tar.bz2 \
121121
platform-tools"

0 commit comments

Comments
 (0)