Skip to content

Commit

Permalink
Revert "Disable JIT compiler on unsupported platforms (solana-labs#21215
Browse files Browse the repository at this point in the history
)"

This reverts commit 4c66126.
  • Loading branch information
frits-metalogix authored Nov 24, 2021
1 parent 0d387f1 commit 6b65603
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 0 additions & 6 deletions ledger/src/builtins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ 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 {
Expand Down
7 changes: 6 additions & 1 deletion validator/src/bin/solana-test-validator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -393,6 +393,11 @@ 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") {
Expand Down Expand Up @@ -552,7 +557,7 @@ fn main() {
faucet_addr,
..JsonRpcConfig::default()
})
.bpf_jit(!matches.is_present("no_bpf_jit"))
.bpf_jit(bpf_jit)
.rpc_port(rpc_port)
.add_programs_with_path(&programs);

Expand Down

0 comments on commit 6b65603

Please sign in to comment.