xref: /aosp_15_r20/external/cronet/third_party/re2/BUILD.gn (revision 6777b5387eb2ff775bb5750e3f5d96f37fb7352b)
1# Copyright 2014 The Chromium Authors
2# Use of this source code is governed by a BSD-style license that can be
3# found in the LICENSE file.
4
5import("//testing/libfuzzer/fuzzer_test.gni")
6
7config("re2_config") {
8  include_dirs = [ "src" ]
9}
10
11static_library("re2") {
12  sources = [
13    "src/re2/bitmap256.cc",
14    "src/re2/bitmap256.h",
15    "src/re2/bitstate.cc",
16    "src/re2/compile.cc",
17    "src/re2/dfa.cc",
18    "src/re2/filtered_re2.cc",
19    "src/re2/filtered_re2.h",
20    "src/re2/mimics_pcre.cc",
21    "src/re2/nfa.cc",
22    "src/re2/onepass.cc",
23    "src/re2/parse.cc",
24    "src/re2/perl_groups.cc",
25    "src/re2/prefilter.cc",
26    "src/re2/prefilter.h",
27    "src/re2/prefilter_tree.cc",
28    "src/re2/prefilter_tree.h",
29    "src/re2/prog.cc",
30    "src/re2/prog.h",
31    "src/re2/re2.cc",
32    "src/re2/re2.h",
33    "src/re2/regexp.cc",
34    "src/re2/regexp.h",
35    "src/re2/set.cc",
36    "src/re2/set.h",
37    "src/re2/simplify.cc",
38    "src/re2/sparse_array.h",
39    "src/re2/sparse_set.h",
40    "src/re2/stringpiece.h",
41    "src/re2/tostring.cc",
42    "src/re2/unicode_casefold.cc",
43    "src/re2/unicode_casefold.h",
44    "src/re2/unicode_groups.cc",
45    "src/re2/unicode_groups.h",
46    "src/re2/walker-inl.h",
47    "src/util/logging.h",
48    "src/util/rune.cc",
49    "src/util/strutil.cc",
50    "src/util/strutil.h",
51    "src/util/utf.h",
52  ]
53
54  configs -= [ "//build/config/compiler:chromium_code" ]
55  configs += [ "//build/config/compiler:no_chromium_code" ]
56  public_configs = [ ":re2_config" ]
57  public_deps = [ "//third_party/abseil-cpp:absl" ]
58}
59
60fuzzer_test("third_party_re2_fuzzer") {
61  sources = [ "src/re2/fuzzing/re2_fuzzer.cc" ]
62  deps = [ ":re2" ]
63}
64