Bump bpf-tools version to 1.9

- upgrade rustc to 1.52.1 and clang to 12.0
This commit is contained in:
Dmitri Makarov
2021-05-18 19:44:36 +02:00
committed by Dmitri Makarov
parent a544010b03
commit 2ae57c172a
6 changed files with 22 additions and 22 deletions

View File

@ -1244,11 +1244,11 @@ fn assert_instruction_count() {
("alloc", 1137), ("alloc", 1137),
("bpf_to_bpf", 13), ("bpf_to_bpf", 13),
("multiple_static", 8), ("multiple_static", 8),
("noop", 45), ("noop", 5),
("noop++", 45), ("noop++", 5),
("relative_call", 10), ("relative_call", 10),
("sanity", 175), ("sanity", 169),
("sanity++", 177), ("sanity++", 168),
("sha", 694), ("sha", 694),
("struct_pass", 8), ("struct_pass", 8),
("struct_ret", 22), ("struct_ret", 22),
@ -1257,19 +1257,19 @@ fn assert_instruction_count() {
#[cfg(feature = "bpf_rust")] #[cfg(feature = "bpf_rust")]
{ {
programs.extend_from_slice(&[ programs.extend_from_slice(&[
("solana_bpf_rust_128bit", 572), ("solana_bpf_rust_128bit", 584),
("solana_bpf_rust_alloc", 8906), ("solana_bpf_rust_alloc", 4967),
("solana_bpf_rust_custom_heap", 516), ("solana_bpf_rust_custom_heap", 365),
("solana_bpf_rust_dep_crate", 2), ("solana_bpf_rust_dep_crate", 2),
("solana_bpf_rust_external_spend", 498), ("solana_bpf_rust_external_spend", 334),
("solana_bpf_rust_iter", 724), ("solana_bpf_rust_iter", 8),
("solana_bpf_rust_many_args", 237), ("solana_bpf_rust_many_args", 189),
("solana_bpf_rust_mem", 2297), ("solana_bpf_rust_mem", 1665),
("solana_bpf_rust_noop", 472), ("solana_bpf_rust_noop", 322),
("solana_bpf_rust_param_passing", 46), ("solana_bpf_rust_param_passing", 46),
("solana_bpf_rust_rand", 475), ("solana_bpf_rust_rand", 325),
("solana_bpf_rust_sanity", 894), ("solana_bpf_rust_sanity", 587),
("solana_bpf_rust_sha", 29099), ("solana_bpf_rust_sha", 22417),
]); ]);
} }

View File

@ -92,7 +92,7 @@ if [[ ! -e criterion-$version.md || ! -e criterion ]]; then
fi fi
# Install Rust-BPF # Install Rust-BPF
version=v1.8 version=v1.9
if [[ ! -e bpf-tools-$version.md || ! -e bpf-tools ]]; then if [[ ! -e bpf-tools-$version.md || ! -e bpf-tools ]]; then
( (
set -e set -e

View File

@ -360,7 +360,7 @@ fn build_bpf_package(config: &Config, target_directory: &Path, package: &cargo_m
install_if_missing( install_if_missing(
&config, &config,
"bpf-tools", "bpf-tools",
"v1.8", "v1.9",
"https://github.com/solana-labs/bpf-tools/releases/download", "https://github.com/solana-labs/bpf-tools/releases/download",
&PathBuf::from(bpf_tools_filename), &PathBuf::from(bpf_tools_filename),
) )

View File

@ -135,7 +135,7 @@ pub fn hashv(vals: &[&[u8]]) -> Hash {
{ {
extern "C" { extern "C" {
fn sol_sha256(vals: *const u8, val_len: u64, hash_result: *mut u8) -> u64; fn sol_sha256(vals: *const u8, val_len: u64, hash_result: *mut u8) -> u64;
}; }
let mut hash_result = [0; HASH_BYTES]; let mut hash_result = [0; HASH_BYTES];
unsafe { unsafe {
sol_sha256( sol_sha256(

View File

@ -133,7 +133,7 @@ pub fn hashv(vals: &[&[u8]]) -> Hash {
{ {
extern "C" { extern "C" {
fn sol_keccak256(vals: *const u8, val_len: u64, hash_result: *mut u8) -> u64; fn sol_keccak256(vals: *const u8, val_len: u64, hash_result: *mut u8) -> u64;
}; }
let mut hash_result = [0; HASH_BYTES]; let mut hash_result = [0; HASH_BYTES];
unsafe { unsafe {
sol_keccak256( sol_keccak256(

View File

@ -227,7 +227,7 @@ impl Pubkey {
program_id_addr: *const u8, program_id_addr: *const u8,
address_bytes_addr: *const u8, address_bytes_addr: *const u8,
) -> u64; ) -> u64;
}; }
let mut bytes = [0; 32]; let mut bytes = [0; 32];
let result = unsafe { let result = unsafe {
sol_create_program_address( sol_create_program_address(
@ -309,7 +309,7 @@ impl Pubkey {
address_bytes_addr: *const u8, address_bytes_addr: *const u8,
bump_seed_addr: *const u8, bump_seed_addr: *const u8,
) -> u64; ) -> u64;
}; }
let mut bytes = [0; 32]; let mut bytes = [0; 32];
let mut bump_seed = std::u8::MAX; let mut bump_seed = std::u8::MAX;
let result = unsafe { let result = unsafe {
@ -342,7 +342,7 @@ impl Pubkey {
{ {
extern "C" { extern "C" {
fn sol_log_pubkey(pubkey_addr: *const u8); fn sol_log_pubkey(pubkey_addr: *const u8);
}; }
unsafe { sol_log_pubkey(self.as_ref() as *const _ as *const u8) }; unsafe { sol_log_pubkey(self.as_ref() as *const _ as *const u8) };
} }