Commit ac5767d
authored
perfetto: honor PERFETTO_REGEX_FORCE_STD in regex backend headers (#6072)
#6034 made regex.cc include all backend headers unconditionally so
gen_amalgamated can see through them, relying on each header to
self-guard. regex_pcre2.h / regex_re2.h guarded only on
PERFETTO_BUILDFLAG(PERFETTO_PCRE2/RE2), ignoring
PERFETTO_REGEX_FORCE_STD.
In the android_tree build config PERFETTO_PCRE2 is defined to 1
globally, so the unconditional include pulled <pcre2.h> into every
target, including libperfetto_client_experimental, which sets
-DPERFETTO_REGEX_FORCE_STD precisely to avoid pulling in libpcre2 (see
gn/perfetto.gni). This broke the Android auto-roll with "'pcre2.h' file
not found".
Make the header self-guards also honor PERFETTO_REGEX_FORCE_STD,
matching the backend-selection priority in regex.cc where FORCE_STD wins
over PCRE2/RE2. Fix both headers as the opt-out contract applies
symmetrically.1 parent 0418eff commit ac5767d
3 files changed
Lines changed: 13 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
24 | 26 | | |
25 | 27 | | |
26 | 28 | | |
| |||
198 | 200 | | |
199 | 201 | | |
200 | 202 | | |
201 | | - | |
| 203 | + | |
| 204 | + | |
202 | 205 | | |
203 | 206 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
25 | 27 | | |
26 | 28 | | |
27 | 29 | | |
| |||
124 | 126 | | |
125 | 127 | | |
126 | 128 | | |
127 | | - | |
| 129 | + | |
| 130 | + | |
128 | 131 | | |
129 | 132 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| |||
0 commit comments