Skip to content

Commit 8991da6

Browse files
carenasgitster
authored andcommitted
grep: make sure NO_LIBPCRE1_JIT disable JIT in PCRE1
e87de7c ("grep: un-break building with PCRE < 8.32", 2017-05-25) added a restriction for JIT support that is no longer needed after pcre_jit_exec() calls were removed. Reorganize the definitions in grep.h so that JIT support could be detected early and NO_LIBPCRE1_JIT could be used reliably to enforce JIT doesn't get used. Signed-off-by: Carlo Marcelo Arenas Belón <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent c581e4a commit 8991da6

File tree

2 files changed

+3
-10
lines changed

2 files changed

+3
-10
lines changed

Makefile

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,8 @@ all::
3434
# library. Support for version 1 will likely be removed in some future
3535
# release of Git, as upstream has all but abandoned it.
3636
#
37-
# When using USE_LIBPCRE1, define NO_LIBPCRE1_JIT if the PCRE v1
38-
# library is compiled without --enable-jit. We will auto-detect
39-
# whether the version of the PCRE v1 library in use has JIT support at
40-
# all, but we unfortunately can't auto-detect whether JIT support
41-
# hasn't been compiled in in an otherwise JIT-supporting version. If
42-
# you have link-time errors about a missing `pcre_jit_exec` define
43-
# this, or recompile PCRE v1 with --enable-jit.
37+
# When using USE_LIBPCRE1, define NO_LIBPCRE1_JIT if you want to
38+
# disable JIT even if supported by your library.
4439
#
4540
# Define LIBPCREDIR=/foo/bar if your PCRE header and library files are
4641
# in /foo/bar/include and /foo/bar/lib directories. Which version of

grep.h

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,12 @@
33
#include "color.h"
44
#ifdef USE_LIBPCRE1
55
#include <pcre.h>
6-
#ifdef PCRE_CONFIG_JIT
7-
#if PCRE_MAJOR >= 8 && PCRE_MINOR >= 32
86
#ifndef NO_LIBPCRE1_JIT
7+
#ifdef PCRE_CONFIG_JIT
98
#define GIT_PCRE1_USE_JIT
109
#define GIT_PCRE_STUDY_JIT_COMPILE PCRE_STUDY_JIT_COMPILE
1110
#endif
1211
#endif
13-
#endif
1412
#ifndef GIT_PCRE_STUDY_JIT_COMPILE
1513
#define GIT_PCRE_STUDY_JIT_COMPILE 0
1614
#endif

0 commit comments

Comments
 (0)