Add llvm feature option to compile for Solana BPF target (#16495)
This commit is contained in:
parent
85eb37fab0
commit
db3bca7edd
|
@ -1245,7 +1245,7 @@ fn assert_instruction_count() {
|
||||||
("solana_bpf_rust_noop", 472),
|
("solana_bpf_rust_noop", 472),
|
||||||
("solana_bpf_rust_param_passing", 46),
|
("solana_bpf_rust_param_passing", 46),
|
||||||
("solana_bpf_rust_ristretto", 19220),
|
("solana_bpf_rust_ristretto", 19220),
|
||||||
("solana_bpf_rust_sanity", 894),
|
("solana_bpf_rust_sanity", 901),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,7 @@ BPF_C_FLAGS := \
|
||||||
$(C_FLAGS) \
|
$(C_FLAGS) \
|
||||||
-target bpf \
|
-target bpf \
|
||||||
-fPIC \
|
-fPIC \
|
||||||
|
-march=bpfel+solana
|
||||||
|
|
||||||
BPF_CXX_FLAGS := \
|
BPF_CXX_FLAGS := \
|
||||||
$(CXX_FLAGS) \
|
$(CXX_FLAGS) \
|
||||||
|
@ -53,6 +54,7 @@ BPF_CXX_FLAGS := \
|
||||||
-fno-exceptions \
|
-fno-exceptions \
|
||||||
-fno-asynchronous-unwind-tables \
|
-fno-asynchronous-unwind-tables \
|
||||||
-fno-unwind-tables \
|
-fno-unwind-tables \
|
||||||
|
-march=bpfel+solana
|
||||||
|
|
||||||
BPF_LLD_FLAGS := \
|
BPF_LLD_FLAGS := \
|
||||||
-z notext \
|
-z notext \
|
||||||
|
|
|
@ -92,7 +92,7 @@ if [[ ! -e criterion-$version.md || ! -e criterion ]]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Install Rust-BPF
|
# Install Rust-BPF
|
||||||
version=v1.5
|
version=v1.6
|
||||||
if [[ ! -e bpf-tools-$version.md || ! -e bpf-tools ]]; then
|
if [[ ! -e bpf-tools-$version.md || ! -e bpf-tools ]]; then
|
||||||
(
|
(
|
||||||
set -e
|
set -e
|
||||||
|
|
|
@ -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.5",
|
"v1.6",
|
||||||
"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),
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue