RE2#
Pigweed AI summary: The RE2 module provides build files for including upstream RE2. To use RE2, one must add it to their workspace as a submodule and set the GN var dir_pw_third_party_re2 to the location of the RE2 source. The GN build files are generated from the third-party Bazel build files using a script that should be re-run whenever the submodule is updated or the JSON file is modified. The update script was last run for revision c9cba76.
The $dir_pw_third_party/re2/
module provides build files to allow
optionally including upstream RE2.
Using upstream RE2#
Pigweed AI summary: This section provides instructions for using the RE2 module, including adding it to your workspace as a submodule and setting the GN var to the location of the RE2 source. It also includes information on updating the GN build files and specifies the version of the update script used.
If you want to use RE2, you must do the following:
Submodule#
Pigweed AI summary: This paragraph provides a command for adding RE2 to a workspace using Git submodule. The command involves adding a specific URL to the workspace and specifying the source location.
Add RE2 to your workspace with the following command.
git submodule add https://github.com/google/re2.git \
third_party/re2/src
GN#
Pigweed AI summary: This paragraph provides instructions on how to set the GN variable "dir_pw_third_party_re2" to the location of the RE2 source, which can be done in the args.gn or .gn file using the code "dir_pw_third_party_re2 = "//third_party/re2/src"".
Set the GN var
dir_pw_third_party_re2
to the location of the RE2 source.If you used the command above, this will be
//third_party/re2/src
This can be set in your args.gn or .gn file like:
dir_pw_third_party_re2 = "//third_party/re2/src"
Updating#
Pigweed AI summary: The GN build files are created from third-party Bazel build files using a script called generate_3p_gn.py. This script uses data from the repo.json file located in the pw_third_party directory. It is important to re-run the script whenever the submodule is updated or the JSON file is modified. The location of the Bazel repository can be specified using the -w option.
The GN build files are generated from the third-party Bazel build files using $dir_pw_build/py/pw_build/generate_3p_gn.py.
The script uses data taken from $dir_pw_third_party/re2/repo.json
.
The script should be re-run whenever the submodule is updated or the JSON file
is modified. Specify the location of the Bazel repository can be specified using
the -w
option, e.g.
python pw_build/py/pw_build/generate_3p_gn.py \
-w third_party/re2/src
Version#
Pigweed AI summary: The update script for the Google RE2 repository was last run for revision c9cba76, as indicated by the reference link to the GitHub page.
The update script was last run for revision c9cba76.