Disable JIT compiler on unsupported platforms (#21215) (#21218)

(cherry picked from commit b4d09388aa)

Co-authored-by: Kirill Fomichev <fanatid@ya.ru>
This commit is contained in:
mergify[bot]
2021-11-09 13:29:49 +00:00
committed by GitHub
parent a7b3436b1e
commit 784c745efa
2 changed files with 7 additions and 6 deletions

View File

@ -12,6 +12,12 @@ macro_rules! to_builtin {
/// Builtin programs that are always available
fn genesis_builtins(bpf_jit: bool) -> Vec<Builtin> {
// Currently JIT is not supported on the BPF VM:
// !x86_64: https://github.com/qmonnet/rbpf/issues/48
// Windows: https://github.com/solana-labs/rbpf/issues/217
#[cfg(any(not(target_arch = "x86_64"), target_family = "windows"))]
let bpf_jit = false;
vec![
to_builtin!(solana_bpf_loader_deprecated_program!()),
if bpf_jit {

View File

@ -392,11 +392,6 @@ fn main() {
IpAddr::V4(Ipv4Addr::new(0, 0, 0, 0)),
faucet_port,
));
// JIT not supported on the BPF VM in Windows currently: https://github.com/solana-labs/rbpf/issues/217
#[cfg(target_family = "windows")]
let bpf_jit = false;
#[cfg(not(target_family = "windows"))]
let bpf_jit = !matches.is_present("no_bpf_jit");
let mut programs = vec![];
if let Some(values) = matches.values_of("bpf_program") {
@ -550,7 +545,7 @@ fn main() {
faucet_addr,
..JsonRpcConfig::default()
})
.bpf_jit(bpf_jit)
.bpf_jit(!matches.is_present("no_bpf_jit"))
.rpc_port(rpc_port)
.add_programs_with_path(&programs);