rrthomas / lrexlib

A Lua (5.1 and later) binding of various regex library APIs (POSIX, PCRE, PCRE2, GNU, Oniguruma and TRE)
Other
161 stars 29 forks source link

"bad JIT option" when calling jit_compile() #46

Closed vm-001 closed 8 months ago

vm-001 commented 8 months ago

I'm trying to use jit_compile to optimize the performance, but i got bad JIT option.

local lrex = require "rex_pcre2"
local pattern = "^/abc$"
local compiled = lrex.new(pattern)
local ok,err = compiled:jit_compile()
print(ok, err) -- false   bad JIT option
rrthomas commented 8 months ago

Works for me with Lua 5.4.6, lrexlib 2.9.2, PCRE2 10.39. What versions are you using?

vm-001 commented 8 months ago

I'm using OSX M1 CPU. It works after I reinstall the library.