pcre2: use jit_if_available

This will allow PCRE2 to fall back to non-JIT matching when running on
platforms without JIT support.

ref https://github.com/BurntSushi/rust-pcre2/issues/3
This commit is contained in:
Andrew Gallant
2018-09-08 17:12:14 -04:00
parent 0f7494216f
commit eb18da0450
6 changed files with 34 additions and 17 deletions

View File

@@ -633,7 +633,7 @@ impl ArgMatches {
// For whatever reason, the JIT craps out during regex compilation with
// a "no more memory" error on 32 bit systems. So don't use it there.
if !cfg!(target_pointer_width = "32") {
builder.jit(true);
builder.jit_if_available(true);
}
if self.pcre2_unicode() {
builder.utf(true).ucp(true);