rizin/binrz
Rot127 5afc51f0e2
Replace current regex engine with PCRE2 (#4185)
* Replace OpenBSD regex library with PCRE2.

PCRE2 has way better performance than the OpenBSD
library (something around 20 times faster).

The following flags are enabled for every pattern:

- PCRE2_UTF
- PCRE2_MATCH_INVALID_UTF
- PCRE2_NO_UTF_CHECK

All the others are optional.

Changes made:

- Adds PCRE2 as subproject.
- Changes the API away from POSIX to PCRE2.
- Edits many regex patterns because:
 - ' ' is skipped in patterns, if the EXTENDED flag is set for matching. '\s' must be set now.
 - '.' doesn't match newlines by default.
- Changes the API so matches and their groups are bundled into PVectors.
- Moves the regex component to rz_util.

* Fix cross build - add copy of PCRE2 dependecy

Meson currently doesn't support subprojects to be native and non-native at the same time.
See: https://github.com/mesonbuild/meson/issues/10947
Unfortunately, sdb depends on rz_util which in turn depends on PCRE2.
Excluding PCRE2 from the native build makes linking of rz_util not possible anymore.
Adding it, will make Meson complain that the dependencies cannot be mixed.

Hence, we compile a copy of PCRE2 for the native build if required.
2024-02-05 12:51:16 +08:00
..
blob Remove rz-agent (#3087) 2022-10-12 10:34:46 +02:00
man Improve man pages formatting (#4182) 2024-02-02 23:22:50 +08:00
rizin Use add_global_arguments instead of passing cflags/ldflags all around (#2812) 2022-07-17 21:33:51 +08:00
rz-asm Use add_global_arguments instead of passing cflags/ldflags all around (#2812) 2022-07-17 21:33:51 +08:00
rz-ax Use add_global_arguments instead of passing cflags/ldflags all around (#2812) 2022-07-17 21:33:51 +08:00
rz-bin Use add_global_arguments instead of passing cflags/ldflags all around (#2812) 2022-07-17 21:33:51 +08:00
rz-diff Use add_global_arguments instead of passing cflags/ldflags all around (#2812) 2022-07-17 21:33:51 +08:00
rz-find Use add_global_arguments instead of passing cflags/ldflags all around (#2812) 2022-07-17 21:33:51 +08:00
rz-gg Use add_global_arguments instead of passing cflags/ldflags all around (#2812) 2022-07-17 21:33:51 +08:00
rz-hash Use add_global_arguments instead of passing cflags/ldflags all around (#2812) 2022-07-17 21:33:51 +08:00
rz-run Use add_global_arguments instead of passing cflags/ldflags all around (#2812) 2022-07-17 21:33:51 +08:00
rz-sign Use add_global_arguments instead of passing cflags/ldflags all around (#2812) 2022-07-17 21:33:51 +08:00
rz-test Replace current regex engine with PCRE2 (#4185) 2024-02-05 12:51:16 +08:00
meson.build Remove old bash-based rz-pm (#3360) 2023-02-07 18:26:38 +08:00